Package org.hibernate.action.internal
Class EntityDeleteAction
- java.lang.Object
-
- org.hibernate.action.internal.EntityAction
-
- org.hibernate.action.internal.EntityDeleteAction
-
- All Implemented Interfaces:
Serializable,Comparable<ComparableExecutable>,AfterTransactionCompletionProcess,Executable,ComparableExecutable
- Direct Known Subclasses:
OrphanRemovalAction
public class EntityDeleteAction extends EntityAction
The action for performing an entity deletion.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EntityDeleteAction(Object id, Object[] state, Object version, Object instance, EntityPersister persister, boolean isCascadeDeleteEnabled, EventSource session)Constructs an EntityDeleteAction.EntityDeleteAction(Object id, EntityPersister persister, EventSource session)Constructs an EntityDeleteAction for an unloaded proxy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session)Perform whatever processing is encapsulated here after completion of the transaction.voidexecute()Execute this action.protected ObjectgetCurrentVersion()protected SoftLockgetLock()protected ObjectgetNaturalIdValues()Object[]getState()ObjectgetVersion()protected booleanhasPostCommitEventListeners()booleanisCascadeDeleteEnabled()protected ObjectlockCacheItem()protected voidpostCommitDelete(boolean success)protected voidpostDelete()protected voidpostDeleteLoaded(Object id, EntityPersister persister, SharedSessionContractImplementor session, Object instance, Object ck)protected voidpostDeleteUnloaded(Object id, EntityPersister persister, SharedSessionContractImplementor session, Object ck)protected booleanpreDelete()protected voidremoveCacheItem(Object ck)protected voidsetLock(SoftLock lock)protected voidunlockCacheItem()-
Methods inherited from class org.hibernate.action.internal.EntityAction
afterDeserialize, beforeExecutions, compareTo, eventSource, getAfterTransactionCompletionProcess, getBeforeTransactionCompletionProcess, getDelayedId, getEntityName, getFastSessionServices, getId, getInstance, getPersister, getPrimarySortClassifier, getPropertySpaces, getSecondarySortIndex, getSession, isVeto, needsAfterTransactionCompletion, setVeto, toString
-
-
-
-
Constructor Detail
-
EntityDeleteAction
public EntityDeleteAction(Object id, Object[] state, Object version, Object instance, EntityPersister persister, boolean isCascadeDeleteEnabled, EventSource session)
Constructs an EntityDeleteAction.- Parameters:
id- The entity identifierstate- The current (extracted) entity stateversion- The current entity versioninstance- The entity instancepersister- The entity persisterisCascadeDeleteEnabled- Whether cascade delete is enabledsession- The session
-
EntityDeleteAction
public EntityDeleteAction(Object id, EntityPersister persister, EventSource session)
Constructs an EntityDeleteAction for an unloaded proxy.- Parameters:
id- The entity identifierpersister- The entity persistersession- The session
-
-
Method Detail
-
getVersion
public Object getVersion()
-
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled()
-
getState
public Object[] getState()
-
getNaturalIdValues
protected Object getNaturalIdValues()
-
getLock
protected SoftLock getLock()
-
setLock
protected void setLock(SoftLock lock)
-
execute
public void execute() throws HibernateExceptionDescription copied from interface:ExecutableExecute this action.- Throws:
HibernateException- Indicates a problem during execution.
-
getCurrentVersion
protected Object getCurrentVersion()
-
postDeleteLoaded
protected void postDeleteLoaded(Object id, EntityPersister persister, SharedSessionContractImplementor session, Object instance, Object ck)
-
postDeleteUnloaded
protected void postDeleteUnloaded(Object id, EntityPersister persister, SharedSessionContractImplementor session, Object ck)
-
preDelete
protected boolean preDelete()
-
postDelete
protected void postDelete()
-
postCommitDelete
protected void postCommitDelete(boolean success)
-
doAfterTransactionCompletion
public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session) throws HibernateExceptionDescription 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:
HibernateException
-
hasPostCommitEventListeners
protected boolean hasPostCommitEventListeners()
- Specified by:
hasPostCommitEventListenersin classEntityAction
-
lockCacheItem
protected Object lockCacheItem()
-
unlockCacheItem
protected void unlockCacheItem()
-
removeCacheItem
protected void removeCacheItem(Object ck)
-
-