public interface EntityEntry
Modifier and Type | Method and Description |
---|---|
void |
addExtraState(EntityEntryExtraState extraState) |
void |
forceLocked(java.lang.Object entity,
java.lang.Object nextVersion) |
java.lang.Object[] |
getDeletedState() |
EntityKey |
getEntityKey()
Get the EntityKey based on this EntityEntry.
|
java.lang.String |
getEntityName() |
<T extends EntityEntryExtraState> |
getExtraState(java.lang.Class<T> extraStateType) |
java.io.Serializable |
getId() |
java.lang.Object[] |
getLoadedState() |
java.lang.Object |
getLoadedValue(java.lang.String propertyName) |
LockMode |
getLockMode() |
EntityPersister |
getPersister() |
java.lang.Object |
getRowId() |
Status |
getStatus() |
java.lang.Object |
getVersion() |
boolean |
isBeingReplicated() |
boolean |
isExistsInDatabase() |
boolean |
isModifiableEntity()
Can the entity be modified?
The entity is modifiable if all of the following are true:
the entity class is mutable
the entity is not read-only
if the current status is Status.DELETED, then the entity was not read-only when it was deleted
|
boolean |
isNullifiable(boolean earlyInsert,
SharedSessionContractImplementor session) |
boolean |
isReadOnly() |
void |
overwriteLoadedStateCollectionValue(java.lang.String propertyName,
PersistentCollection collection) |
void |
postDelete()
After actually deleting a row, record the fact that the instance no longer
exists in the database
|
void |
postInsert(java.lang.Object[] insertedState)
After actually inserting a row, record the fact that the instance exists on the
database (needed for identity-column key generation)
|
void |
postUpdate(java.lang.Object entity,
java.lang.Object[] updatedState,
java.lang.Object nextVersion)
Handle updating the internal state of the entry after actually performing
the database update.
|
boolean |
requiresDirtyCheck(java.lang.Object entity)
Not sure this is the best method name, but the general idea here is to return
true if the entity can
possibly be dirty. |
void |
serialize(java.io.ObjectOutputStream oos)
Custom serialization routine used during serialization of a
Session/PersistenceContext for increased performance.
|
void |
setDeletedState(java.lang.Object[] deletedState) |
void |
setLockMode(LockMode lockMode) |
void |
setReadOnly(boolean readOnly,
java.lang.Object entity) |
void |
setStatus(Status status) |
java.lang.String |
toString() |
LockMode getLockMode()
void setLockMode(LockMode lockMode)
Status getStatus()
void setStatus(Status status)
java.io.Serializable getId()
java.lang.Object[] getLoadedState()
java.lang.Object getLoadedValue(java.lang.String propertyName)
void overwriteLoadedStateCollectionValue(java.lang.String propertyName, PersistentCollection collection)
java.lang.Object[] getDeletedState()
void setDeletedState(java.lang.Object[] deletedState)
boolean isExistsInDatabase()
java.lang.Object getVersion()
EntityPersister getPersister()
EntityKey getEntityKey()
java.lang.IllegalStateException
- if getId() is nulljava.lang.String getEntityName()
boolean isBeingReplicated()
java.lang.Object getRowId()
void postUpdate(java.lang.Object entity, java.lang.Object[] updatedState, java.lang.Object nextVersion)
entity
- The entity instanceupdatedState
- The state calculated after the update (becomes the
new loaded state
.nextVersion
- The new version.void postDelete()
void postInsert(java.lang.Object[] insertedState)
boolean isNullifiable(boolean earlyInsert, SharedSessionContractImplementor session)
boolean requiresDirtyCheck(java.lang.Object entity)
true
if the entity can
possibly be dirty. This can only be the case if it is in a modifiable state (not read-only/deleted) and it
either has mutable properties or field-interception is not telling us it is dirty. Clear as mud? :/
A name like canPossiblyBeDirty might be betterentity
- The entity to testtrue
indicates that the entity could possibly be dirty and that dirty check
should happen; false
indicates there is no way the entity can be dirtyboolean isModifiableEntity()
void forceLocked(java.lang.Object entity, java.lang.Object nextVersion)
boolean isReadOnly()
void setReadOnly(boolean readOnly, java.lang.Object entity)
java.lang.String toString()
toString
in class java.lang.Object
void serialize(java.io.ObjectOutputStream oos) throws java.io.IOException
oos
- The stream to which we should write the serial data.java.io.IOException
- If a stream error occursvoid addExtraState(EntityEntryExtraState extraState)
<T extends EntityEntryExtraState> T getExtraState(java.lang.Class<T> extraStateType)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.