EntityEntry.
| Modifier and Type | Class and Description |
|---|---|
| protected static enum | AbstractEntityEntry.BooleanState
Represents a boolean flag stored within a number value, using one bit at a specified offset. |
| protected static class | AbstractEntityEntry.EnumState<E extends Enum
Represents an enum value stored within a number value, using four bits starting at a specified offset. |
| Modifier and Type | Field and Description |
|---|---|
| protected transient EntityKey | |
| private transient int | compressedState
Holds several boolean and enum typed attributes in a very compact manner. |
| protected final Object | |
| protected Object[] | |
| protected EntityEntryExtraState | |
| protected final transient PersistenceContext | |
| protected final EntityPersister | |
| protected final transient Object | |
| protected Object |
| Access | Constructor and Description |
|---|---|
| public | AbstractEntityEntry(final Status status, final Object[] loadedState, final Object rowId, final Object id, final Object version, final LockMode lockMode, final boolean existsInDatabase, final EntityPersister persister, final boolean disableVersionIncrement, final PersistenceContext persistenceContext)
|
| protected | AbstractEntityEntry(final SessionFactoryImplementor factory, final String entityName, final Object id, final Status status, final Status previousStatus, final Object[] loadedState, final Object[] deletedState, final Object version, final LockMode lockMode, final boolean existsInDatabase, final boolean isBeingReplicated, final PersistenceContext persistenceContext)
Deprecated
as a consequence of
This for is used during custom deserialization handling
SessionFactoryImplementor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addExtraState(EntityEntryExtraState extraState)
Implements org. |
| private static void | |
| public void | forceLocked(Object entity, Object nextVersion)
Implements org. |
| protected <E extends Enum | Returns: the current value of the specified propertyidentifies the value to store stateGets the current value of the given enum property. |
| protected boolean | Returns: the current value of the specified flagidentifies the value to store stateGets the current value of the given boolean flag. |
| public Object[] | |
| public EntityKey | getEntityKey()
Implements org. EntityKey for this entry.
|
| public String | |
| public <T extends EntityEntryExtraState> T | getExtraState(Class<T> extraStateType)
Implements org. |
| public final Object | |
| public final Object[] | |
| public Object | |
| public LockMode | |
| public PersistenceContext | |
| public final EntityPersister | |
| private Status | |
| public Object | |
| public Status | |
| public final Object | |
| public boolean | |
| public boolean | |
| public boolean | isModifiableEntity()
Implements org. |
| public boolean | isNullifiable(boolean earlyInsert, SharedSessionContractImplementor session)
Implements org. |
| public boolean | |
| private boolean | |
| public void | overwriteLoadedStateCollectionValue(String propertyName, PersistentCollection<?> collection)
Implements org. |
| public void | postDelete()
Implements org. |
| public void | |
| public void | postInsert(Object[] insertedState)
Implements org. |
| public void | postUpdate(Object
The entity instance entity, Object[] The state calculated after the update (becomes the
new updatedState, Object loaded state.The new version. nextVersion)Implements org. |
| private int | |
| public boolean | requiresDirtyCheck(Object
The entity to test entity)Implements org. true if the entity can possibly be dirty.
|
| public void | serialize(ObjectOutputStream
The stream to which we should write the serial data. oos)Implements org. Session/PersistenceContext for increased
performance.
|
| protected <E extends Enum | setCompressedValue(AbstractEntityEntry.
identifies the value to store state,the value to store; The caller must make sure that it matches
the given identifier value)Saves the value for the given enum property. |
| protected void | setCompressedValue(AbstractEntityEntry.
identifies the value to store state,the value to store value)Saves the value for the given boolean flag. |
| public void | setDeletedState(Object[] deletedState)
Implements org. |
| public void | |
| public void | setReadOnly(boolean readOnly, Object entity)
Implements org. |
| public void | |
| public String | toString()
Overrides java. Implements org. |
| cachedEntityKey | back to summary |
|---|---|
| protected transient EntityKey cachedEntityKey | |
| compressedState | back to summary |
|---|---|
| private transient int compressedState Holds several boolean and enum typed attributes in a very compact manner. Enum values are stored in 4 bits
(where 0 represents The value is structured as follows: 1 - Lock mode 2 - Status 3 - Previous Status 4 - existsInDatabase 5 - isBeingReplicated 6 - loadedWithLazyPropertiesUnfetched; NOTE: this is not updated when properties are fetched lazily! 0000 0000 | 0000 0000 | 0654 3333 | 2222 1111
Use Representing enum values by their ordinal value is acceptable for our case as this value itself is never serialized or deserialized and thus is not affected should ordinal values change. | |
| id | back to summary |
|---|---|
| protected final Object id | |
| loadedState | back to summary |
|---|---|
| protected Object[] loadedState | |
| next | back to summary |
|---|---|
| protected EntityEntryExtraState next | |
| persistenceContext | back to summary |
|---|---|
| protected final transient PersistenceContext persistenceContext | |
| persister | back to summary |
|---|---|
| protected final EntityPersister persister | |
| rowId | back to summary |
|---|---|
| protected final transient Object rowId | |
| version | back to summary |
|---|---|
| protected Object version | |
| AbstractEntityEntry | back to summary |
|---|---|
| public AbstractEntityEntry(final Status status, final Object[] loadedState, final Object rowId, final Object id, final Object version, final LockMode lockMode, final boolean existsInDatabase, final EntityPersister persister, final boolean disableVersionIncrement, final PersistenceContext persistenceContext) | |
| AbstractEntityEntry | back to summary |
|---|---|
| protected AbstractEntityEntry(final SessionFactoryImplementor factory, final String entityName, final Object id, final Status status, final Status previousStatus, final Object[] loadedState, final Object[] deletedState, final Object version, final LockMode lockMode, final boolean existsInDatabase, final boolean isBeingReplicated, final PersistenceContext persistenceContext)
Deprecated as a consequence of This for is used during custom deserialization handling | |
| addExtraState | back to summary |
|---|---|
| public void addExtraState(EntityEntryExtraState extraState) Implements org.
| |
| clearDirtyAttributes | back to summary |
|---|---|
| private static void clearDirtyAttributes(final SelfDirtinessTracker entity) | |
| forceLocked | back to summary |
|---|---|
| public void forceLocked(Object entity, Object nextVersion) Implements org.
| |
| getCompressedValue | back to summary |
|---|---|
| protected <E extends Enum Gets the current value of the given enum property.
| |
| getCompressedValue | back to summary |
|---|---|
| protected boolean getCompressedValue(AbstractEntityEntry. Gets the current value of the given boolean flag.
| |
| getDeletedState | back to summary |
|---|---|
| public Object[] getDeletedState() Implements org.
| |
| getEntityKey | back to summary |
|---|---|
| public EntityKey getEntityKey() Implements org. Doc from org. Get the | |
| getEntityName | back to summary |
|---|---|
| public String getEntityName() Implements org.
| |
| getExtraState | back to summary |
|---|---|
| public <T extends EntityEntryExtraState> T getExtraState(Class<T> extraStateType) Implements org.
| |
| getId | back to summary |
|---|---|
| public final Object getId() Implements org.
| |
| getLoadedState | back to summary |
|---|---|
| public final Object[] getLoadedState() Implements org.
| |
| getLoadedValue | back to summary |
|---|---|
| public Object getLoadedValue(String propertyName) Implements org.
| |
| getLockMode | back to summary |
|---|---|
| public LockMode getLockMode() Implements org.
| |
| getPersistenceContext | back to summary |
|---|---|
| public PersistenceContext getPersistenceContext() | |
| getPersister | back to summary |
|---|---|
| public final EntityPersister getPersister() Implements org.
| |
| getPreviousStatus | back to summary |
|---|---|
| private Status getPreviousStatus() | |
| getRowId | back to summary |
|---|---|
| public Object getRowId() Implements org.
| |
| getStatus | back to summary |
|---|---|
| public Status getStatus() Implements org.
| |
| getVersion | back to summary |
|---|---|
| public final Object getVersion() Implements org.
| |
| isBeingReplicated | back to summary |
|---|---|
| public boolean isBeingReplicated() Implements org.
| |
| isExistsInDatabase | back to summary |
|---|---|
| public boolean isExistsInDatabase() Implements org.
| |
| isModifiableEntity | back to summary |
|---|---|
| public boolean isModifiableEntity() Implements org. Doc from org. Can the entity be modified? The entity is modifiable if all the following are true:
| |
| isNullifiable | back to summary |
|---|---|
| public boolean isNullifiable(boolean earlyInsert, SharedSessionContractImplementor session) Implements org.
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Implements org.
| |
| isUnequivocallyNonDirty | back to summary |
|---|---|
| private boolean isUnequivocallyNonDirty(Object entity) | |
| overwriteLoadedStateCollectionValue | back to summary |
|---|---|
| public void overwriteLoadedStateCollectionValue(String propertyName, PersistentCollection<?> collection) Implements org.
| |
| postDelete | back to summary |
|---|---|
| public void postDelete() Implements org. Doc from org. After actually deleting a row, record the fact that the instance no longer exists in the database.
| |
| postInsert | back to summary |
|---|---|
| public void postInsert(Object version) Implements org.
| |
| postInsert | back to summary |
|---|---|
| public void postInsert(Object[] insertedState) Implements org. Doc from org. After actually inserting a row, record the fact that the instance exists in the database (needed for identity column key generation).
| |
| postUpdate | back to summary |
|---|---|
| public void postUpdate(Object entity, Object[] updatedState, Object nextVersion) Implements org. Doc from org. Handle updating the internal state of the entry after actually performing the database update. Specifically, we update the snapshot information and escalate the lock mode.
| |
| propertyIndex | back to summary |
|---|---|
| private int propertyIndex(String propertyName) | |
| requiresDirtyCheck | back to summary |
|---|---|
| public boolean requiresDirtyCheck(Object entity) Implements org. Doc from org. Returns | |
| serialize | back to summary |
|---|---|
| public void serialize(ObjectOutputStream oos) throws IOException Implements org. Doc from org. Custom serialization routine used during serialization of a
| |
| setCompressedValue | back to summary |
|---|---|
| protected <E extends Enum Saves the value for the given enum property.
| |
| setCompressedValue | back to summary |
|---|---|
| protected void setCompressedValue(AbstractEntityEntry. Saves the value for the given boolean flag.
| |
| setDeletedState | back to summary |
|---|---|
| public void setDeletedState(Object[] deletedState) Implements org.
| |
| setLockMode | back to summary |
|---|---|
| public void setLockMode(LockMode lockMode) Implements org.
| |
| setReadOnly | back to summary |
|---|---|
| public void setReadOnly(boolean readOnly, Object entity) Implements org.
| |
| setStatus | back to summary |
|---|---|
| public void setStatus(Status status) Implements org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements org. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final AbstractEntityEntry. | |
| public static final AbstractEntityEntry. | |
| private final int | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| private int | |
| public static AbstractEntityEntry. | |
| public static AbstractEntityEntry. |
| EXISTS_IN_DATABASE | back to summary |
|---|---|
| public static final AbstractEntityEntry. | |
| IS_BEING_REPLICATED | back to summary |
|---|---|
| public static final AbstractEntityEntry. | |
| mask | back to summary |
|---|---|
| private final int mask | |
| offset | back to summary |
|---|---|
| private final int offset | |
| unsetMask | back to summary |
|---|---|
| private final int unsetMask | |
| BooleanState | back to summary |
|---|---|
| private BooleanState(int offset) | |
| getMask | back to summary |
|---|---|
| private int getMask() Returns the bit mask for reading this flag from the number value storing it. | |
| getOffset | back to summary |
|---|---|
| private int getOffset() Returns the offset within the number value at which this boolean flag is stored. | |
| getUnsetMask | back to summary |
|---|---|
| private int getUnsetMask() Returns the bit mask for resetting this flag from the number value storing it. | |
| getValue | back to summary |
|---|---|
| private int getValue(boolean value) | |
| valueOf | back to summary |
|---|---|
| public static AbstractEntityEntry. | |
| values | back to summary |
|---|---|
| public static AbstractEntityEntry. | |
| Modifier and Type | Field and Description |
|---|---|
| protected final E[] | |
| protected static final AbstractEntityEntry. | |
| protected final int | |
| protected final int | |
| protected static final AbstractEntityEntry. | |
| protected static final AbstractEntityEntry. | |
| protected final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private E[] | getEnumConstants()
Returns the constants of the represented enum which is cached for performance reasons. |
| private int | |
| private int | |
| private int | |
| private int |
| enumConstants | back to summary |
|---|---|
| protected final E[] enumConstants | |
| LOCK_MODE | back to summary |
|---|---|
| protected static final AbstractEntityEntry. | |
| mask | back to summary |
|---|---|
| protected final int mask | |
| offset | back to summary |
|---|---|
| protected final int offset | |
| PREVIOUS_STATUS | back to summary |
|---|---|
| protected static final AbstractEntityEntry. | |
| STATUS | back to summary |
|---|---|
| protected static final AbstractEntityEntry. | |
| unsetMask | back to summary |
|---|---|
| protected final int unsetMask | |
| EnumState | back to summary |
|---|---|
| private EnumState(int offset, Class<E> enumType) | |
| getEnumConstants | back to summary |
|---|---|
| private E[] getEnumConstants() Returns the constants of the represented enum which is cached for performance reasons. | |
| getMask | back to summary |
|---|---|
| private int getMask() Returns the bit mask for reading this enum value from the number value storing it. | |
| getOffset | back to summary |
|---|---|
| private int getOffset() Returns the offset within the number value at which this enum value is stored. | |
| getUnsetMask | back to summary |
|---|---|
| private int getUnsetMask() Returns the bit mask for resetting this enum value from the number value storing it. | |
| getValue | back to summary |
|---|---|
| private int getValue(E value) Returns the numeric value to be stored for the given enum value. | |