|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.state.StateManagerFactory
public class StateManagerFactory
Factory for ObjectProviders of type StateManager. These are used when using bytecode enhancement in the persistent objects, and so setting/getting values using the bytecode enhancement contract.
| Nested Class Summary | |
|---|---|
protected static class |
StateManagerFactory.Initialization
Convenience process to get class and associated meta-data for the StateManager. |
| Field Summary | |
|---|---|
protected static Localiser |
LOCALISER
Localiser for messages. |
| Constructor Summary | |
|---|---|
StateManagerFactory()
|
|
| Method Summary | |
|---|---|
ObjectProvider |
newForCachedPC(ExecutionContext ec,
Object id,
CachedPC cachedPC)
Constructor to create a ObjectProvider for an object taken from the L2 cache with the specified id. |
ObjectProvider |
newForDetached(ExecutionContext ec,
Object pc,
Object id,
Object version)
Constructor for creating SM instances to manage persistable objects in detached state. |
ObjectProvider |
newForEmbedded(ExecutionContext ec,
AbstractClassMetaData cmd,
ObjectProvider ownerOP,
int ownerFieldNumber)
Constructs a state manager 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. |
ObjectProvider |
newForEmbedded(ExecutionContext ec,
Object pc,
boolean copyPc,
ObjectProvider ownerOP,
int ownerFieldNumber)
Constructs a state manager to manage a persistable instance that will be EMBEDDED/SERIALISED into another persistable object. |
ObjectProvider |
newForHollow(ExecutionContext ec,
Class pcClass,
Object id)
Constructs a state manager to manage a hollow instance having the given object ID. |
ObjectProvider |
newForHollowPopulated(ExecutionContext ec,
Class pcClass,
Object id,
FieldValues fv)
Constructs a state manager to manage a recently populated hollow instance having the given object ID and the given field values. |
ObjectProvider |
newForHollowPopulatedAppId(ExecutionContext ec,
Class pcClass,
FieldValues fv)
Constructs a state manager to manage a hollow (or pclean) instance having the given FieldValues. |
ObjectProvider |
newForHollowPreConstructed(ExecutionContext ec,
Object id,
Object pc)
Constructs a state manager to manage a hollow instance having the given object ID. |
ObjectProvider |
newForPersistentClean(ExecutionContext ec,
Object id,
Object pc)
Constructs a state manager to manage the specified persistent instance having the given object ID. |
ObjectProvider |
newForPersistentNew(ExecutionContext ec,
Object pc,
FieldValues preInsertChanges)
Constructs a state manager to manage a transient instance that is becoming newly persistent. |
ObjectProvider |
newForPNewToBeDeleted(ExecutionContext ec,
Object pc)
Constructor for creating SM instances to manage persistable objects that are not persistent yet are about to be deleted. |
ObjectProvider |
newForTransactionalTransient(ExecutionContext ec,
Object pc)
Constructs a state manager to manage a Transactional Transient instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
| Constructor Detail |
|---|
public StateManagerFactory()
| Method Detail |
|---|
public ObjectProvider newForHollow(ExecutionContext ec,
Class pcClass,
Object id)
ec - the ExecutionContextpcClass - the class of the new instance to be created.id - the JDO identity of the object.
public ObjectProvider newForHollowPreConstructed(ExecutionContext ec,
Object id,
Object pc)
ec - ExecutionContextid - the JDO identity of the object.pc - The object that is hollow that we are going to manage
public ObjectProvider newForHollowPopulated(ExecutionContext ec,
Class pcClass,
Object id,
FieldValues fv)
ec - ExecutionContextpcClass - the class of the new instance to be created.id - the JDO identity of the object.fv - the initial field values of the object.
public ObjectProvider newForPersistentClean(ExecutionContext ec,
Object id,
Object pc)
ec - the execution context controlling this state manager.id - the JDO identity of the object.pc - The object that is persistent that we are going to manage
public ObjectProvider newForHollowPopulatedAppId(ExecutionContext ec,
Class pcClass,
FieldValues fv)
ec - ExecutionContextpcClass - the class of the new instance to be created.fv - the initial field values of the object.
public ObjectProvider newForEmbedded(ExecutionContext ec,
Object pc,
boolean copyPc,
ObjectProvider ownerOP,
int ownerFieldNumber)
ec - 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 stored
public ObjectProvider 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
public ObjectProvider newForPersistentNew(ExecutionContext ec,
Object pc,
FieldValues preInsertChanges)
ec - ExecutionContextpc - the instance being make persistent.preInsertChanges - Any changes to make before inserting
public ObjectProvider newForTransactionalTransient(ExecutionContext ec,
Object pc)
ec - ExecutionContextpc - the instance being make persistent.
public ObjectProvider newForDetached(ExecutionContext ec,
Object pc,
Object id,
Object version)
ec - ExecutionContextpc - the detached objectid - the JDO identity of the object.version - the detached version
public ObjectProvider newForPNewToBeDeleted(ExecutionContext ec,
Object pc)
ec - Execution Contextpc - the object being deleted from persistence
public ObjectProvider newForCachedPC(ExecutionContext ec,
Object id,
CachedPC cachedPC)
ec - ExecutionContextid - Id to assign to the persistable objectcachedPC - CachedPC object from the L2 cache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||