Package org.hibernate.action.internal
Class CollectionRemoveAction
- java.lang.Object
-
- org.hibernate.action.internal.CollectionAction
-
- org.hibernate.action.internal.CollectionRemoveAction
-
- All Implemented Interfaces:
Serializable
,Comparable<ComparableExecutable>
,Executable
,ComparableExecutable
public final class CollectionRemoveAction extends CollectionAction
The action for removing a collection- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CollectionRemoveAction(Object affectedOwner, CollectionPersister persister, Object id, boolean emptySnapshot, EventSource session)
Removes a persistent collection from a specified owner.CollectionRemoveAction(PersistentCollection<?> collection, CollectionPersister persister, Object id, boolean emptySnapshot, EventSource session)
Removes a persistent collection from its loaded owner.CollectionRemoveAction(CollectionPersister persister, Object id, EventSource session)
Removes a persistent collection for an unloaded proxy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
Execute this action.Object
getAffectedOwner()
-
Methods inherited from class org.hibernate.action.internal.CollectionAction
afterDeserialize, beforeExecutions, compareTo, eventSource, evict, getAfterTransactionCompletionProcess, getBeforeTransactionCompletionProcess, getCollection, getFastSessionServices, getKey, getPersister, getPrimarySortClassifier, getPropertySpaces, getSecondarySortIndex, getSession, toString
-
-
-
-
Constructor Detail
-
CollectionRemoveAction
public CollectionRemoveAction(PersistentCollection<?> collection, CollectionPersister persister, Object id, boolean emptySnapshot, EventSource session)
Removes a persistent collection from its loaded owner. Use this constructor when the collection is non-null.- Parameters:
collection
- The collection to remove; must be non-nullpersister
- The collection's persisterid
- The collection keyemptySnapshot
- Indicates if the snapshot is emptysession
- The session- Throws:
AssertionFailure
- if collection is null.
-
CollectionRemoveAction
public CollectionRemoveAction(Object affectedOwner, CollectionPersister persister, Object id, boolean emptySnapshot, 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
- The collection's owner; must be non-nullpersister
- The collection's persisterid
- The collection keyemptySnapshot
- Indicates if the snapshot is emptysession
- The session- Throws:
AssertionFailure
- if affectedOwner is null.
-
CollectionRemoveAction
public CollectionRemoveAction(CollectionPersister persister, Object id, EventSource session)
Removes a persistent collection for an unloaded proxy. Use this constructor when the owning entity is has not been loaded.- Parameters:
persister
- The collection's persisterid
- The collection keysession
- The session
-
-
Method Detail
-
execute
public void execute() throws HibernateException
Description copied from interface:Executable
Execute this action.- Throws:
HibernateException
- Indicates a problem during execution.
-
getAffectedOwner
public Object getAffectedOwner()
-
-