org.hibernate.action

Class EntityAction

Implemented Interfaces:
Comparable, Executable, Serializable
Known Direct Subclasses:
EntityDeleteAction, EntityIdentityInsertAction, EntityInsertAction, EntityUpdateAction

public abstract class EntityAction
extends java.lang.Object
implements Executable, Serializable, Comparable

Base class for actions relating to insert/update/delete of an entity instance.
Author:
Gavin King

Constructor Summary

EntityAction(SessionImplementor session, Serializable id, Object instance, EntityPersister persister)
Instantiate an action.

Method Summary

void
beforeExecutions()
int
compareTo(Object other)
String
getEntityName()
entity name accessor
Serializable
getId()
entity id accessor
Object
getInstance()
entity instance accessor
EntityPersister
getPersister()
entity persister accessor
Serializable[]
getPropertySpaces()
SessionImplementor
getSession()
originating session accessor
boolean
hasAfterTransactionCompletion()
protected abstract boolean
hasPostCommitEventListeners()
String
toString()

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 entity
instance - The entiyt instance
persister - The entity persister

Method Details

beforeExecutions

public void beforeExecutions()
Specified by:
beforeExecutions in interface Executable

compareTo

public int compareTo(Object other)

getEntityName

public String getEntityName()
entity name accessor
Returns:
The entity name

getId

public final Serializable getId()
entity id accessor
Returns:
The entity id

getInstance

public final Object getInstance()
entity instance accessor
Returns:
The entity instance

getPersister

public final EntityPersister getPersister()
entity persister accessor
Returns:
The entity persister

getPropertySpaces

public final Serializable[] getPropertySpaces()
Specified by:
getPropertySpaces in interface Executable

getSession

public final SessionImplementor getSession()
originating session accessor
Returns:
The session from which this action originated.

hasAfterTransactionCompletion

public boolean hasAfterTransactionCompletion()
Specified by:
hasAfterTransactionCompletion in interface Executable

hasPostCommitEventListeners

protected abstract boolean hasPostCommitEventListeners()

toString

public String toString()