Package org.hibernate.action
Class EntityAction
java.lang.Object
org.hibernate.action.EntityAction
- All Implemented Interfaces:
Serializable,Comparable,AfterTransactionCompletionProcess,Executable
- Direct Known Subclasses:
EntityDeleteAction,EntityIdentityInsertAction,EntityInsertAction,EntityUpdateAction
public abstract class EntityAction
extends Object
implements Executable, Serializable, Comparable, AfterTransactionCompletionProcess
Base class for actions relating to insert/update/delete of an entity
instance.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEntityAction(SessionImplementor session, Serializable id, Object instance, EntityPersister persister) Instantiate an action. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled before executing any actions.intGet the after-transaction-completion process, if any, for this action.Get the before-transaction-completion process, if any, for this action.entity name accessorfinal SerializablegetId()entity id accessorfinal Objectentity instance accessorfinal EntityPersisterentity persister accessorfinal Serializable[]What spaces (tables) are affected by this action?final SessionImplementororiginating session accessorprotected abstract booleanbooleantoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.action.AfterTransactionCompletionProcess
doAfterTransactionCompletionMethods inherited from interface org.hibernate.action.Executable
execute
-
Constructor Details
-
EntityAction
protected EntityAction(SessionImplementor session, Serializable id, Object instance, EntityPersister persister) Instantiate an action.- Parameters:
session- The session from which this action is coming.id- The id of the entityinstance- The entiyt instancepersister- The entity persister
-
-
Method Details
-
getBeforeTransactionCompletionProcess
Description copied from interface:ExecutableGet the before-transaction-completion process, if any, for this action.- Specified by:
getBeforeTransactionCompletionProcessin interfaceExecutable- Returns:
- The before-transaction-completion process, or null if we have no before-transaction-completion process
-
getAfterTransactionCompletionProcess
Description copied from interface:ExecutableGet the after-transaction-completion process, if any, for this action.- Specified by:
getAfterTransactionCompletionProcessin interfaceExecutable- Returns:
- The after-transaction-completion process, or null if we have no after-transaction-completion process
-
hasPostCommitEventListeners
protected abstract boolean hasPostCommitEventListeners() -
needsAfterTransactionCompletion
public boolean needsAfterTransactionCompletion() -
getEntityName
entity name accessor- Returns:
- The entity name
-
getId
entity id accessor- Returns:
- The entity id
-
getInstance
entity instance accessor- Returns:
- The entity instance
-
getSession
originating session accessor- Returns:
- The session from which this action originated.
-
getPersister
entity persister accessor- Returns:
- The entity persister
-
getPropertySpaces
Description copied from interface:ExecutableWhat spaces (tables) are affected by this action?- Specified by:
getPropertySpacesin interfaceExecutable- Returns:
- The spaces affected by this action.
-
beforeExecutions
public void beforeExecutions()Description copied from interface:ExecutableCalled before executing any actions. Gives actions a chance to perform any preparation.- Specified by:
beforeExecutionsin interfaceExecutable
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable
-