Package org.datanucleus.flush
Class CollectionRemoveOperation<E>
- java.lang.Object
-
- org.datanucleus.flush.CollectionRemoveOperation<E>
-
- All Implemented Interfaces:
Operation
,SCOOperation
- Direct Known Subclasses:
ListRemoveAtOperation
public class CollectionRemoveOperation<E> extends java.lang.Object implements SCOOperation
Remove operation for a collection. This is usually for the situation where we have a backing store, but also can be used where we are removing an object from a collection and the field is marked as cascade delete but we don't want to delete immediately.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
allowCascadeDelete
Whether to allow cascade-delete checks.(package private) int
fieldNumber
(package private) DNStateManager
sm
(package private) CollectionStore<E>
store
(package private) E
value
The value to remove.
-
Constructor Summary
Constructors Constructor Description CollectionRemoveOperation(DNStateManager sm, int fieldNum, E value, boolean allowCascadeDelete)
CollectionRemoveOperation(DNStateManager sm, CollectionStore<E> store, E value, boolean allowCascadeDelete)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractMemberMetaData
getMemberMetaData()
Accessor for the metadata for the member that this operation is for.DNStateManager
getStateManager()
Accessor for StateManager of the object that this operation is performed on.Store
getStore()
Accessor for the backing store for this operation.E
getValue()
Accessor for the value being removed.void
perform()
Perform the remove(Object) operation on the specified container.java.lang.String
toString()
-
-
-
Field Detail
-
sm
final DNStateManager sm
-
fieldNumber
final int fieldNumber
-
store
final CollectionStore<E> store
-
value
final E value
The value to remove.
-
allowCascadeDelete
final boolean allowCascadeDelete
Whether to allow cascade-delete checks.
-
-
Constructor Detail
-
CollectionRemoveOperation
public CollectionRemoveOperation(DNStateManager sm, CollectionStore<E> store, E value, boolean allowCascadeDelete)
-
CollectionRemoveOperation
public CollectionRemoveOperation(DNStateManager sm, int fieldNum, E value, boolean allowCascadeDelete)
-
-
Method Detail
-
getMemberMetaData
public AbstractMemberMetaData getMemberMetaData()
Description copied from interface:SCOOperation
Accessor for the metadata for the member that this operation is for.- Specified by:
getMemberMetaData
in interfaceSCOOperation
- Returns:
- The member metadata
-
getValue
public E getValue()
Accessor for the value being removed.- Returns:
- Value being removed
-
perform
public void perform()
Perform the remove(Object) operation on the specified container.
-
getStore
public Store getStore()
Description copied from interface:SCOOperation
Accessor for the backing store for this operation.- Specified by:
getStore
in interfaceSCOOperation
- Returns:
- The backing store
-
getStateManager
public DNStateManager getStateManager()
Description copied from interface:Operation
Accessor for StateManager of the object that this operation is performed on.- Specified by:
getStateManager
in interfaceOperation
- Returns:
- StateManager
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-