|
SolarMetric Kodo JDO 3.1.6 generated on August 25 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--kodo.runtime.PersistenceManagerImpl
Concrete PersistenceManager for use with
this common runtime. The PersistenceManager handles JDO-specific
behavior, but leaves all interaction with the data store to
a StoreManager that must be supplied at initialization.
All options defined in the JDO 1.0 specification are supported, with the exception of non durable identity and changing primary keys.
| Fields inherited from interface kodo.runtime.KodoPersistenceManager |
CONN_RETAIN_DEMAND, CONN_RETAIN_PM, CONN_RETAIN_TRANS, LOCK_NONE, LOCK_READ, LOCK_WRITE |
| Constructor Summary | |
PersistenceManagerImpl()
|
|
| Method Summary | |
void |
afterCompletion(int status)
|
void |
assertActiveTransaction()
Throw an exception if there is no active transaction. |
protected kodo.runtime.StateManagerImpl |
assertManaged(Object pc)
Throw an exception if the given object is not managed; otherwise return its state manager. |
void |
assertNontransactionalRead()
Throw an exception if there is no transaction active and nontransactional reading is not enabled. |
void |
assertOpen()
Throw an exception if this persistence manager has been closed. |
Object |
attach(Object pc)
JDO 2.0 Preview. |
Collection |
attachAll(Collection pcs)
JDO 2.0 Preview. |
Object[] |
attachAll(Object[] pcs)
JDO 2.0 Preview. |
void |
beforeCompletion()
|
void |
begin()
|
boolean |
cancelAll()
Cancel all pending data store statements. |
void |
close()
|
void |
commit()
|
void |
commitAndResume()
Issue a commit and then start a new transaction. |
Interaction |
createInteraction()
|
Transaction |
currentTransaction()
|
void |
deletePersistent(Object pc)
|
void |
deletePersistentAll(Collection pcs)
|
void |
deletePersistentAll(Object[] pcs)
|
Object |
detach(Object pc)
JDO 2.0 Preview. |
Collection |
detachAll(Collection pcs)
JDO 2.0 Preview. |
Object[] |
detachAll(Object[] pcs)
JDO 2.0 Preview. |
protected void |
endTransaction(int status)
End the current transaction, making appropriate state transitions. |
void |
evict(Object pc)
|
void |
evictAll()
|
void |
evictAll(Class cls)
Evict all persistent-clean and persistent-nontransactional instances in the extent of the given class (including subclasses). |
void |
evictAll(Collection pcs)
|
void |
evictAll(Extent extent)
Evict all persistent-clean and persistent-nontransactional instances in the given Extent. |
void |
evictAll(Object[] pcs)
|
protected void |
finalize()
Close on finalize. |
void |
flush()
Flush all transactional instances to the data store. |
protected void |
flushInternal(boolean forCommit)
Flush the transactional state to the data store. |
protected void |
free()
Free the resources used by this persistence manager. |
Object |
getCachedObjectById(Object oid)
Return the cached instance for the given oid/object, or null if not cached. |
ClassLoader |
getClassLoader()
Return the current thread's class loader at the time this persistence manager was obtained from the persistence manager factory. |
boolean |
getCloseOnManagedCommit()
Whether to really close in a managed environment if the close method has been called and the transaction subsequently ends. |
JDOConfiguration |
getConfiguration()
Return the configuration associated with this persistence manager. |
Object |
getConnection()
Return the connection in use by the persistence manager, or a new connection if none. |
String |
getConnectionPassword()
Return the connection password. |
int |
getConnectionRetainMode()
Return the connection retain mode for this persistence manager. |
String |
getConnectionUserName()
Return the connection user name. |
Collection |
getDirtyClasses()
Return the set of classes that have been made dirty in the current transaction. |
boolean |
getEvictFromDataCache()
Whether to also evict an object from the data cache when it is evicted through the persistence manager. |
Extent |
getExtent(Class type,
boolean subclasses)
|
FetchConfiguration |
getFetchConfiguration()
Return the (mutable) fetch configuration for loading objects from this persistence manager. |
boolean |
getIgnoreCache()
|
LocalTransaction |
getLocalTransaction()
|
LockManager |
getLockManager()
Return the lock manager in use. |
Log |
getLog()
|
Collection |
getManagedObjects()
Return a list of all managed instances. |
ManagedRuntime |
getManagedRuntime()
Return the managed runtime in use. |
protected Collection |
getManagedStates()
|
ConnectionMetaData |
getMetaData()
|
boolean |
getMultithreaded()
|
boolean |
getNontransactionalRead()
|
boolean |
getNontransactionalWrite()
|
Object |
getObjectById(Object oid,
boolean validate)
|
Object |
getObjectById(Object oid,
FetchConfiguration fetch,
Object connection)
Return the object with the given oid. |
Object |
getObjectById(Object oid,
FetchConfiguration fetch,
Object connection,
boolean validate,
boolean copyOid,
boolean allowNew)
Return the object with the given oid. |
Object |
getObjectId(Object pc)
|
Class |
getObjectIdClass(Class cls)
|
Object[] |
getObjectsById(Object[] oids,
boolean validate)
JDO 2.0 Preview. |
Object[] |
getObjectsById(Object[] oids,
FetchConfiguration fetch,
Object connection)
Return the objects with the given oids. |
protected Object[] |
getObjectsById(Object[] oids,
FetchConfiguration fetch,
Object connection,
boolean validate,
boolean copyOids,
boolean allowNew)
|
boolean |
getOptimistic()
|
PersistenceManager |
getPersistenceManager()
|
PersistenceManagerFactory |
getPersistenceManagerFactory()
|
com.solarmetric.profile.ProfilingAgent |
getProfilingAgent()
|
boolean |
getRestoreValues()
|
ResultSetInfo |
getResultSetInfo()
|
boolean |
getRetainValues()
|
boolean |
getRetainValuesInOptimistic()
Per-persistence manager configuration of whether to retain values when entering an optimistic transaction. |
boolean |
getRollbackOnly()
JDO 2.0 Preview. |
KodoStateManager |
getState(Object oid)
Return the state manager for the instance with the given oid. |
KodoStateManager |
getStateManager(Object pc)
Return the state manager for the given instance. |
protected kodo.runtime.StateManagerImpl |
getStateManager(Object pc,
Object oid,
boolean allowNew)
Return the StateManager for the instance with the given id. |
StoreManager |
getStoreManager(boolean unwrap)
Return the store manager in use. |
Synchronization |
getSynchronization()
|
Object |
getTransactionalObjectId(Object pc)
|
Collection |
getTransactionalObjects()
Return a list of current transaction instances. |
protected Collection |
getTransactionalStates()
Return a copy of all transactional state managers. |
Object |
getUserObject()
|
void |
initialize(PersistenceManagerFactoryImpl factory,
StoreManager sm,
String user,
String pass,
boolean managed,
int connMode)
Initialize the persistence manager. |
boolean |
isActive()
|
boolean |
isClosed()
|
boolean |
isManaged()
Whether this persistence manager is using managed transactions. |
void |
lock()
Synchronizes on an internal lock if the Multithreaded flag is set to true. |
void |
lockPersistent(Object pc)
Ensure that the given instance is locked at the current lock level, as set in the FetchConfiguration for the persistence manager. |
void |
lockPersistent(Object pc,
int level,
int timeout)
Ensure that the given instance is locked at the given lock level. |
void |
lockPersistentAll(Collection pcs)
Ensure that the given instances are locked at the current lock level, as set in the FetchConfiguration for the persistence manager. |
void |
lockPersistentAll(Collection pcs,
int level,
int timeout)
Ensure that the given instances are locked at the given lock level. |
void |
lockPersistentAll(Object[] pcs)
Ensure that the given instances are locked at the current lock level, as set in the FetchConfiguration for the persistence manager. |
void |
lockPersistentAll(Object[] pcs,
int level,
int timeout)
Ensure that the given instances are locked at the given lock level. |
void |
makeClassDirty(Class cls)
Mark the given class as dirty within the current transaction. |
KodoStateManager |
makeEmbedded(Object pc,
KodoStateManager owner,
int ownerField)
Make the given instance embedded. |
void |
makeNontransactional(Object pc)
|
void |
makeNontransactionalAll(Collection pcs)
|
void |
makeNontransactionalAll(Object[] pcs)
|
void |
makePersistent(Object pc)
|
void |
makePersistentAll(Collection pcs)
|
void |
makePersistentAll(Object[] pcs)
|
protected KodoStateManager |
makePersistentInternal(Object pc)
|
void |
makeTransactional(Object pc)
|
void |
makeTransactionalAll(Collection pcs)
|
void |
makeTransactionalAll(Object[] pcs)
|
void |
makeTransient(Object pc)
|
void |
makeTransientAll(Collection pcs)
|
void |
makeTransientAll(Object[] pcs)
|
protected Map |
newManagedObjectCache()
Create a Map to be used for the managed object cache. |
Object |
newObjectIdInstance(Class cls,
String str)
|
Query |
newQuery()
|
Query |
newQuery(Class cls)
|
Query |
newQuery(Class cls,
Collection cln)
|
Query |
newQuery(Class cls,
Collection cln,
String filter)
|
Query |
newQuery(Class cls,
String filter)
|
Query |
newQuery(Extent ext)
|
Query |
newQuery(Extent ext,
String filter)
|
Query |
newQuery(Object compiled)
|
Query |
newQuery(String language,
Object compiled)
|
void |
refresh(Object pc)
|
void |
refreshAll()
|
void |
refreshAll(Collection pcs)
|
void |
refreshAll(Object[] pcs)
|
void |
registerListener(TransactionListener tl)
Register a listener for transaction-related events. |
boolean |
removeListener(TransactionListener tl)
Remove a listener for transaction-related events. |
void |
retrieve(Object pc)
|
void |
retrieve(Object pc,
boolean dfgOnly)
Immediately load the given object's persistent fields. |
void |
retrieveAll(Collection pcs)
|
void |
retrieveAll(Collection pcs,
boolean dfgOnly)
|
void |
retrieveAll(Object[] pcs)
|
void |
retrieveAll(Object[] pcs,
boolean dfgOnly)
|
void |
rollback()
|
void |
rollbackAndResume()
Issue a rollback and then start a new transaction. |
void |
setCloseOnManagedCommit(boolean close)
Whether to really close in a managed environment if the close method has been called and the transaction subsequently ends. |
void |
setEvictFromDataCache(boolean evict)
Whether to also evict an object from the data cache when it is evicted through the persistence manager. |
void |
setIgnoreCache(boolean val)
|
void |
setMultithreaded(boolean multithreaded)
|
void |
setNontransactionalRead(boolean val)
|
void |
setNontransactionalWrite(boolean val)
|
void |
setOptimistic(boolean val)
|
void |
setRestoreValues(boolean val)
|
void |
setRetainValues(boolean val)
|
void |
setRetainValuesInOptimistic(boolean val)
Per-persistence manager configuration of whether to retain values when entering an optimistic transaction. |
void |
setRollbackOnly()
JDO 2.0 Preview. |
void |
setSynchronization(Synchronization synch)
|
void |
setUserObject(Object o)
|
void |
unlock()
Releases the internal lock. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PersistenceManagerImpl()
| Method Detail |
public void initialize(PersistenceManagerFactoryImpl factory,
StoreManager sm,
String user,
String pass,
boolean managed,
int connMode)
factory - the PersistenceManagerFactory used to create
this PersistenceManagersm - a concrete StoreManager implementation to
handle interaction with the data storeuser - the username this PersistenceManager represents;
used when pooling managers to make sure that
a request to the PersistenceManagerFactory for
a connection with an explicit user is
delegated to a suitable PersistenceManagerpass - the password for the above usermanaged - the transaction modeconnMode - the connection retain mode
protected void finalize()
throws Throwable
finalize in class Objectprotected Map newManagedObjectCache()
Map to be used for the managed object cache. By
default, this creates a ReferenceMap with soft values.public boolean getCloseOnManagedCommit()
public void setCloseOnManagedCommit(boolean close)
public boolean getEvictFromDataCache()
public void setEvictFromDataCache(boolean evict)
public ConnectionMetaData getMetaData()
getMetaData in interface Connection
public Interaction createInteraction()
throws NotSupportedException
createInteraction in interface Connection
public LocalTransaction getLocalTransaction()
throws NotSupportedException
getLocalTransaction in interface Connection
public ResultSetInfo getResultSetInfo()
throws NotSupportedException
getResultSetInfo in interface Connectionpublic PersistenceManager getPersistenceManager()
getPersistenceManager in interface Transactionpublic boolean getNontransactionalRead()
getNontransactionalRead in interface Transactionpublic void setNontransactionalRead(boolean val)
setNontransactionalRead in interface Transactionpublic boolean getNontransactionalWrite()
getNontransactionalWrite in interface Transactionpublic void setNontransactionalWrite(boolean val)
setNontransactionalWrite in interface Transactionpublic boolean getOptimistic()
getOptimistic in interface Transactionpublic void setOptimistic(boolean val)
setOptimistic in interface Transactionpublic boolean getRetainValues()
getRetainValues in interface Transactionpublic void setRetainValues(boolean val)
setRetainValues in interface Transactionpublic boolean getRetainValuesInOptimistic()
KodoPersistenceManagergetRetainValuesInOptimistic in interface KodoPersistenceManagerpublic void setRetainValuesInOptimistic(boolean val)
KodoPersistenceManagersetRetainValuesInOptimistic in interface KodoPersistenceManagerpublic boolean getRestoreValues()
getRestoreValues in interface Transactionpublic void setRestoreValues(boolean val)
setRestoreValues in interface Transactionpublic boolean getIgnoreCache()
getIgnoreCache in interface PersistenceManagerpublic void setIgnoreCache(boolean val)
setIgnoreCache in interface PersistenceManagerpublic void begin()
begin in interface Transactionpublic void commit()
commit in interface Transactionpublic void rollback()
rollback in interface Transactionpublic boolean getRollbackOnly()
KodoPersistenceManagergetRollbackOnly in interface KodoPersistenceManagerpublic void setRollbackOnly()
KodoPersistenceManagersetRollbackOnly in interface KodoPersistenceManagerpublic void flush()
KodoPersistenceManagerJDOFatalException.flush in interface KodoPersistenceManagerpublic void commitAndResume()
KodoPersistenceManagerpm.currentTransaction ().commit (); pm.currentTransaction ().begin ();except that the PersistenceManager's internal atomic lock is utilized, so this method can be safely executed from multiple threads.
commitAndResume in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerTransaction.commit(),
Transaction.begin()public void rollbackAndResume()
KodoPersistenceManagerpm.currentTransaction ().rollback (); pm.currentTransaction ().begin ();except that the PersistenceManager's internal atomic lock is utilized, so this method can be safely executed from multiple threads.
rollbackAndResume in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerTransaction.rollback(),
Transaction.begin()public Synchronization getSynchronization()
getSynchronization in interface Transactionpublic void setSynchronization(Synchronization synch)
setSynchronization in interface Transactionpublic boolean isActive()
isActive in interface Transactionpublic void beforeCompletion()
beforeCompletion in interface Synchronizationpublic void afterCompletion(int status)
afterCompletion in interface Synchronizationprotected void flushInternal(boolean forCommit)
protected void endTransaction(int status)
public JDOConfiguration getConfiguration()
KodoPersistenceManagergetConfiguration in interface KodoPersistenceManagerpublic Log getLog()
public FetchConfiguration getFetchConfiguration()
KodoPersistenceManagergetFetchConfiguration in interface KodoPersistenceManagerpublic int getConnectionRetainMode()
KodoPersistenceManagergetConnectionRetainMode in interface KodoPersistenceManagerpublic Object getConnection()
KodoPersistenceManagergetConnection in interface KodoPersistenceManagerpublic boolean isManaged()
KodoPersistenceManagerisManaged in interface KodoPersistenceManagerpublic ManagedRuntime getManagedRuntime()
KodoPersistenceManagergetManagedRuntime in interface KodoPersistenceManagerpublic ClassLoader getClassLoader()
KodoPersistenceManagergetClassLoader in interface KodoPersistenceManagerpublic String getConnectionUserName()
KodoPersistenceManagergetConnectionUserName in interface KodoPersistenceManagerpublic String getConnectionPassword()
KodoPersistenceManagergetConnectionPassword in interface KodoPersistenceManagerpublic com.solarmetric.profile.ProfilingAgent getProfilingAgent()
getProfilingAgent in interface com.solarmetric.profile.ProfilingAgentProviderpublic void makeClassDirty(Class cls)
KodoPersistenceManagermakeClassDirty in interface KodoPersistenceManagerpublic Collection getDirtyClasses()
KodoPersistenceManagerKodoPersistenceManager.makeClassDirty(java.lang.Class).getDirtyClasses in interface KodoPersistenceManagerpublic PersistenceManagerFactory getPersistenceManagerFactory()
getPersistenceManagerFactory in interface PersistenceManagerpublic Object getUserObject()
getUserObject in interface PersistenceManagerpublic void setUserObject(Object o)
setUserObject in interface PersistenceManagerpublic boolean getMultithreaded()
getMultithreaded in interface PersistenceManagerpublic void setMultithreaded(boolean multithreaded)
setMultithreaded in interface PersistenceManagerpublic void registerListener(TransactionListener tl)
KodoPersistenceManagerregisterListener in interface KodoPersistenceManagerpublic boolean removeListener(TransactionListener tl)
KodoPersistenceManagerremoveListener in interface KodoPersistenceManagerpublic Transaction currentTransaction()
currentTransaction in interface PersistenceManagerpublic boolean cancelAll()
KodoPersistenceManagercancelAll in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpublic boolean isClosed()
isClosed in interface PersistenceManagerpublic void close()
close in interface PersistenceManagerprotected void free()
public Object getObjectId(Object pc)
getObjectId in interface PersistenceManagerpublic Object getTransactionalObjectId(Object pc)
getTransactionalObjectId in interface PersistenceManagerpublic Class getObjectIdClass(Class cls)
getObjectIdClass in interface PersistenceManager
public Object newObjectIdInstance(Class cls,
String str)
newObjectIdInstance in interface PersistenceManager
public Object getObjectById(Object oid,
boolean validate)
getObjectById in interface PersistenceManager
public Object getObjectById(Object oid,
FetchConfiguration fetch,
Object connection)
KodoPersistenceManagerSPIgetObjectById in interface KodoPersistenceManagerSPI
public Object getObjectById(Object oid,
FetchConfiguration fetch,
Object connection,
boolean validate,
boolean copyOid,
boolean allowNew)
KodoPersistenceManagerSPIgetObjectById in interface KodoPersistenceManagerSPI
public Object[] getObjectsById(Object[] oids,
boolean validate)
KodoPersistenceManagergetObjectsById in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManageroids - the oids of the objects to returnvalidate - if true, the existance of the objects in
the datastore will be validated.PersistenceManager.getObjectById(Object,boolean)
public Object[] getObjectsById(Object[] oids,
FetchConfiguration fetch,
Object connection)
KodoPersistenceManagerSPIgetObjectsById in interface KodoPersistenceManagerSPI
protected Object[] getObjectsById(Object[] oids,
FetchConfiguration fetch,
Object connection,
boolean validate,
boolean copyOids,
boolean allowNew)
public Object getCachedObjectById(Object oid)
KodoPersistenceManagergetCachedObjectById in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManageroid - the object's idpublic void makePersistentAll(Collection pcs)
makePersistentAll in interface PersistenceManagerpublic void makePersistentAll(Object[] pcs)
makePersistentAll in interface PersistenceManagerpublic void makePersistent(Object pc)
makePersistent in interface PersistenceManagerprotected KodoStateManager makePersistentInternal(Object pc)
public void deletePersistentAll(Collection pcs)
deletePersistentAll in interface PersistenceManagerpublic void deletePersistentAll(Object[] pcs)
deletePersistentAll in interface PersistenceManagerpublic void deletePersistent(Object pc)
deletePersistent in interface PersistenceManagerpublic void makeNontransactionalAll(Collection pcs)
makeNontransactionalAll in interface PersistenceManagerpublic void makeNontransactionalAll(Object[] pcs)
makeNontransactionalAll in interface PersistenceManagerpublic void makeNontransactional(Object pc)
makeNontransactional in interface PersistenceManagerpublic void makeTransactionalAll(Collection pcs)
makeTransactionalAll in interface PersistenceManagerpublic void makeTransactionalAll(Object[] pcs)
makeTransactionalAll in interface PersistenceManagerpublic void makeTransactional(Object pc)
makeTransactional in interface PersistenceManagerpublic void makeTransientAll(Collection pcs)
makeTransientAll in interface PersistenceManagerpublic void makeTransientAll(Object[] pcs)
makeTransientAll in interface PersistenceManagerpublic void makeTransient(Object pc)
makeTransient in interface PersistenceManager
public KodoStateManager makeEmbedded(Object pc,
KodoStateManager owner,
int ownerField)
KodoPersistenceManagerSPImakeEmbedded in interface KodoPersistenceManagerSPIkodo.runtime.KodoPersistenceManagerSPIpc - the instance to embed, or null to embed a
newly-created instance that will be loaded with
datastore dataowner - the owning state managerownerField - the field number of the owning objectpublic void refreshAll()
refreshAll in interface PersistenceManagerpublic void refreshAll(Collection pcs)
refreshAll in interface PersistenceManagerpublic void refreshAll(Object[] pcs)
refreshAll in interface PersistenceManagerpublic void refresh(Object pc)
refresh in interface PersistenceManagerpublic void retrieveAll(Collection pcs)
retrieveAll in interface PersistenceManager
public void retrieveAll(Collection pcs,
boolean dfgOnly)
retrieveAll in interface PersistenceManagerpublic void retrieveAll(Object[] pcs)
retrieveAll in interface PersistenceManager
public void retrieveAll(Object[] pcs,
boolean dfgOnly)
retrieveAll in interface PersistenceManagerpublic void retrieve(Object pc)
retrieve in interface PersistenceManager
public void retrieve(Object pc,
boolean dfgOnly)
KodoPersistenceManagerretrieve in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpc - the instance whose fields should be retrieveddfgOnly - indicator as to whether to retrieve only fields
in the current fetch groups, or all fieldsPersistenceManager.retrieveAll(Collection,boolean)public void evictAll()
evictAll in interface PersistenceManagerpublic void evictAll(Collection pcs)
evictAll in interface PersistenceManagerpublic void evictAll(Object[] pcs)
evictAll in interface PersistenceManagerpublic void evictAll(Class cls)
KodoPersistenceManagerevictAll in interface KodoPersistenceManagerpublic void evictAll(Extent extent)
KodoPersistenceManagerExtent.evictAll in interface KodoPersistenceManagerpublic void evict(Object pc)
evict in interface PersistenceManagerpublic void lockPersistent(Object pc)
KodoPersistenceManagerFetchConfiguration for the persistence manager.lockPersistent in interface KodoPersistenceManager
public void lockPersistent(Object pc,
int level,
int timeout)
KodoPersistenceManagerlockPersistent in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpc - the object to locklevel - the lock level to usetimeout - the number of milliseconds to wait for the lock before
giving up, or -1 for no limitpublic void lockPersistentAll(Collection pcs)
KodoPersistenceManagerFetchConfiguration for the persistence manager.lockPersistentAll in interface KodoPersistenceManager
public void lockPersistentAll(Collection pcs,
int level,
int timeout)
KodoPersistenceManagerlockPersistentAll in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpcs - the objects to locklevel - the lock level to usetimeout - the number of milliseconds to wait for the lock before
giving up, or -1 for no limitpublic void lockPersistentAll(Object[] pcs)
KodoPersistenceManagerFetchConfiguration for the persistence manager.lockPersistentAll in interface KodoPersistenceManager
public void lockPersistentAll(Object[] pcs,
int level,
int timeout)
KodoPersistenceManagerlockPersistentAll in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpcs - the objects to locklevel - the lock level to usetimeout - the number of milliseconds to wait for the lock before
giving up, or -1 for no limit
public Extent getExtent(Class type,
boolean subclasses)
getExtent in interface PersistenceManagerpublic Query newQuery()
newQuery in interface PersistenceManagerpublic Query newQuery(Class cls)
newQuery in interface PersistenceManager
public Query newQuery(Class cls,
Collection cln)
newQuery in interface PersistenceManagerpublic Query newQuery(Extent ext)
newQuery in interface PersistenceManager
public Query newQuery(Class cls,
Collection cln,
String filter)
newQuery in interface PersistenceManager
public Query newQuery(Extent ext,
String filter)
newQuery in interface PersistenceManager
public Query newQuery(Class cls,
String filter)
newQuery in interface PersistenceManagerpublic Query newQuery(Object compiled)
newQuery in interface PersistenceManager
public Query newQuery(String language,
Object compiled)
newQuery in interface PersistenceManagerpublic void lock()
KodoPersistenceManagerSPIMultithreaded flag is set to true. Make sure to call
KodoPersistenceManagerSPI.unlock() in a finally clause of the same method.lock in interface KodoPersistenceManagerSPIpublic void unlock()
KodoPersistenceManagerSPIunlock in interface KodoPersistenceManagerSPIpublic StoreManager getStoreManager(boolean unwrap)
KodoPersistenceManagerSPIgetStoreManager in interface KodoPersistenceManagerSPIkodo.runtime.KodoPersistenceManagerSPIunwrap - if true, the native store manager will be returned;
otherwise, the store manager used by this
persistence manager, which may be a decorator
around the native store manager, will be returnedpublic LockManager getLockManager()
KodoPersistenceManagerSPIgetLockManager in interface KodoPersistenceManagerSPIpublic KodoStateManager getState(Object oid)
KodoPersistenceManagergetState in interface KodoPersistenceManagerpublic KodoStateManager getStateManager(Object pc)
KodoPersistenceManagergetStateManager in interface KodoPersistenceManager
protected kodo.runtime.StateManagerImpl getStateManager(Object pc,
Object oid,
boolean allowNew)
allowNew - if true, objects made persistent in the current
transaction will be included in the search;
if multiple new objects match the given oid, it
is undetermined which will be returnedpublic Collection getManagedObjects()
KodoPersistenceManagergetManagedObjects in interface KodoPersistenceManagerpublic Collection getTransactionalObjects()
KodoPersistenceManagergetTransactionalObjects in interface KodoPersistenceManagerprotected Collection getManagedStates()
protected Collection getTransactionalStates()
public Object detach(Object pc)
KodoPersistenceManagerdetach in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpc - the instance to detachKodoPersistenceManager.detachAll(Object[])public Object[] detachAll(Object[] pcs)
KodoPersistenceManagerKodoPersistenceManager.attachAll(Object[]). The detached
instances will be unmanaged copies of the specified parameters,
and are suitable for serialization and manipulation outside
of a Kodo environment. When detaching instances, only fields
in the current FetchConfiguration will be traversed. Thus,
to detach a graph of objects, relations to other persistent
instances must either be in the default-fetch-group,
or in the current custom FetchConfiguration.detachAll in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpcs - the instances to detachJDOUserException - if any of the instances do not
have the detachable metadata extension.KodoPersistenceManager.attachAll(Object[]),
KodoHelper.getDetachedObjectId(java.lang.Object),
KodoHelper.getDetachedState(java.lang.Object),
KodoPersistenceManager.getFetchConfiguration()public Collection detachAll(Collection pcs)
KodoPersistenceManagerdetachAll in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpcs - the instances to detachKodoPersistenceManager.detachAll(Object[])public Object attach(Object pc)
KodoPersistenceManagerattach in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpc - instance to importKodoPersistenceManager.attachAll(Object[])public Object[] attachAll(Object[] pcs)
KodoPersistenceManagerattachAll in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpcs - array of instances to importJDOUserException - if any of the instances are not detachable,
or if there is not a current active transaction.JDOOptimisticVerificationException - when attempting to
attaching instance that has been deleted in
the data store, or when attaching an instance into
a PersistenceManager that currently has cached
an earlier version of that instance.KodoPersistenceManager.detachAll(Object[])public Collection attachAll(Collection pcs)
KodoPersistenceManagerattachAll in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagerpcs - Collection of instances to importKodoPersistenceManager.attachAll(Object[])public void assertOpen()
KodoPersistenceManagerSPIassertOpen in interface KodoPersistenceManagerSPIpublic void assertActiveTransaction()
KodoPersistenceManagerSPIassertActiveTransaction in interface KodoPersistenceManagerSPIpublic void assertNontransactionalRead()
KodoPersistenceManagerSPIassertNontransactionalRead in interface KodoPersistenceManagerSPIprotected kodo.runtime.StateManagerImpl assertManaged(Object pc)
|
SolarMetric Kodo JDO 3.1.6 generated on August 25 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||