Package io.jmix.core.entity
Class EntityValues
java.lang.Object
io.jmix.core.entity.EntityValues
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ObjectgetCreatedBy(Object entity) static ObjectgetCreatedDate(Object entity) static ObjectgetDeletedBy(Object entity) static ObjectgetDeletedDate(Object entity) static ObjectgetGeneratedId(Object entity) static Objectstatic ObjectgetIdOrEntity(Object entity) static ObjectgetLastModifiedBy(Object entity) static ObjectgetLastModifiedDate(Object entity) static UUIDstatic <T> TGet an attribute value.static <T> TgetValueEx(Object entity, PropertyPath propertyPath) Get an attribute value.static <T> TgetValueEx(Object entity, String propertyPath) Get an attribute value.static <T> TgetValueEx(Object entity, String[] properties) Get value of an attribute according to the rules described ingetValueEx(Object, String).static ObjectgetVersion(Object entity) static booleanisAuditSupported(Object entity) static booleanstatic booleanisSoftDeleted(Object entity) static booleanisSoftDeletionSupported(Object entity) static booleanisUuidSupported(Object entity) static booleanisVersionSupported(Object entity) static booleanpropertyValueEquals(Object a, Object b) Used by to check whether a property value has been changed.static voidsetCreatedBy(Object entity, Object value) static voidsetCreatedDate(Object entity, Object value) static voidsetDeletedBy(Object entity, Object value) static voidsetDeletedDate(Object entity, Object value) static voidsetGeneratedId(Object entity, Object id) static voidstatic voidsetLastModifiedBy(Object entity, Object value) static voidsetLastModifiedDate(Object entity, Object value) static voidstatic voidSet an attribute value.static voidSet an attribute value.static voidsetValueEx(Object entity, PropertyPath propertyPath, Object value) Set an attribute value.static voidsetValueEx(Object entity, String[] properties, Object value) Set value of an attribute according to the rules described insetValueEx(Object, String, Object).static voidsetValueEx(Object entity, String propertyPath, Object value) Set an attribute value.static voidsetVersion(Object entity, Object version) 
- 
Constructor Details- 
EntityValuespublic EntityValues()
 
- 
- 
Method Details- 
isEntity
- 
getId
- 
setId
- 
getIdOrEntity
- 
getGeneratedId
- 
setGeneratedId
- 
setValueSet an attribute value.
 An implementor should first read a current value of the attribute, and then call an appropriate setter method only if the new value differs. This ensures triggering ofEntityPropertyChangeListeners only if the attribute was actually changed.- Parameters:
- name- attribute name according to JavaBeans notation
- value- attribute value
 
- 
setValueSet an attribute value.
 An implementor should first read a current value of the attribute, and then call an appropriate setter method only if the new value differs. This ensures triggering ofEntityPropertyChangeListeners only if the attribute was actually changed.- Parameters:
- name- attribute name according to JavaBeans notation
- value- attribute value
- checkEquals- check equals for previous and new value. If flag is true and objects equals, then setter will not be invoked
 
- 
getValueGet an attribute value.- Parameters:
- name- attribute name according to JavaBeans notation
- Returns:
- attribute value
 
- 
getValueExGet an attribute value. Locates the attribute by the given path in object graph starting from this instance.
 The path must consist of attribute names according to JavaBeans notation, separated by dots, e.g.car.driver.name.- Parameters:
- propertyPath- path to an attribute
- Returns:
- attribute value. If any traversing attribute value is null or is not an Entity, this method stops here and returns this value.
 
- 
getValueExGet an attribute value. Locates the attribute by the given path in object graph starting from this instance.
 The path must consist of attribute names according to JavaBeans notation, separated by dots, e.g.car.driver.name.- Parameters:
- propertyPath- path to an attribute
- Returns:
- attribute value. If any traversing attribute value is null or is not an Entity, this method stops here and returns this value.
 
- 
setValueExSet an attribute value. Locates the attribute by the given path in object graph starting from this instance.
 The path must consist of attribute names according to JavaBeans notation, separated by dots, e.g.car.driver.name.
 In the example above this method first gets value ofcar.driverattribute, and if it is not null and is anEntity, sets value ofnameattribute in it.
 An implementor should first read a current value of the attribute, and then call an appropriate setter method only if the new value differs. This ensures triggering ofEntityPropertyChangeListeners only if the attribute was actually changed.- Parameters:
- propertyPath- path to an attribute
- value- attribute value
 
- 
setValueExSet an attribute value. Locates the attribute by the given path in object graph starting from this instance.
 The path must consist of attribute names according to JavaBeans notation, separated by dots, e.g.car.driver.name.
 In the example above this method first gets value ofcar.driverattribute, and if it is not null and is anEntity, sets value ofnameattribute in it.
 An implementor should first read a current value of the attribute, and then call an appropriate setter method only if the new value differs. This ensures triggering ofEntityPropertyChangeListeners only if the attribute was actually changed.- Parameters:
- propertyPath- path to an attribute
- value- attribute value
 
- 
setValueExSet value of an attribute according to the rules described insetValueEx(Object, String, Object).- Parameters:
- entity- instance
- properties- path to the attribute
- value- attribute value
 
- 
getValueExGet value of an attribute according to the rules described ingetValueEx(Object, String).- Parameters:
- entity- entity
- properties- path to the attribute
- Returns:
- attribute value
 
- 
propertyValueEqualsUsed by to check whether a property value has been changed.- Parameters:
- a- an object
- b- an object
- Returns:
- true if aequals tob, but in case ofais orCollectionreturns true only ifais the same instance asb
 
- 
isUuidSupported
- 
getUuid
- 
setUuid
- 
isVersionSupported
- 
getVersion
- 
setVersion
- 
isSoftDeletionSupported
- 
isSoftDeleted
- 
getDeletedDate
- 
setDeletedDate
- 
getDeletedBy
- 
setDeletedBy
- 
isAuditSupported
- 
getCreatedDate
- 
setCreatedDate
- 
getCreatedBy
- 
setCreatedBy
- 
getLastModifiedDate
- 
setLastModifiedDate
- 
getLastModifiedBy
- 
setLastModifiedBy
 
-