Package org.cyclos.impl.utils
Class EntityWithCustomValuesMap
- java.lang.Object
-
- org.cyclos.impl.utils.ConvertingBeanMap
-
- org.cyclos.impl.utils.BaseWithCustomValuesMap
-
- org.cyclos.impl.utils.EntityWithCustomValuesMap
-
public class EntityWithCustomValuesMap extends BaseWithCustomValuesMap
Wraps an entity which implementsEntityWithCustomValuesin a Map interface. Properties which are not custom values are accessed via reflection, while custom field values, by field internal name
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.utils.BaseWithCustomValuesMap
customFieldValueHandler, customValues, entityManagerHandler
-
-
Constructor Summary
Constructors Constructor Description EntityWithCustomValuesMap(EntityWithCustomValues<? extends CustomField<?,?,?>,?,?,?> entity, Collection<? extends CustomField<?,?,?>> customFields, ConversionHandler conversionHandler, EntityManagerHandler entityManagerHandler, CustomFieldValueHandler customFieldValueHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ICustomFieldValue<?,?,?,?>newCustomFieldValue(CustomField<?,?,?> field)Returns a new instance of a suitableICustomFieldValuefor the given field.protected voidsetCustomFieldValue(CustomField<?,?,?> customField, ICustomFieldValue<?,?,?,?> fieldValue, Object value)-
Methods inherited from class org.cyclos.impl.utils.BaseWithCustomValuesMap
containsKey, get, getCustomField, getCustomField, getCustomFields, initKeySet, put
-
Methods inherited from class org.cyclos.impl.utils.ConvertingBeanMap
clear, containsValue, entrySet, getBean, getConversionHandler, getPropertyNames, isEmpty, keySet, putAll, remove, size, toString, values
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
EntityWithCustomValuesMap
public EntityWithCustomValuesMap(EntityWithCustomValues<? extends CustomField<?,?,?>,?,?,?> entity, Collection<? extends CustomField<?,?,?>> customFields, ConversionHandler conversionHandler, EntityManagerHandler entityManagerHandler, CustomFieldValueHandler customFieldValueHandler)
-
-
Method Detail
-
newCustomFieldValue
protected ICustomFieldValue<?,?,?,?> newCustomFieldValue(CustomField<?,?,?> field)
Description copied from class:BaseWithCustomValuesMapReturns a new instance of a suitableICustomFieldValuefor the given field. The returned field value must have both the field and owner (if any) already set in.- Specified by:
newCustomFieldValuein classBaseWithCustomValuesMap
-
setCustomFieldValue
protected void setCustomFieldValue(CustomField<?,?,?> customField, ICustomFieldValue<?,?,?,?> fieldValue, Object value)
- Specified by:
setCustomFieldValuein classBaseWithCustomValuesMap
-
-