public final class EntityEntry extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
void |
forceLocked(Object entity,
Object nextVersion) |
Object[] |
getDeletedState() |
EntityKey |
getEntityKey()
Get the EntityKey based on this EntityEntry.
|
String |
getEntityName() |
Serializable |
getId() |
Object[] |
getLoadedState() |
Object |
getLoadedValue(String propertyName) |
LockMode |
getLockMode() |
EntityPersister |
getPersister() |
Object |
getRowId() |
Status |
getStatus() |
Object |
getVersion() |
boolean |
isBeingReplicated() |
boolean |
isExistsInDatabase() |
boolean |
isLoadedWithLazyPropertiesUnfetched() |
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,
SessionImplementor session) |
boolean |
isReadOnly() |
void |
postDelete()
After actually deleting a row, record the fact that the instance no longer
exists in the database
|
void |
postInsert()
After actually inserting a row, record the fact that the instance exists on the
database (needed for identity-column key generation)
|
void |
postUpdate(Object entity,
Object[] updatedState,
Object nextVersion)
Handle updating the internal state of the entry after actually performing
the database update.
|
boolean |
requiresDirtyCheck(Object entity) |
void |
setDeletedState(Object[] deletedState) |
void |
setLockMode(LockMode lockMode) |
void |
setReadOnly(boolean readOnly,
Object entity) |
void |
setStatus(Status status) |
String |
toString() |
public LockMode getLockMode()
public void setLockMode(LockMode lockMode)
public Status getStatus()
public void setStatus(Status status)
public Serializable getId()
public Object[] getLoadedState()
public Object[] getDeletedState()
public void setDeletedState(Object[] deletedState)
public boolean isExistsInDatabase()
public Object getVersion()
public EntityPersister getPersister()
public EntityKey getEntityKey()
IllegalStateException
- if getId() is nullpublic String getEntityName()
public boolean isBeingReplicated()
public Object getRowId()
public void postUpdate(Object entity, Object[] updatedState, Object nextVersion)
entity
- The entity instanceupdatedState
- The state calculated after the update (becomes the
new loaded state
.nextVersion
- The new version.public void postDelete()
public void postInsert()
public boolean isNullifiable(boolean earlyInsert, SessionImplementor session)
public boolean requiresDirtyCheck(Object entity)
public boolean isModifiableEntity()
public boolean isReadOnly()
public void setReadOnly(boolean readOnly, Object entity)
public boolean isLoadedWithLazyPropertiesUnfetched()
Copyright © 2002-2015 Red Hat Middleware, LLC. All Rights Reserved