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<ComparableExecutable>,AfterTransactionCompletionProcess,Executable,ComparableExecutable
The action for performing entity updates.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEntityUpdateAction(Object id, Object[] state, int[] dirtyProperties, boolean hasDirtyCollection, Object[] previousState, Object previousVersion, Object nextVersion, Object instance, Object rowId, EntityPersister persister, EventSource session) Constructs an EntityUpdateAction -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcacheAfterUpdate(EntityDataAccess cache, Object ck, SharedSessionContractImplementor session) voiddoAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session) Perform whatever processing is encapsulated here after completion of the transaction.voidexecute()Execute this action.protected int[]protected NaturalIdMappingprotected Objectprotected Objectprotected Object[]protected ObjectgetRowId()protected Object[]getState()protected voidhandleDeleted(EntityEntry entry) protected voidhandleNaturalIdResolutions(EntityPersister persister, SharedSessionContractImplementor session, Object id) protected booleanprotected booleanprotected ObjectlockCacheItem(Object previousVersion) protected voidpostCommitUpdate(boolean success) protected voidprotected booleanprotected voidsetCacheEntry(Object cacheEntry) protected voidprotected booleanupdateCache(EntityPersister persister, Object previousVersion, Object ck) protected voidupdateCacheItem(Object previousVersion, Object ck, EntityEntry entry) Methods inherited from class org.hibernate.action.internal.EntityAction
afterDeserialize, beforeExecutions, compareTo, eventSource, getAfterTransactionCompletionProcess, getBeforeTransactionCompletionProcess, getDelayedId, getEntityName, getEventListenerGroups, getId, getInstance, getPersister, getPrimarySortClassifier, getPropertySpaces, getSecondarySortIndex, getSession, isVeto, needsAfterTransactionCompletion, setVeto, toString
-
Constructor Details
-
EntityUpdateAction
public EntityUpdateAction(Object id, Object[] state, int[] dirtyProperties, boolean hasDirtyCollection, Object[] previousState, Object previousVersion, Object nextVersion, Object instance, Object rowId, EntityPersister persister, EventSource 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 Details
-
getState
-
getPreviousState
-
getNextVersion
-
getDirtyFields
protected int[] getDirtyFields() -
hasDirtyCollection
protected boolean hasDirtyCollection() -
getNaturalIdMapping
-
getPreviousNaturalIdValues
-
getRowId
-
setLock
-
setCacheEntry
-
execute
Description copied from interface:ExecutableExecute this action.- Throws:
HibernateException- Indicates a problem during execution.
-
updateCacheItem
-
handleDeleted
-
getPreviousVersion
-
lockCacheItem
-
updateCache
-
preUpdate
protected boolean preUpdate() -
postUpdate
protected void postUpdate() -
postCommitUpdate
protected void postCommitUpdate(boolean success) -
hasPostCommitEventListeners
protected boolean hasPostCommitEventListeners()- Specified by:
hasPostCommitEventListenersin classEntityAction
-