Top Description Inners Fields Constructors Methods
org.hibernate.action.internal

public abstract Class CollectionAction

extends Object
implements ComparableExecutable
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.spi.ComparableExecutable, java.io.Serializable, java.lang.Comparable, org.hibernate.action.spi.Executable
Known Direct Subclasses
org.hibernate.action.internal.CollectionRecreateAction, org.hibernate.action.internal.CollectionRemoveAction, org.hibernate.action.internal.CollectionUpdateAction, org.hibernate.action.internal.QueuedOperationCollectionAction, org.hibernate.cache.internal.CollectionCacheInvalidator.CollectionEvictCacheAction
Imports
org.hibernate.action.spi.AfterTransactionCompletionProcess, .BeforeTransactionCompletionProcess, org.hibernate.cache.CacheException, org.hibernate.cache.spi.access.CollectionDataAccess, .SoftLock, org.hibernate.collection.spi.PersistentCollection, org.hibernate.engine.spi.ComparableExecutable, .SharedSessionContractImplementor, org.hibernate.event.spi.EventSource, org.hibernate.internal.FastSessionServices, org.hibernate.internal.util.StringHelper, org.hibernate.persister.collection.CollectionPersister, org.hibernate.pretty.MessageHelper

Any action relating to insert/update/delete of a collection
Author
Gavin King

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private AfterTransactionCompletionProcess
private final PersistentCollection<?>
private final String
private final Object
private transient CollectionPersister
private transient EventSource

Constructor Summary

AccessConstructor and Description
protected
CollectionAction(final CollectionPersister persister, final PersistentCollection<?> collection, final Object key, final EventSource session)

Method Summary

Modifier and TypeMethod and Description
public void
afterDeserialize(EventSource
The session being deserialized
session
)

Implements org.hibernate.action.spi.Executable.afterDeserialize.

Reconnect to session after deserialization...
public final void
beforeExecutions()

Implements org.hibernate.action.spi.Executable.beforeExecutions.

Called before executing any actions.
public int
compareTo(ComparableExecutable
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
protected EventSource
protected final void
public AfterTransactionCompletionProcess
getAfterTransactionCompletionProcess()

Implements org.hibernate.action.spi.Executable.getAfterTransactionCompletionProcess.

Get the after-transaction-completion process, if any, for this action.
public BeforeTransactionCompletionProcess
getBeforeTransactionCompletionProcess()

Implements org.hibernate.action.spi.Executable.getBeforeTransactionCompletionProcess.

Get the before-transaction-completion process, if any, for this action.
protected PersistentCollection<?>
protected FastSessionServices

Returns:

the FastSessionServices instance from the SessionFactory.
getFastSessionServices
()

Convenience method for all subclasses.

protected final Object
protected final CollectionPersister
public String
getPrimarySortClassifier()

Implements org.hibernate.engine.spi.ComparableExecutable.getPrimarySortClassifier.

This affect sorting order of the executables, when sorting is enabled.
public String[]
getPropertySpaces()

Implements org.hibernate.action.spi.Executable.getPropertySpaces.

What spaces (tables) are affected by this action?
public Object
getSecondarySortIndex()

Implements org.hibernate.engine.spi.ComparableExecutable.getSecondarySortIndex.

This affect sorting order of the executables, when sorting is enabled.
protected final EventSource
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

afterTransactionProcessback to summary
private AfterTransactionCompletionProcess afterTransactionProcess
collectionback to summary
private final PersistentCollection<?> collection
collectionRoleback to summary
private final String collectionRole
keyback to summary
private final Object key
persisterback to summary
private transient CollectionPersister persister
sessionback to summary
private transient EventSource session

Constructor Detail

CollectionActionback to summary
protected CollectionAction(final CollectionPersister persister, final PersistentCollection<?> collection, final Object key, final EventSource session)

Method Detail

afterDeserializeback to summary
public void afterDeserialize(EventSource session)

Implements org.hibernate.action.spi.Executable.afterDeserialize.

Reconnect to session after deserialization...

Parameters
session:EventSource

The session being deserialized

beforeExecutionsback to summary
public final void beforeExecutions() throws CacheException

Implements org.hibernate.action.spi.Executable.beforeExecutions.

Doc from org.hibernate.action.spi.Executable.beforeExecutions.

Called before executing any actions. Gives actions a chance to perform any preparation.

Annotations
@Override
compareToback to summary
public int compareTo(ComparableExecutable o)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
o:ComparableExecutable

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
eventSourceback to summary
protected EventSource eventSource()
evictback to summary
protected final void evict() throws CacheException
getAfterTransactionCompletionProcessback to summary
public AfterTransactionCompletionProcess getAfterTransactionCompletionProcess()

Implements org.hibernate.action.spi.Executable.getAfterTransactionCompletionProcess.

Doc from org.hibernate.action.spi.Executable.getAfterTransactionCompletionProcess.

Get the after-transaction-completion process, if any, for this action.

Returns:AfterTransactionCompletionProcess

The after-transaction-completion process, or null if we have no after-transaction-completion process

Annotations
@Override
getBeforeTransactionCompletionProcessback to summary
public BeforeTransactionCompletionProcess getBeforeTransactionCompletionProcess()

Implements org.hibernate.action.spi.Executable.getBeforeTransactionCompletionProcess.

Doc from org.hibernate.action.spi.Executable.getBeforeTransactionCompletionProcess.

Get the before-transaction-completion process, if any, for this action.

Returns:BeforeTransactionCompletionProcess

The before-transaction-completion process, or null if we have no before-transaction-completion process

Annotations
@Override
getCollectionback to summary
protected PersistentCollection<?> getCollection()
getFastSessionServicesback to summary
protected FastSessionServices getFastSessionServices()

Convenience method for all subclasses.

Returns:FastSessionServices

the FastSessionServices instance from the SessionFactory.

getKeyback to summary
protected final Object getKey()
getPersisterback to summary
protected final CollectionPersister getPersister()
getPrimarySortClassifierback to summary
public String getPrimarySortClassifier()

Implements org.hibernate.engine.spi.ComparableExecutable.getPrimarySortClassifier.

Doc from org.hibernate.engine.spi.ComparableExecutable.getPrimarySortClassifier.

This affect sorting order of the executables, when sorting is enabled.

Returns:String

the primary sorting attribute; typically the entity name or collection role.

Annotations
@Override
getPropertySpacesback to summary
public String[] getPropertySpaces()

Implements org.hibernate.action.spi.Executable.getPropertySpaces.

Doc from org.hibernate.action.spi.Executable.getPropertySpaces.

What spaces (tables) are affected by this action?

Returns:String[]

The spaces affected by this action.

Annotations
@Override
getSecondarySortIndexback to summary
public Object getSecondarySortIndex()

Implements org.hibernate.engine.spi.ComparableExecutable.getSecondarySortIndex.

Doc from org.hibernate.engine.spi.ComparableExecutable.getSecondarySortIndex.

This affect sorting order of the executables, when sorting is enabled.

Returns:Object

the secondary sorting attribute, applied when getPrimarySortClassifier matches during a comparison; typically the entity key or collection key.

Annotations
@Override
getSessionback to summary
protected final EventSource getSession()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.hibernate.action.internal back to summary

private Class CollectionAction.CacheCleanupProcess

extends Object
implements AfterTransactionCompletionProcess
Class Inheritance
  • java.lang.Object
  • org.hibernate.action.internal.CollectionAction.CacheCleanupProcess
All Implemented Interfaces
org.hibernate.action.spi.AfterTransactionCompletionProcess

Field Summary

Modifier and TypeField and Description
private final Object
private final SoftLock
private final CollectionPersister

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
doAfterTransactionCompletion(boolean
Did the transaction complete successfully? True means it did.
success
,
SharedSessionContractImplementor
The session on which the transaction is completing.
session
)

Implements org.hibernate.action.spi.AfterTransactionCompletionProcess.doAfterTransactionCompletion.

Perform whatever processing is encapsulated here after completion of the transaction.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
private final Object key
lockback to summary
private final SoftLock lock
persisterback to summary
private final CollectionPersister persister

Constructor Detail

CacheCleanupProcessback to summary
private CacheCleanupProcess(Object key, CollectionPersister persister, SoftLock lock)

Method Detail

doAfterTransactionCompletionback to summary
public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session)

Implements org.hibernate.action.spi.AfterTransactionCompletionProcess.doAfterTransactionCompletion.

Doc from org.hibernate.action.spi.AfterTransactionCompletionProcess.doAfterTransactionCompletion.

Perform whatever processing is encapsulated here after completion of the transaction.

Parameters
success:boolean

Did the transaction complete successfully? True means it did.

session:SharedSessionContractImplementor

The session on which the transaction is completing.

Annotations
@Override