public abstract class BaseEntityEntry extends java.lang.Object implements EntityEntry, java.lang.Cloneable
BaseEntityEntry
will be created for entity, that
has primary key (an attribute annotated with Id
, EmbeddedId
or JmixId
) and this primary key
annotated with JmixGeneratedValue
Modifier and Type | Field and Description |
---|---|
static int |
DETACHED |
protected java.util.Map<java.lang.Class<?>,EntityValuesProvider> |
entityValuesProviders |
protected java.util.Map<java.lang.Class<?>,EntityEntryExtraState> |
extraStateMap |
static int |
MANAGED |
static int |
NEW |
protected static int |
PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY |
protected java.util.Collection<java.lang.ref.WeakReference<EntityPropertyChangeListener>> |
propertyChangeListeners |
static int |
REMOVED |
protected SecurityState |
securityState |
protected Entity |
source |
protected byte |
state |
Constructor and Description |
---|
BaseEntityEntry(Entity source) |
Modifier and Type | Method and Description |
---|---|
void |
addExtraState(EntityEntryExtraState extraState) |
void |
addPropertyChangeListener(EntityPropertyChangeListener listener)
Add listener to track attributes changes.
|
void |
copy(EntityEntry entry)
Copies the state of entity entry.
|
void |
firePropertyChanged(java.lang.String propertyName,
java.lang.Object prev,
java.lang.Object curr) |
java.util.Collection<EntityEntryExtraState> |
getAllExtraState() |
<T> T |
getAttributeValue(java.lang.String name) |
EntityEntryExtraState |
getExtraState(java.lang.Class<?> extraStateType) |
SecurityState |
getSecurityState() |
Entity |
getSource() |
int |
hashCode() |
boolean |
isDetached() |
boolean |
isManaged() |
boolean |
isNew() |
boolean |
isRemoved() |
void |
removeAllListeners()
Remove all
EntityPropertyChangeListener s. |
void |
removePropertyChangeListener(EntityPropertyChangeListener listener)
Remove listener.
|
void |
setAttributeValue(java.lang.String name,
java.lang.Object value,
boolean checkEquals) |
void |
setDetached(boolean detached) |
void |
setManaged(boolean managed) |
void |
setNew(boolean _new) |
void |
setRemoved(boolean removed) |
void |
setSecurityState(SecurityState securityState) |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getEntityId, getGeneratedId, getGeneratedIdOrNull, isEmbeddable, setAttributeValue, setEntityId, setGeneratedId
protected byte state
protected SecurityState securityState
protected transient java.util.Collection<java.lang.ref.WeakReference<EntityPropertyChangeListener>> propertyChangeListeners
protected Entity source
protected java.util.Map<java.lang.Class<?>,EntityEntryExtraState> extraStateMap
protected java.util.Map<java.lang.Class<?>,EntityValuesProvider> entityValuesProviders
public static final int NEW
public static final int DETACHED
public static final int MANAGED
public static final int REMOVED
protected static final int PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY
public BaseEntityEntry(Entity source)
@NonNull public Entity getSource()
getSource
in interface EntityEntry
public int hashCode()
hashCode
in class java.lang.Object
public <T> T getAttributeValue(@NonNull java.lang.String name)
getAttributeValue
in interface EntityEntry
public void setAttributeValue(@NonNull java.lang.String name, java.lang.Object value, boolean checkEquals)
setAttributeValue
in interface EntityEntry
public boolean isNew()
isNew
in interface EntityEntry
public boolean isManaged()
isManaged
in interface EntityEntry
public boolean isDetached()
isDetached
in interface EntityEntry
public boolean isRemoved()
isRemoved
in interface EntityEntry
public void setNew(boolean _new)
setNew
in interface EntityEntry
public void setManaged(boolean managed)
setManaged
in interface EntityEntry
public void setDetached(boolean detached)
setDetached
in interface EntityEntry
public void setRemoved(boolean removed)
setRemoved
in interface EntityEntry
@NonNull public SecurityState getSecurityState()
getSecurityState
in interface EntityEntry
public void setSecurityState(@NonNull SecurityState securityState)
setSecurityState
in interface EntityEntry
public void addPropertyChangeListener(@NonNull EntityPropertyChangeListener listener)
EntityEntry
addPropertyChangeListener
in interface EntityEntry
listener
- listenerpublic void removePropertyChangeListener(@NonNull EntityPropertyChangeListener listener)
EntityEntry
removePropertyChangeListener
in interface EntityEntry
listener
- listener to removepublic void removeAllListeners()
EntityEntry
EntityPropertyChangeListener
s.removeAllListeners
in interface EntityEntry
public void firePropertyChanged(java.lang.String propertyName, java.lang.Object prev, java.lang.Object curr)
public void copy(@Nullable EntityEntry entry)
EntityEntry
copy
in interface EntityEntry
public void addExtraState(@NonNull EntityEntryExtraState extraState)
addExtraState
in interface EntityEntry
public EntityEntryExtraState getExtraState(@NonNull java.lang.Class<?> extraStateType)
getExtraState
in interface EntityEntry
@NonNull public java.util.Collection<EntityEntryExtraState> getAllExtraState()
getAllExtraState
in interface EntityEntry