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 void
doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session)
Perform whatever processing is encapsulated here after completion of the transaction.void
execute()
Execute this action.protected Object
getCurrentVersion()
protected SoftLock
getLock()
protected Object
getNaturalIdValues()
Object[]
getState()
Object
getVersion()
protected boolean
hasPostCommitEventListeners()
boolean
isCascadeDeleteEnabled()
protected Object
lockCacheItem()
protected void
postCommitDelete(boolean success)
protected void
postDelete()
protected void
postDeleteLoaded(Object id, EntityPersister persister, SharedSessionContractImplementor session, Object instance, Object ck)
protected void
postDeleteUnloaded(Object id, EntityPersister persister, SharedSessionContractImplementor session, Object ck)
protected boolean
preDelete()
protected void
removeCacheItem(Object ck)
protected void
setLock(SoftLock lock)
protected void
unlockCacheItem()
-
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 HibernateException
Description copied from interface:Executable
Execute 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 HibernateException
Description copied from interface:AfterTransactionCompletionProcess
Perform 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:
hasPostCommitEventListeners
in classEntityAction
-
lockCacheItem
protected Object lockCacheItem()
-
unlockCacheItem
protected void unlockCacheItem()
-
removeCacheItem
protected void removeCacheItem(Object ck)
-
-