Package io.jmix.core.entity
Class NullableIdEntityEntry
java.lang.Object
io.jmix.core.entity.BaseEntityEntry
io.jmix.core.entity.NullableIdEntityEntry
- All Implemented Interfaces:
EntityEntry
,Serializable
,Cloneable
Used by enhancing process. Subclass of
NullableIdEntityEntry
will be created for entity that:
- has primary key (an attribute annotated with
Id
,EmbeddedId
orJmixId
) - Primary key is not annotated with
JmixGeneratedValue
- There is no
UUID
attribute annotated withJmixGeneratedValue
- See Also:
-
Field Summary
Fields inherited from class io.jmix.core.entity.BaseEntityEntry
DETACHED, entityValuesProviders, extraStateMap, loadedProperties, MANAGED, NEW, PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY, propertyChangeListeners, REMOVED, securityState, source, state, WEAK_PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY, weakPropertyChangeListeners
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(EntityEntry entry) Copies the state of entity entry.GeneratedId will be determined at enhancing time as follows: primary key (Id
,EmbeddedId
orJmixId
attribute) will be used if it hasJmixGeneratedValue
annotation, any other UUIDJmixGeneratedValue
property will be chosen if primary key doesn't haveJmixGeneratedValue
annotation, primary key or some synthetic id will be used if there is noJmixGeneratedValue
satisfiyng conditions below (seeEntityEntry
implementations for details).
This algorithm used forBaseEntityEntry
andNullableIdEntityEntry
.int
hashCode()
void
setGeneratedId
(Object id) GeneratedId needed to identify entity, including hashCode calculation (seeEntityInternals.hashCode(Entity)
).Methods inherited from class io.jmix.core.entity.BaseEntityEntry
addExtraState, addPropertyChangeListener, addPropertyChangeListener, firePropertyChanged, getAllExtraState, getAttributeValue, getExtraState, getLoadedProperties, getSecurityState, getSource, isDetached, isManaged, isNew, isRemoved, removeAllListeners, removePropertyChangeListener, setAttributeValue, setDetached, setLoadedProperties, setManaged, setNew, setRemoved, setSecurityState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.core.EntityEntry
getEntityId, getGeneratedId, isEmbeddable, setAttributeValue, setEntityId
-
Constructor Details
-
NullableIdEntityEntry
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBaseEntityEntry
-
getGeneratedIdOrNull
Description copied from interface:EntityEntry
GeneratedId will be determined at enhancing time as follows:- primary key (
Id
,EmbeddedId
orJmixId
attribute) will be used if it hasJmixGeneratedValue
annotation, - any other UUID
JmixGeneratedValue
property will be chosen if primary key doesn't haveJmixGeneratedValue
annotation, - primary key or some synthetic id will be used if there is no
JmixGeneratedValue
satisfiyng conditions below (seeEntityEntry
implementations for details).
This algorithm used forBaseEntityEntry
andNullableIdEntityEntry
. See implementing classes description to clarify whether each of them will be used (directly or through subclass creation during enhancing process) - primary key (
-
setGeneratedId
Description copied from interface:EntityEntry
GeneratedId needed to identify entity, including hashCode calculation (seeEntityInternals.hashCode(Entity)
). Thus it has to be copied at the very beginning of entity copy creation. -
copy
Description copied from interface:EntityEntry
Copies the state of entity entry.- Specified by:
copy
in interfaceEntityEntry
- Overrides:
copy
in classBaseEntityEntry
-