public class EmbeddableEntityEntry extends BaseEntityEntry
Embeddable
entities by enhancing processDETACHED, entityValuesProviders, extraStateMap, MANAGED, NEW, PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY, propertyChangeListeners, REMOVED, securityState, source, state
Constructor and Description |
---|
EmbeddableEntityEntry(Entity source) |
Modifier and Type | Method and Description |
---|---|
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 . |
boolean |
isDetached() |
boolean |
isEmbeddable() |
boolean |
isManaged() |
boolean |
isNew() |
boolean |
isRemoved() |
void |
setDetached(boolean detached) |
void |
setEntityId(java.lang.Object id) |
void |
setGeneratedId(java.lang.Object id)
GeneratedId needed to identify entity, including hashCode calculation (see
EntityInternals.hashCode(Entity) ). |
void |
setManaged(boolean managed) |
void |
setNew(boolean _new) |
void |
setRemoved(boolean removed) |
addExtraState, addPropertyChangeListener, copy, firePropertyChanged, getAllExtraState, getAttributeValue, getExtraState, getSecurityState, getSource, hashCode, removeAllListeners, removePropertyChangeListener, setAttributeValue, setSecurityState
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getGeneratedId, setAttributeValue
public EmbeddableEntityEntry(Entity source)
public boolean isNew()
isNew
in interface EntityEntry
isNew
in class BaseEntityEntry
public boolean isManaged()
isManaged
in interface EntityEntry
isManaged
in class BaseEntityEntry
public boolean isDetached()
isDetached
in interface EntityEntry
isDetached
in class BaseEntityEntry
public boolean isRemoved()
isRemoved
in interface EntityEntry
isRemoved
in class BaseEntityEntry
public void setNew(boolean _new)
setNew
in interface EntityEntry
setNew
in class BaseEntityEntry
public void setManaged(boolean managed)
setManaged
in interface EntityEntry
setManaged
in class BaseEntityEntry
public void setDetached(boolean detached)
setDetached
in interface EntityEntry
setDetached
in class BaseEntityEntry
public void setRemoved(boolean removed)
setRemoved
in interface EntityEntry
setRemoved
in class BaseEntityEntry
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 boolean isEmbeddable()