public interface ObjectProviderFactory
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
disconnectObjectProvider(ObjectProvider op)
Method to be called when an ObjectProvider is disconnected (finished with).
|
<T> ObjectProvider<T> |
newForCachedPC(ExecutionContext ec,
Object id,
CachedPC<T> cachedPC)
Constructor to create an ObjectProvider for an object taken from the L2 cache with the specified id.
|
<T> ObjectProvider<T> |
newForDetached(ExecutionContext ec,
T pc,
Object id,
Object version)
Constructor for creating ObjectProvider instances to manage persistable objects in detached state.
|
ObjectProvider |
newForEmbedded(ExecutionContext ec,
AbstractClassMetaData cmd,
ObjectProvider ownerOP,
int ownerFieldNumber)
Constructs an ObjectProvider for an object of the specified type, creating the PC object to hold the values
where this object will be EMBEDDED/SERIALISED into another persistable object.
|
<T> ObjectProvider<T> |
newForEmbedded(ExecutionContext ec,
T pc,
boolean copyPc,
ObjectProvider ownerOP,
int ownerFieldNumber)
Constructs an ObjectProvider to manage a persistable instance that will
be EMBEDDED/SERIALISED into another persistable object.
|
<T> ObjectProvider<T> |
newForHollow(ExecutionContext ec,
Class<T> pcClass,
Object id)
Constructs an ObjectProvider to manage a hollow instance having the given object ID.
|
<T> ObjectProvider<T> |
newForHollow(ExecutionContext ec,
Class<T> pcClass,
Object id,
FieldValues fv)
Constructs an ObjectProvider to manage a recently populated hollow instance having the
given object ID and the given field values.
|
<T> ObjectProvider<T> |
newForHollowPopulatedAppId(ExecutionContext ec,
Class<T> pcClass,
FieldValues fv)
Deprecated.
Use newForHollowPopulated instead
|
<T> ObjectProvider<T> |
newForHollowPreConstructed(ExecutionContext ec,
Object id,
T pc)
Constructs an ObjectProvider to manage a hollow instance having the given object ID.
|
<T> ObjectProvider<T> |
newForPersistentClean(ExecutionContext ec,
Object id,
T pc)
Constructs an ObjectProvider to manage the specified persistent instance having the given object ID.
|
<T> ObjectProvider<T> |
newForPersistentNew(ExecutionContext ec,
T pc,
FieldValues fv)
Constructs an ObjectProvider to manage a transient instance that is becoming newly persistent.
|
<T> ObjectProvider<T> |
newForPNewToBeDeleted(ExecutionContext ec,
T pc)
Constructor for creating ObjectProvider instances to manage persistable objects that are not persistent yet
are about to be deleted.
|
<T> ObjectProvider<T> |
newForTransactionalTransient(ExecutionContext ec,
T pc)
Constructs an ObjectProvider to manage a transactional-transient instance.
|
void close()
void disconnectObjectProvider(ObjectProvider op)
op
- The ObjectProvider<T> ObjectProvider<T> newForHollow(ExecutionContext ec, Class<T> pcClass, Object id)
T
- Type of the persistable classec
- the ExecutionContextpcClass
- the class of the new instance to be created.id
- the identity of the object.<T> ObjectProvider<T> newForHollowPreConstructed(ExecutionContext ec, Object id, T pc)
T
- Type of the persistable classec
- ExecutionContextid
- the identity of the object.pc
- The object that is hollow that we are going to manage<T> ObjectProvider<T> newForHollow(ExecutionContext ec, Class<T> pcClass, Object id, FieldValues fv)
T
- Type of the persistable classec
- ExecutionContextpcClass
- the class of the new instance to be created.id
- the identity of the object.fv
- the initial field values of the object.<T> ObjectProvider<T> newForPersistentClean(ExecutionContext ec, Object id, T pc)
T
- Type of the persistable classec
- the execution context controlling this state manager.id
- the identity of the object.pc
- The object that is persistent that we are going to manage<T> ObjectProvider<T> newForHollowPopulatedAppId(ExecutionContext ec, Class<T> pcClass, FieldValues fv)
T
- Type of the persistable classec
- ExecutionContextpcClass
- the class of the new instance to be created.fv
- the initial field values of the object.<T> ObjectProvider<T> newForEmbedded(ExecutionContext ec, T pc, boolean copyPc, ObjectProvider ownerOP, int ownerFieldNumber)
T
- Type of the persistable classec
- ExecutionContextpc
- The persistable to manage (see copyPc also)copyPc
- Whether the SM should manage a copy of the passed PC or that oneownerOP
- Owner ObjectProviderownerFieldNumber
- Field number in owner object where this is storedObjectProvider newForEmbedded(ExecutionContext ec, AbstractClassMetaData cmd, ObjectProvider ownerOP, int ownerFieldNumber)
ec
- ExecutionContextcmd
- Meta-data for the class that this is an instance of.ownerOP
- Owner ObjectProviderownerFieldNumber
- Field number in owner object where this is stored<T> ObjectProvider<T> newForPersistentNew(ExecutionContext ec, T pc, FieldValues fv)
T
- Type of the persistable classec
- ExecutionContextpc
- the instance being make persistent.fv
- Any changes to make before inserting<T> ObjectProvider<T> newForTransactionalTransient(ExecutionContext ec, T pc)
T
- Type of the persistable classec
- ExecutionContextpc
- the instance being make persistent.<T> ObjectProvider<T> newForDetached(ExecutionContext ec, T pc, Object id, Object version)
T
- Type of the persistable classec
- ExecutionContextpc
- the detached objectid
- the identity of the object.version
- the detached version<T> ObjectProvider<T> newForPNewToBeDeleted(ExecutionContext ec, T pc)
T
- Type of the persistable classec
- Execution Contextpc
- the object being deleted from persistence<T> ObjectProvider<T> newForCachedPC(ExecutionContext ec, Object id, CachedPC<T> cachedPC)
T
- Type of the persistable classec
- ExecutionContextid
- Id to assign to the persistable objectcachedPC
- CachedPC object from the L2 cacheCopyright © 2019. All rights reserved.