Package io.jmix.core
Interface EntityEntry
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BaseEntityEntry
,EmbeddableEntityEntry
,KeyValueEntity.KeyValueEntityEntry
,NoIdEntityEntry
,NullableIdEntityEntry
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtraState
(EntityEntryExtraState extraState) void
Add listener to track attributes changes.void
copy
(EntityEntry entry) Copies the state of entity entry.<T> T
getAttributeValue
(String name) getExtraState
(Class<?> extraStateType) default Object
GeneratedId will be determined at enhancing time as follows: primary key (Id
,EmbeddedId
orJmixId
attribute) will be used if it hasJmixGeneratedValue
annotation, any other UUIDJmixGeneratedValue
property will be chosen if primary key doesn't haveJmixGeneratedValue
annotation, primary key or some synthetic id will be used if there is noJmixGeneratedValue
satisfiyng conditions below (seeEntityEntry
implementations for details).
This algorithm used forBaseEntityEntry
andNullableIdEntityEntry
.boolean
default boolean
boolean
boolean
isNew()
boolean
void
Remove allEntityPropertyChangeListener
s.void
Remove listener.default void
setAttributeValue
(String name, Object value) void
setAttributeValue
(String name, Object value, boolean checkEquals) void
setDetached
(boolean detached) void
setEntityId
(Object id) void
setGeneratedId
(Object id) GeneratedId needed to identify entity, including hashCode calculation (seeEntityInternals.hashCode(Entity)
).void
setManaged
(boolean managed) void
setNew
(boolean _new) void
setRemoved
(boolean removed) void
setSecurityState
(SecurityState securityState)
-
Method Details
-
getSource
Entity getSource() -
getEntityId
-
setEntityId
-
getGeneratedIdOrNull
GeneratedId will be determined at enhancing time as follows:- primary key (
Id
,EmbeddedId
orJmixId
attribute) will be used if it hasJmixGeneratedValue
annotation, - any other UUID
JmixGeneratedValue
property will be chosen if primary key doesn't haveJmixGeneratedValue
annotation, - primary key or some synthetic id will be used if there is no
JmixGeneratedValue
satisfiyng conditions below (seeEntityEntry
implementations for details).
This algorithm used forBaseEntityEntry
andNullableIdEntityEntry
. 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 allEntityPropertyChangeListener
s. -
copy
Copies the state of entity entry. -
addExtraState
-
getExtraState
-
getAllExtraState
Collection<EntityEntryExtraState> getAllExtraState()
-