Package org.hibernate.action.internal
Class EntityUpdateAction
- java.lang.Object
-
- org.hibernate.action.internal.EntityAction
-
- org.hibernate.action.internal.EntityUpdateAction
-
- All Implemented Interfaces:
Serializable,Comparable<EntityAction>,AfterTransactionCompletionProcess,Executable
public class EntityUpdateAction extends EntityAction
The action for performing entity updates.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EntityUpdateAction(Object id, Object[] state, int[] dirtyProperties, boolean hasDirtyCollection, Object[] previousState, Object previousVersion, Object nextVersion, Object instance, Object rowId, EntityPersister persister, SharedSessionContractImplementor session)Constructs an EntityUpdateAction
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancacheAfterUpdate(EntityDataAccess cache, Object ck)protected booleancacheUpdate(EntityPersister persister, Object previousVersion, Object ck)voiddoAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session)Perform whatever processing is encapsulated here after completion of the transaction.voidexecute()Execute this action.Object[]getPreviousState()ObjectgetRowId()Object[]getState()protected booleanhasPostCommitEventListeners()protected voidpostCommitUpdate(boolean success)protected voidpostUpdate()protected booleanpreUpdate()-
Methods inherited from class org.hibernate.action.internal.EntityAction
afterDeserialize, beforeExecutions, compareTo, eventSource, getAfterTransactionCompletionProcess, getBeforeTransactionCompletionProcess, getDelayedId, getEntityName, getFastSessionServices, getId, getInstance, getPersister, getPropertySpaces, getSession, isVeto, needsAfterTransactionCompletion, setVeto, toString
-
-
-
-
Constructor Detail
-
EntityUpdateAction
public EntityUpdateAction(Object id, Object[] state, int[] dirtyProperties, boolean hasDirtyCollection, Object[] previousState, Object previousVersion, Object nextVersion, Object instance, Object rowId, EntityPersister persister, SharedSessionContractImplementor session)
Constructs an EntityUpdateAction- Parameters:
id- The entity identifierstate- The current (extracted) entity statedirtyProperties- The indexes (in reference to state) properties with dirty statehasDirtyCollection- Were any collections dirty?previousState- The previous (stored) statepreviousVersion- The previous (stored) versionnextVersion- The incremented versioninstance- The entity instancerowId- The entity's row idpersister- The entity's persistersession- The session
-
-
Method Detail
-
getState
public Object[] getState()
-
getPreviousState
public Object[] getPreviousState()
-
getRowId
public Object getRowId()
-
execute
public void execute() throws HibernateExceptionDescription copied from interface:ExecutableExecute this action.- Throws:
HibernateException- Indicates a problem during execution.
-
cacheUpdate
protected boolean cacheUpdate(EntityPersister persister, Object previousVersion, Object ck)
-
preUpdate
protected boolean preUpdate()
-
postUpdate
protected void postUpdate()
-
postCommitUpdate
protected void postCommitUpdate(boolean success)
-
hasPostCommitEventListeners
protected boolean hasPostCommitEventListeners()
- Specified by:
hasPostCommitEventListenersin classEntityAction
-
doAfterTransactionCompletion
public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session) throws CacheExceptionDescription copied from interface:AfterTransactionCompletionProcessPerform whatever processing is encapsulated here after completion of the transaction.- Parameters:
success- Did the transaction complete successfully? True means it did.session- The session on which the transaction is completing.- Throws:
CacheException
-
cacheAfterUpdate
protected boolean cacheAfterUpdate(EntityDataAccess cache, Object ck)
-
-