public abstract class NullableIdEntityEntry extends BaseEntityEntry
NullableIdEntityEntry
will be created for entity that:
Id
, EmbeddedId
or JmixId
)JmixGeneratedValue
UUID
attribute annotated with JmixGeneratedValue
DETACHED, entityValuesProviders, extraStateMap, MANAGED, NEW, PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY, propertyChangeListeners, REMOVED, securityState, source, state
Constructor and Description |
---|
NullableIdEntityEntry(Entity source) |
Modifier and Type | Method and Description |
---|---|
void |
copy(EntityEntry entry)
Copies the state of entity entry.
|
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 . |
int |
hashCode() |
void |
setGeneratedId(java.lang.Object id)
GeneratedId needed to identify entity, including hashCode calculation (see
EntityInternals.hashCode(Entity) ). |
addExtraState, addPropertyChangeListener, firePropertyChanged, getAllExtraState, getAttributeValue, getExtraState, getSecurityState, getSource, isDetached, isManaged, isNew, isRemoved, removeAllListeners, removePropertyChangeListener, setAttributeValue, setDetached, setManaged, setNew, setRemoved, setSecurityState
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getEntityId, getGeneratedId, isEmbeddable, setAttributeValue, setEntityId
public NullableIdEntityEntry(Entity source)
public int hashCode()
hashCode
in class BaseEntityEntry
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 void copy(EntityEntry entry)
EntityEntry
copy
in interface EntityEntry
copy
in class BaseEntityEntry