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<EntityAction>
,AfterTransactionCompletionProcess
,Executable
- 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, SessionImplementor session)
Constructs an EntityDeleteAction.
-
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 SoftLock
getLock()
protected Object
getNaturalIdValues()
Object[]
getState()
Object
getVersion()
protected boolean
hasPostCommitEventListeners()
boolean
isCascadeDeleteEnabled()
protected void
postCommitDelete(boolean success)
protected void
postDelete()
protected boolean
preDelete()
protected void
setLock(SoftLock lock)
-
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
-
EntityDeleteAction
public EntityDeleteAction(Object id, Object[] state, Object version, Object instance, EntityPersister persister, boolean isCascadeDeleteEnabled, SessionImplementor 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
-
-
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.
-
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
-
-