Package org.hibernate.action.internal
Class CollectionAction
- java.lang.Object
-
- org.hibernate.action.internal.CollectionAction
-
- All Implemented Interfaces:
Serializable
,Comparable<ComparableExecutable>
,Executable
,ComparableExecutable
- Direct Known Subclasses:
CollectionRecreateAction
,CollectionRemoveAction
,CollectionUpdateAction
,QueuedOperationCollectionAction
public abstract class CollectionAction extends Object implements ComparableExecutable
Any action relating to insert/update/delete of a collection- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CollectionAction(CollectionPersister persister, PersistentCollection<?> collection, Object key, EventSource session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterDeserialize(EventSource session)
Reconnect to session after deserialization...void
beforeExecutions()
Called before executing any actions.int
compareTo(ComparableExecutable o)
protected EventSource
eventSource()
protected void
evict()
AfterTransactionCompletionProcess
getAfterTransactionCompletionProcess()
Get the after-transaction-completion process, if any, for this action.BeforeTransactionCompletionProcess
getBeforeTransactionCompletionProcess()
Get the before-transaction-completion process, if any, for this action.protected PersistentCollection<?>
getCollection()
protected FastSessionServices
getFastSessionServices()
Convenience method for all subclasses.protected Object
getKey()
protected CollectionPersister
getPersister()
String
getPrimarySortClassifier()
This affect sorting order of the executables, when sorting is enabled.String[]
getPropertySpaces()
What spaces (tables) are affected by this action?Object
getSecondarySortIndex()
This affect sorting order of the executables, when sorting is enabled.protected EventSource
getSession()
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.action.spi.Executable
execute
-
-
-
-
Constructor Detail
-
CollectionAction
protected CollectionAction(CollectionPersister persister, PersistentCollection<?> collection, Object key, EventSource session)
-
-
Method Detail
-
getCollection
protected PersistentCollection<?> getCollection()
-
afterDeserialize
public void afterDeserialize(EventSource session)
Reconnect to session after deserialization...- Specified by:
afterDeserialize
in interfaceExecutable
- Parameters:
session
- The session being deserialized
-
beforeExecutions
public final void beforeExecutions() throws CacheException
Description copied from interface:Executable
Called before executing any actions. Gives actions a chance to perform any preparation.- Specified by:
beforeExecutions
in interfaceExecutable
- Throws:
CacheException
-
getBeforeTransactionCompletionProcess
public BeforeTransactionCompletionProcess getBeforeTransactionCompletionProcess()
Description copied from interface:Executable
Get the before-transaction-completion process, if any, for this action.- Specified by:
getBeforeTransactionCompletionProcess
in interfaceExecutable
- Returns:
- The before-transaction-completion process, or null if we have no before-transaction-completion process
-
getAfterTransactionCompletionProcess
public AfterTransactionCompletionProcess getAfterTransactionCompletionProcess()
Description copied from interface:Executable
Get the after-transaction-completion process, if any, for this action.- Specified by:
getAfterTransactionCompletionProcess
in interfaceExecutable
- Returns:
- The after-transaction-completion process, or null if we have no after-transaction-completion process
-
getPropertySpaces
public String[] getPropertySpaces()
Description copied from interface:Executable
What spaces (tables) are affected by this action?- Specified by:
getPropertySpaces
in interfaceExecutable
- Returns:
- The spaces affected by this action.
-
getPersister
protected final CollectionPersister getPersister()
-
getKey
protected final Object getKey()
-
getPrimarySortClassifier
public String getPrimarySortClassifier()
Description copied from interface:ComparableExecutable
This affect sorting order of the executables, when sorting is enabled.- Specified by:
getPrimarySortClassifier
in interfaceComparableExecutable
- Returns:
- the primary sorting attribute; typically the entity name or collection role.
-
getSecondarySortIndex
public Object getSecondarySortIndex()
Description copied from interface:ComparableExecutable
This affect sorting order of the executables, when sorting is enabled.- Specified by:
getSecondarySortIndex
in interfaceComparableExecutable
- Returns:
- the secondary sorting attribute, applied when getPrimarySortClassifier matches during a comparison; typically the entity key or collection key.
-
getSession
protected final EventSource getSession()
-
evict
protected final void evict() throws CacheException
- Throws:
CacheException
-
compareTo
public int compareTo(ComparableExecutable o)
- Specified by:
compareTo
in interfaceComparable<ComparableExecutable>
-
eventSource
protected EventSource eventSource()
-
getFastSessionServices
protected FastSessionServices getFastSessionServices()
Convenience method for all subclasses.- Returns:
- the
FastSessionServices
instance from the SessionFactory.
-
-