|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extends the PersistenceManager interface for JDO-internal use. Provides additional information and helper methods for StateManagerInternal interaction with the cache.
Method Summary | |
void |
assertIsOpen()
assert this PM instance is open |
void |
assertReadAllowed()
assert that the NontransactionalRead flag is true or a transaction is active. |
void |
deregister(java.lang.Object oid)
Removes the object from the cache. |
void |
deregisterTransient(StateManagerInternal sm)
Removes transient object from the transient cache. |
StateManagerInternal |
findStateManager(javax.jdo.spi.PersistenceCapable pc)
Finds a StateManagerInternal for the given PersistenceCapable object. |
void |
flush()
Called by Query or Extent to flush updates to the database in a datastore transaction. |
javax.jdo.PersistenceManager |
getCurrentWrapper()
Returns current instance of PersistenceManager wrapper |
java.util.Collection |
getInsertedInstances()
Returns a Collection of instances that has been made persistent or become persistent through persistence-by-reachability algorithm in this transaction. |
java.lang.Object |
getInternalObjectId(java.lang.Object pc)
Provides an object id for the given PersistenceCapable. |
StateManagerInternal |
getStateManager(java.lang.Object oid,
java.lang.Class pcClass)
Provides a StateManagerInternal for the given Object Id. |
StoreManager |
getStoreManager()
Provides a StoreManager that is ready to accept operations on it. |
void |
hereIsStateManager(StateManagerInternal sm,
javax.jdo.spi.PersistenceCapable pc)
A helper method called from the StateManager inside getPersistenceManager() to identify StateManager associated with this PC instance |
boolean |
insideCommit()
Returns true if the call initiated as a result of the commit process, versus flush for query in a datastore transaction. |
boolean |
isSupportedSCOType(java.lang.Class type)
Called by StateManager to verify field type. |
java.lang.Class |
loadClass(java.lang.String name,
java.lang.ClassLoader given)
Provides a Class of the given name. |
java.lang.Class |
loadPCClassForObjectIdClass(java.lang.Class objectIdClass)
Provides the Class object of the persistence-capable class that defines the specified class as its ObjectId class. |
void |
markAsFlushed(StateManagerInternal sm)
Called by StateManagerInternal#markAsFlushed() to adjust transactional cache(s) if necessary after successful flush to the data store. |
java.util.Collection |
newCollectionInstanceInternal(java.lang.Class type,
java.lang.Class elementType,
boolean allowNulls,
java.lang.Integer initialSize,
java.lang.Float loadFactor,
java.util.Collection initialContents,
java.util.Comparator comparator)
Called internally by the runtime to create a new tracked instance of type Collection. |
java.util.Map |
newMapInstanceInternal(java.lang.Class type,
java.lang.Class keyType,
java.lang.Class valueType,
boolean allowNulls,
java.lang.Integer initialSize,
java.lang.Float loadFactor,
java.util.Map initialContents,
java.util.Comparator comparator)
Called internally by the runtime to create a new tracked instance of type Map. |
java.lang.Object |
newSCOInstanceInternal(java.lang.Class type)
Called internally by the runtime to create a new tracked instance. |
void |
register(StateManagerInternal sm,
java.lang.Object oid,
boolean transactional,
boolean throwDuplicateException)
Adds persistent object to the cache. |
void |
registerTransient(StateManagerInternal sm)
Adds transient object to the transient cache. |
void |
replaceObjectId(java.lang.Object oldId,
java.lang.Object newId)
Replaces the objectId key value in the cache. |
void |
setStoreManager(StoreManager storeManager)
Sets a StoreManager that is ready to accept operations on it such as insert, etc. |
Methods inherited from interface javax.jdo.PersistenceManager |
addInstanceLifecycleListener, checkConsistency, close, currentTransaction, deletePersistent, deletePersistentAll, deletePersistentAll, detachCopy, detachCopyAll, detachCopyAll, evict, evictAll, evictAll, evictAll, getDataStoreConnection, getDetachAllOnCommit, getExtent, getExtent, getFetchPlan, getIgnoreCache, getMultithreaded, getObjectById, getObjectById, getObjectById, getObjectId, getObjectIdClass, getObjectsById, getObjectsById, getObjectsById, getObjectsById, getPersistenceManagerFactory, getSequence, getTransactionalObjectId, getUserObject, getUserObject, isClosed, makeNontransactional, makeNontransactionalAll, makeNontransactionalAll, makePersistent, makePersistentAll, makePersistentAll, makeTransactional, makeTransactionalAll, makeTransactionalAll, makeTransient, makeTransient, makeTransientAll, makeTransientAll, makeTransientAll, makeTransientAll, newInstance, newNamedQuery, newObjectIdInstance, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, putUserObject, refresh, refreshAll, refreshAll, refreshAll, refreshAll, removeInstanceLifecycleListener, removeUserObject, retrieve, retrieve, retrieveAll, retrieveAll, retrieveAll, retrieveAll, setDetachAllOnCommit, setIgnoreCache, setMultithreaded, setUserObject |
Method Detail |
public void assertIsOpen()
public void assertReadAllowed()
public StoreManager getStoreManager()
public void setStoreManager(StoreManager storeManager)
storeManager
- the StoreManager to be used by this
PersistenceManagerpublic StateManagerInternal getStateManager(java.lang.Object oid, java.lang.Class pcClass)
oid
- the given Object Id.pcClass
- Class of a PersistenceCapable instance to be created
if this Object Id was not registered with this PersistenceManager.
public StateManagerInternal findStateManager(javax.jdo.spi.PersistenceCapable pc)
pc
- the given PersistenceCapable object.
public java.lang.Class loadClass(java.lang.String name, java.lang.ClassLoader given) throws java.lang.ClassNotFoundException
If after the above has been tried on all the ClassLoaders, an appropriate Class has not been found, throws JDOUserException.
name
- Fully qualified name of the Class to load.given
- ClassLoader which is the first to be tried
in loading the named Class.
java.lang.ClassNotFoundException
- - if an appropriate Class can not
be loaded.public java.lang.Class loadPCClassForObjectIdClass(java.lang.Class objectIdClass) throws java.lang.ClassNotFoundException
loadClass(java.lang.String, java.lang.ClassLoader)
:
java.lang.ClassNotFoundException
public java.lang.Object getInternalObjectId(java.lang.Object pc)
public void register(StateManagerInternal sm, java.lang.Object oid, boolean transactional, boolean throwDuplicateException)
sm
- instance of StateManagerInternal to be addedoid
- ObjectId of the corresponding persistence-capable instancetransactional
- true if the corresponding lifecycle state is transactionalthrowDuplicateException
- true if the exception should be thrown in case the same ObjectId
has been already registered.public void registerTransient(StateManagerInternal sm)
sm
- instance of StateManagerInternal to be addedpublic void deregister(java.lang.Object oid)
oid
- ObjectId of the instance to be removed.public void deregisterTransient(StateManagerInternal sm)
sm
- instance of StateManagerInternal to be removedpublic void replaceObjectId(java.lang.Object oldId, java.lang.Object newId)
oldId
- previous value of ObjectId.newId
- new value of ObjectId.public void hereIsStateManager(StateManagerInternal sm, javax.jdo.spi.PersistenceCapable pc)
pc
- PC instancesm
- StateManager to savepublic void markAsFlushed(StateManagerInternal sm)
sm
- StateManagerInternal instance that has been flushedpublic boolean insideCommit()
public java.lang.Object newSCOInstanceInternal(java.lang.Class type)
type
- Class of the new SCO instance
public java.util.Collection newCollectionInstanceInternal(java.lang.Class type, java.lang.Class elementType, boolean allowNulls, java.lang.Integer initialSize, java.lang.Float loadFactor, java.util.Collection initialContents, java.util.Comparator comparator)
public java.util.Map newMapInstanceInternal(java.lang.Class type, java.lang.Class keyType, java.lang.Class valueType, boolean allowNulls, java.lang.Integer initialSize, java.lang.Float loadFactor, java.util.Map initialContents, java.util.Comparator comparator)
public boolean isSupportedSCOType(java.lang.Class type)
type
- Class type of the field.
public void flush()
flush
in interface javax.jdo.PersistenceManager
JDOUserException
- if current transaction is not active.public javax.jdo.PersistenceManager getCurrentWrapper()
public java.util.Collection getInsertedInstances()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |