public class NoIdEntityEntry extends BaseEntityEntry
EntityEntry
implementation for model objects without identifiers.JmixEntity
does not include any of annotations:
Id
EmbeddedId
JmixId
Such entities should not be saved in any persistent storage.
DETACHED, entityValuesProviders, extraStateMap, MANAGED, NEW, PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY, propertyChangeListeners, REMOVED, securityState, source, state
Constructor and Description |
---|
NoIdEntityEntry(Entity source) |
Modifier and Type | Method and Description |
---|---|
void |
copy(EntityEntry entry)
Copies the state of entity entry.
|
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 . |
int |
hashCode() |
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, 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
getGeneratedId, isEmbeddable, setAttributeValue
public NoIdEntityEntry(Entity source)
public int hashCode()
hashCode
in class BaseEntityEntry
@Nullable public java.lang.Object getEntityId()
public void setEntityId(@Nullable 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 void copy(EntityEntry entry)
EntityEntry
copy
in interface EntityEntry
copy
in class BaseEntityEntry