Package io.jmix.core
Interface EntityEntry
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BaseEntityEntry,EmbeddableEntityEntry,KeyValueEntity.KeyValueEntityEntry,NoIdEntityEntry,NullableIdEntityEntry
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtraState(EntityEntryExtraState extraState) voidAdd listener to track attributes changes.voidcopy(EntityEntry entry) Copies the state of entity entry.<T> TgetAttributeValue(String name) getExtraState(Class<?> extraStateType) default ObjectGeneratedId will be determined at enhancing time as follows: primary key (Id,EmbeddedIdorJmixIdattribute) will be used if it hasJmixGeneratedValueannotation, any other UUIDJmixGeneratedValueproperty will be chosen if primary key doesn't haveJmixGeneratedValueannotation, primary key or some synthetic id will be used if there is noJmixGeneratedValuesatisfiyng conditions below (seeEntityEntryimplementations for details).
This algorithm used forBaseEntityEntryandNullableIdEntityEntry.booleandefault booleanbooleanbooleanisNew()booleanvoidRemove allEntityPropertyChangeListeners.voidRemove listener.default voidsetAttributeValue(String name, Object value) voidsetAttributeValue(String name, Object value, boolean checkEquals) voidsetDetached(boolean detached) voidsetEntityId(Object id) voidsetGeneratedId(Object id) GeneratedId needed to identify entity, including hashCode calculation (seeEntityInternals.hashCode(Entity)).voidsetManaged(boolean managed) voidsetNew(boolean _new) voidsetRemoved(boolean removed) voidsetSecurityState(SecurityState securityState)
-
Method Details
-
getSource
Entity getSource() -
getEntityId
-
setEntityId
-
getGeneratedIdOrNull
GeneratedId will be determined at enhancing time as follows:- primary key (
Id,EmbeddedIdorJmixIdattribute) will be used if it hasJmixGeneratedValueannotation, - any other UUID
JmixGeneratedValueproperty will be chosen if primary key doesn't haveJmixGeneratedValueannotation, - primary key or some synthetic id will be used if there is no
JmixGeneratedValuesatisfiyng conditions below (seeEntityEntryimplementations for details).
This algorithm used forBaseEntityEntryandNullableIdEntityEntry. See implementing classes description to clarify whether each of them will be used (directly or through subclass creation during enhancing process) - primary key (
-
getGeneratedId
-
setGeneratedId
GeneratedId needed to identify entity, including hashCode calculation (seeEntityInternals.hashCode(Entity)). Thus it has to be copied at the very beginning of entity copy creation.- Parameters:
id-
-
getAttributeValue
-
setAttributeValue
-
setAttributeValue
-
isEmbeddable
default boolean isEmbeddable() -
isNew
boolean isNew() -
isManaged
boolean isManaged() -
isDetached
boolean isDetached() -
isRemoved
boolean isRemoved() -
setNew
void setNew(boolean _new) -
setManaged
void setManaged(boolean managed) -
setDetached
void setDetached(boolean detached) -
setRemoved
void setRemoved(boolean removed) -
getSecurityState
SecurityState getSecurityState() -
setSecurityState
-
addPropertyChangeListener
Add listener to track attributes changes.- Parameters:
listener- listener
-
removePropertyChangeListener
Remove listener.- Parameters:
listener- listener to remove
-
removeAllListeners
void removeAllListeners()Remove allEntityPropertyChangeListeners. -
copy
Copies the state of entity entry. -
addExtraState
-
getExtraState
-
getAllExtraState
Collection<EntityEntryExtraState> getAllExtraState()
-