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<ComparableEntityAction>,ComparableEntityAction,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, 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 SoftLockgetLock()protected ObjectgetNaturalIdValues()Object[]getState()ObjectgetVersion()protected booleanhasPostCommitEventListeners()booleanisCascadeDeleteEnabled()protected voidpostCommitDelete(boolean success)protected voidpostDelete()protected booleanpreDelete()protected voidsetLock(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, 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.
-
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
-
-