Package cz.cvut.kbss.jopa.proxy.change
Class ChangeTrackingIndirectCollection<T>
java.lang.Object
cz.cvut.kbss.jopa.proxy.change.ChangeTrackingIndirectCollection<T>
- Type Parameters:
T- Type of the wrapped object
- All Implemented Interfaces:
IndirectWrapper<T>
- Direct Known Subclasses:
ChangeTrackingIndirectList,ChangeTrackingIndirectMap,ChangeTrackingIndirectSet
public abstract class ChangeTrackingIndirectCollection<T>
extends Object
implements IndirectWrapper<T>
Wraps a collection so that calls to modifying operations are intercepted and reported to the persistence context (if
necessary).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Fieldprotected final Objectprotected final UnitOfWork -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChangeTrackingIndirectCollection(Object owner, Field f, UnitOfWork persistenceContext) Create new indirect collection from the specified data. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cz.cvut.kbss.jopa.proxy.IndirectWrapper
unwrap
-
Field Details
-
owner
-
field
-
persistenceContext
-
-
Constructor Details
-
ChangeTrackingIndirectCollection
Create new indirect collection from the specified data.The owner can be null, the persistence context not.
- Parameters:
owner- Owner of the indirect collectionf- The field holding this collectionpersistenceContext- Persistence context the owner belongs to- Throws:
NullPointerException- If the persistence context is null
-
-
Method Details
-
persistChange
protected void persistChange()
-