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
EntityPropertyChangeListeners. |
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, waitgetEntityId, getGeneratedId, getGeneratedIdOrNull, isEmbeddable, setAttributeValue, setEntityId, setGeneratedIdprotected 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 EntityEntrypublic int hashCode()
hashCode in class java.lang.Objectpublic <T> T getAttributeValue(@NonNull
java.lang.String name)
getAttributeValue in interface EntityEntrypublic void setAttributeValue(@NonNull
java.lang.String name,
java.lang.Object value,
boolean checkEquals)
setAttributeValue in interface EntityEntrypublic boolean isNew()
isNew in interface EntityEntrypublic boolean isManaged()
isManaged in interface EntityEntrypublic boolean isDetached()
isDetached in interface EntityEntrypublic boolean isRemoved()
isRemoved in interface EntityEntrypublic void setNew(boolean _new)
setNew in interface EntityEntrypublic void setManaged(boolean managed)
setManaged in interface EntityEntrypublic void setDetached(boolean detached)
setDetached in interface EntityEntrypublic void setRemoved(boolean removed)
setRemoved in interface EntityEntry@NonNull public SecurityState getSecurityState()
getSecurityState in interface EntityEntrypublic void setSecurityState(@NonNull
SecurityState securityState)
setSecurityState in interface EntityEntrypublic void addPropertyChangeListener(@NonNull
EntityPropertyChangeListener listener)
EntityEntryaddPropertyChangeListener in interface EntityEntrylistener - listenerpublic void removePropertyChangeListener(@NonNull
EntityPropertyChangeListener listener)
EntityEntryremovePropertyChangeListener in interface EntityEntrylistener - listener to removepublic void removeAllListeners()
EntityEntryEntityPropertyChangeListeners.removeAllListeners in interface EntityEntrypublic void firePropertyChanged(java.lang.String propertyName,
java.lang.Object prev,
java.lang.Object curr)
public void copy(@Nullable
EntityEntry entry)
EntityEntrycopy in interface EntityEntrypublic void addExtraState(@NonNull
EntityEntryExtraState extraState)
addExtraState in interface EntityEntrypublic EntityEntryExtraState getExtraState(@NonNull java.lang.Class<?> extraStateType)
getExtraState in interface EntityEntry@NonNull public java.util.Collection<EntityEntryExtraState> getAllExtraState()
getAllExtraState in interface EntityEntry