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 TypeMethodDescriptionvoiddoAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session) Perform whatever processing is encapsulated here after completion of the transaction.voidexecute()Execute this action.protected Objectprotected SoftLockgetLock()protected ObjectObject[]getState()protected booleanbooleanprotected Objectprotected voidpostCommitDelete(boolean success) protected voidprotected voidpostDeleteLoaded(Object id, EntityPersister persister, SharedSessionContractImplementor session, Object instance, Object ck) protected voidpostDeleteUnloaded(Object id, EntityPersister persister, SharedSessionContractImplementor session, Object ck) protected booleanprotected voidprotected voidprotected voidMethods inherited from class org.hibernate.action.internal.EntityAction
afterDeserialize, beforeExecutions, compareTo, eventSource, getAfterTransactionCompletionProcess, getBeforeTransactionCompletionProcess, getDelayedId, getEntityName, getEventListenerGroups, 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:ExecutableExecute 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:
hasPostCommitEventListenersin classEntityAction
-
lockCacheItem
-
unlockCacheItem
protected void unlockCacheItem() -
removeCacheItem
-