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
The action for performing an entity deletion.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEntityDeleteAction
(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
Modifier and TypeMethodDescriptionvoid
doAfterTransactionCompletion
(boolean success, SharedSessionContractImplementor session) Perform whatever processing is encapsulated here after completion of the transaction.void
execute()
Execute this action.protected Object
protected SoftLock
getLock()
protected Object
Object[]
getState()
protected boolean
boolean
protected Object
protected void
postCommitDelete
(boolean success) protected void
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
protected void
protected void
protected void
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 Details
-
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
Constructs an EntityDeleteAction for an unloaded proxy.- Parameters:
id
- The entity identifierpersister
- The entity persistersession
- The session
-
-
Method Details
-
getVersion
-
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled() -
getState
-
getNaturalIdValues
-
getLock
-
setLock
-
execute
Description copied from interface:Executable
Execute this action.- Throws:
HibernateException
- Indicates a problem during execution.
-
getCurrentVersion
-
preDelete
protected boolean preDelete() -
postDelete
protected void postDelete() -
postCommitDelete
protected void postCommitDelete(boolean success) -
hasPostCommitEventListeners
protected boolean hasPostCommitEventListeners()- Specified by:
hasPostCommitEventListeners
in classEntityAction
-
lockCacheItem
-
unlockCacheItem
protected void unlockCacheItem() -
removeCacheItem
-