protected static class KeyValueEntity.KeyValueEntityEntry extends BaseEntityEntry
DETACHED, entityValuesProviders, extraStateMap, MANAGED, NEW, PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY, propertyChangeListeners, REMOVED, securityState, source, state
Constructor and Description |
---|
KeyValueEntityEntry(Entity source) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getAttributeValue(java.lang.String name) |
java.lang.Object |
getEntityId() |
java.lang.Object |
getGeneratedIdOrNull()
GeneratedId will be determined at enhancing time as follows:
primary key (
Id , EmbeddedId or JmixId attribute) will be used if it has JmixGeneratedValue annotation,
any other UUID JmixGeneratedValue property will be chosen if primary key doesn't have JmixGeneratedValue annotation,
primary key or some synthetic id will be used if there is no JmixGeneratedValue satisfiyng conditions below (see EntityEntry implementations for details).
This algorithm used for BaseEntityEntry and NullableIdEntityEntry . |
void |
setAttributeValue(java.lang.String name,
java.lang.Object value,
boolean checkEquals) |
void |
setEntityId(java.lang.Object id) |
void |
setGeneratedId(java.lang.Object id)
GeneratedId needed to identify entity, including hashCode calculation (see
EntityInternals.hashCode(Entity) ). |
addExtraState, addPropertyChangeListener, copy, firePropertyChanged, getAllExtraState, getExtraState, getSecurityState, getSource, hashCode, isDetached, isManaged, isNew, isRemoved, removeAllListeners, removePropertyChangeListener, setDetached, setManaged, setNew, setRemoved, setSecurityState
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getGeneratedId, isEmbeddable, setAttributeValue
public KeyValueEntityEntry(Entity source)
public java.lang.Object getEntityId()
public void setEntityId(java.lang.Object id)
public java.lang.Object getGeneratedIdOrNull()
EntityEntry
Id
, EmbeddedId
or JmixId
attribute) will be used if it has JmixGeneratedValue
annotation,JmixGeneratedValue
property will be chosen if primary key doesn't have JmixGeneratedValue
annotation, JmixGeneratedValue
satisfiyng conditions below (see EntityEntry
implementations for details).BaseEntityEntry
and NullableIdEntityEntry
. See implementing classes description to clarify whether each of them will be used
(directly or through subclass creation during enhancing process)public void setGeneratedId(java.lang.Object id)
EntityEntry
EntityInternals.hashCode(Entity)
).
Thus it has to be copied at the very beginning of entity copy creation.public <T> T getAttributeValue(@NonNull java.lang.String name)
getAttributeValue
in interface EntityEntry
getAttributeValue
in class BaseEntityEntry
public void setAttributeValue(@NonNull java.lang.String name, java.lang.Object value, boolean checkEquals)
setAttributeValue
in interface EntityEntry
setAttributeValue
in class BaseEntityEntry