| java.lang.Object org.jpox.state.StateManagerFactory
StateManagerFactory | public class StateManagerFactory (Code) | | Factory of StateManagers.
version: $Revision: 1.27 $ |
Inner Class :protected static class Initialization | |
Method Summary | |
public static StateManager | newStateManagerForCachedPC(ObjectManager om, Object pc, Object id, boolean loaded) Constructor to create a StateManager for a persistable object, assigning the
specified id to the object. | public static StateManager | newStateManagerForDetached(ObjectManager om, Object pc, Object id, Object version) Constructor for creating SM instances to manage persistable objects in detached state. | public static StateManager | newStateManagerForEmbedded(ObjectManager om, Object pc, boolean copyPc) Constructs a state manager to manage a persistable instance that will
be EMBEDDED/SERIALISED into another persistable object. | public static StateManager | newStateManagerForHollow(ObjectManager om, Class pcClass, Object id) Constructs a state manager to manage a hollow instance having the given object ID. | public static StateManager | newStateManagerForHollowPopulated(ObjectManager om, 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. | public static StateManager | newStateManagerForHollowPopulatedAppId(ObjectManager om, Class pcClass, FieldValues fv) Constructs a state manager to manage a hollow (or pclean) instance having the given FieldValues. | public static StateManager | newStateManagerForHollowPreConstructed(ObjectManager om, Object id, Object pc) Constructs a state manager to manage a hollow instance having the given object ID. | public static StateManager | newStateManagerForPNewToBeDeleted(ObjectManager om, Object pc) Constructor for creating SM instances to manage persistable objects that are not persistent yet
are about to be deleted. | public static StateManager | newStateManagerForPersistentClean(ObjectManager om, Object id, Object pc) Constructs a state manager to manage the specified persistent instance having the given object ID. | public static StateManager | newStateManagerForPersistentNew(ObjectManager om, Object pc, FieldValues preInsertChanges) Constructs a state manager to manage a transient instance that is
becoming newly persistent. | public static StateManager | newStateManagerForTransactionalTransient(ObjectManager om, Object pc) Constructs a state manager to manage a Transactional Transient instance. |
LOCALISER | final protected static Localiser LOCALISER(Code) | | Localiser for messages.
|
newStateManagerForCachedPC | public static StateManager newStateManagerForCachedPC(ObjectManager om, Object pc, Object id, boolean loaded)(Code) | | Constructor to create a StateManager for a persistable object, assigning the
specified id to the object. This is used when getting objects out of the L2 Cache,
where they have no StateManager assigned, and returning them as associated with a
particular PM.
Parameters: om - Object Manager managing this object Parameters: pc - The persistable object from the cache Parameters: id - Id to assign to the persistable object Parameters: loaded - The list of loaded fields (when put in the cache) |
newStateManagerForDetached | public static StateManager newStateManagerForDetached(ObjectManager om, Object pc, Object id, Object version)(Code) | | Constructor for creating SM instances to manage persistable objects in detached state.
Parameters: om - ObjectManager Parameters: pc - the detached object Parameters: id - the JDO identity of the object. Parameters: version - the detached version since: 1.1 |
newStateManagerForEmbedded | public static StateManager newStateManagerForEmbedded(ObjectManager om, Object pc, boolean copyPc)(Code) | | Constructs a state manager to manage a persistable instance that will
be EMBEDDED/SERIALISED into another persistable object. The instance will not be
assigned an identity in the process since it is a SCO.
Parameters: om - The object manager controlling this state manager. Parameters: pc - The persistable to manage (see copyPc also) Parameters: copyPc - Whether the SM should manage a copy of the passed PC or that one |
newStateManagerForHollow | public static StateManager newStateManagerForHollow(ObjectManager om, Class pcClass, Object id)(Code) | | Constructs a state manager to manage a hollow instance having the given object ID.
This constructor is used for creating new instances of existing persistent objects.
Parameters: om - the persistence manager controlling this state manager. Parameters: pcClass - the class of the new instance to be created. Parameters: id - the JDO identity of the object. |
newStateManagerForHollowPopulated | public static StateManager newStateManagerForHollowPopulated(ObjectManager om, Class pcClass, Object id, FieldValues fv)(Code) | | Constructs a state manager to manage a recently populated hollow instance having the
given object ID and the given field values. This constructor is used for
creating new instances of persistent objects obtained e.g. via a Query or backed by a view.
Parameters: om - the object manager controlling this state manager. Parameters: pcClass - the class of the new instance to be created. Parameters: id - the JDO identity of the object. Parameters: fv - the initial field values of the object. |
newStateManagerForHollowPopulatedAppId | public static StateManager newStateManagerForHollowPopulatedAppId(ObjectManager om, Class pcClass, FieldValues fv)(Code) | | Constructs a state manager to manage a hollow (or pclean) instance having the given FieldValues.
This constructor is used for creating new instances of existing persistent objects using application identity.
Parameters: om - the object manager controlling this state manager. Parameters: pcClass - the class of the new instance to be created. Parameters: fv - the initial field values of the object. |
newStateManagerForHollowPreConstructed | public static StateManager newStateManagerForHollowPreConstructed(ObjectManager om, Object id, Object pc)(Code) | | Constructs a state manager to manage a hollow instance having the given object ID.
The instance is already supplied.
Parameters: om - the persistence manager controlling this state manager. Parameters: id - the JDO identity of the object. Parameters: pc - The object that is hollow that we are going to manage |
newStateManagerForPNewToBeDeleted | public static StateManager newStateManagerForPNewToBeDeleted(ObjectManager om, Object pc)(Code) | | Constructor for creating SM instances to manage persistable objects that are not persistent yet
are about to be deleted. Consequently the initial lifecycle state will be P_NEW, but will soon
move to P_NEW_DELETED.
Parameters: om - ObjectManager Parameters: pc - the object being deleted from persistence since: 1.2 |
newStateManagerForPersistentClean | public static StateManager newStateManagerForPersistentClean(ObjectManager om, Object id, Object pc)(Code) | | Constructs a state manager to manage the specified persistent instance having the given object ID.
Parameters: om - the persistence manager controlling this state manager. Parameters: id - the JDO identity of the object. Parameters: pc - The object that is persistent that we are going to manage |
newStateManagerForPersistentNew | public static StateManager newStateManagerForPersistentNew(ObjectManager om, Object pc, FieldValues preInsertChanges)(Code) | | Constructs a state manager to manage a transient instance that is
becoming newly persistent. A new object ID for the
instance is obtained from the store manager and the object is inserted
in the data store.
This constructor is used for assigning state managers to existing
instances that are transitioning to a persistent state.
Parameters: om - the object manager controlling this state manager. Parameters: pc - the instance being make persistent. Parameters: preInsertChanges - Any changes to make before inserting |
newStateManagerForTransactionalTransient | public static StateManager newStateManagerForTransactionalTransient(ObjectManager om, Object pc)(Code) | | Constructs a state manager to manage a Transactional Transient instance.
A new object ID for the instance is obtained from the store manager and
the object is inserted in the data store.
This constructor is used for assigning state managers to Transient
instances that are transitioning to a transient clean state.
Parameters: om - the object manager controlling this state manager. Parameters: pc - the instance being make persistent. |
|
|