|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceManagerInternal
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. |
Methods inherited from interface javax.jdo.PersistenceManager |
---|
close, currentTransaction, deletePersistent, deletePersistentAll, deletePersistentAll, evict, evictAll, evictAll, evictAll, getExtent, getIgnoreCache, getMultithreaded, getObjectById, getObjectId, getObjectIdClass, getPersistenceManagerFactory, getTransactionalObjectId, getUserObject, isClosed, makeNontransactional, makeNontransactionalAll, makeNontransactionalAll, makePersistent, makePersistentAll, makePersistentAll, makeTransactional, makeTransactionalAll, makeTransactionalAll, makeTransient, makeTransientAll, makeTransientAll, newObjectIdInstance, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, refresh, refreshAll, refreshAll, refreshAll, retrieve, retrieveAll, retrieveAll, retrieveAll, retrieveAll, setIgnoreCache, setMultithreaded, setUserObject |
Method Detail |
---|
void assertIsOpen()
void assertReadAllowed()
StoreManager getStoreManager()
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.
StateManagerInternal findStateManager(javax.jdo.spi.PersistenceCapable pc)
pc
- the given PersistenceCapable object.
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.java.lang.Class loadPCClassForObjectIdClass(java.lang.Class objectIdClass) throws java.lang.ClassNotFoundException
loadClass(java.lang.String, java.lang.ClassLoader)
:
java.lang.ClassNotFoundException
java.lang.Object getInternalObjectId(java.lang.Object pc)
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.void registerTransient(StateManagerInternal sm)
sm
- instance of StateManagerInternal to be addedvoid deregister(java.lang.Object oid)
oid
- ObjectId of the instance to be removed.void deregisterTransient(StateManagerInternal sm)
sm
- instance of StateManagerInternal to be removedvoid replaceObjectId(java.lang.Object oldId, java.lang.Object newId)
oldId
- previous value of ObjectId.newId
- new value of ObjectId.void hereIsStateManager(StateManagerInternal sm, javax.jdo.spi.PersistenceCapable pc)
pc
- PC instancesm
- StateManager to savevoid markAsFlushed(StateManagerInternal sm)
sm
- StateManagerInternal instance that has been flushedboolean insideCommit()
java.lang.Object newSCOInstanceInternal(java.lang.Class type)
type
- Class of the new SCO instance
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)
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)
boolean isSupportedSCOType(java.lang.Class type)
type
- Class type of the field.
void flush()
JDOUserException
- if current transaction is not active.javax.jdo.PersistenceManager getCurrentWrapper()
java.util.Collection getInsertedInstances()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |