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

public final Class CollectionRemoveAction

extends CollectionAction
Class Inheritance
Imports
org.hibernate.AssertionFailure, .HibernateException, org.hibernate.collection.spi.PersistentCollection, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.event.spi.EventSource, .PostCollectionRemoveEvent, .PostCollectionRemoveEventListener, .PreCollectionRemoveEvent, .PreCollectionRemoveEventListener, org.hibernate.persister.collection.CollectionPersister, org.hibernate.stat.spi.StatisticsImplementor

The action for removing a collection

Field Summary

Modifier and TypeField and Description
private final Object
private final boolean

Constructor Summary

AccessConstructor and Description
public
CollectionRemoveAction(final PersistentCollection<?>
The collection to remove; must be non-null
collection
,
final CollectionPersister
The collection's persister
persister
,
final Object
The collection key
id
,
final boolean
Indicates if the snapshot is empty
emptySnapshot
,
final EventSource
The session
session
)

Removes a persistent collection from its loaded owner.

public
CollectionRemoveAction(final Object
The collection's owner; must be non-null
affectedOwner
,
final CollectionPersister
The collection's persister
persister
,
final Object
The collection key
id
,
final boolean
Indicates if the snapshot is empty
emptySnapshot
,
final EventSource
The session
session
)

Removes a persistent collection from a specified owner.

public
CollectionRemoveAction(final CollectionPersister
The collection's persister
persister
,
final Object
The collection key
id
,
final EventSource
The session
session
)

Removes a persistent collection for an unloaded proxy.

Method Summary

Modifier and TypeMethod and Description
public void
execute()

Implements org.hibernate.action.spi.Executable.execute.

Execute this action.
public Object
private PostCollectionRemoveEvent
private PreCollectionRemoveEvent
private void
private void
Inherited from org.hibernate.action.internal.CollectionAction:
afterDeserializebeforeExecutionscompareToeventSourceevictgetAfterTransactionCompletionProcessgetBeforeTransactionCompletionProcessgetCollectiongetFastSessionServicesgetKeygetPersistergetPrimarySortClassifiergetPropertySpacesgetSecondarySortIndexgetSessiontoString

Field Detail

affectedOwnerback to summary
private final Object affectedOwner
emptySnapshotback to summary
private final boolean emptySnapshot

Constructor Detail

CollectionRemoveActionback to summary
public CollectionRemoveAction(final PersistentCollection<?> collection, final CollectionPersister persister, final Object id, final boolean emptySnapshot, final EventSource session)

Removes a persistent collection from its loaded owner. Use this constructor when the collection is non-null.

Parameters
collection:PersistentCollection<?>

The collection to remove; must be non-null

persister:CollectionPersister

The collection's persister

id:Object

The collection key

emptySnapshot:boolean

Indicates if the snapshot is empty

session:EventSource

The session

Exceptions
AssertionFailure:
if collection is null.
CollectionRemoveActionback to summary
public CollectionRemoveAction(final Object affectedOwner, final CollectionPersister persister, final Object id, final boolean emptySnapshot, final EventSource session)

Removes a persistent collection from a specified owner. Use this constructor when the collection to be removed has not been loaded.

Parameters
affectedOwner:Object

The collection's owner; must be non-null

persister:CollectionPersister

The collection's persister

id:Object

The collection key

emptySnapshot:boolean

Indicates if the snapshot is empty

session:EventSource

The session

Exceptions
AssertionFailure:
if affectedOwner is null.
CollectionRemoveActionback to summary
public CollectionRemoveAction(final CollectionPersister persister, final Object id, final EventSource session)

Removes a persistent collection for an unloaded proxy. Use this constructor when the owning entity is has not been loaded.

Parameters
persister:CollectionPersister

The collection's persister

id:Object

The collection key

session:EventSource

The session

Method Detail

executeback to summary
public void execute() throws HibernateException

Implements org.hibernate.action.spi.Executable.execute.

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

Execute this action.

Annotations
@Override
Exceptions
HibernateException:
Indicates a problem during execution.
getAffectedOwnerback to summary
public Object getAffectedOwner()
newPostCollectionRemoveEventback to summary
private PostCollectionRemoveEvent newPostCollectionRemoveEvent()
newPreCollectionRemoveEventback to summary
private PreCollectionRemoveEvent newPreCollectionRemoveEvent()
postRemoveback to summary
private void postRemove()
preRemoveback to summary
private void preRemove()