SolarMetric Kodo JDO 3.1.6 generated on August 25 2004

kodo.runtime
Interface KodoPersistenceManagerSPI

All Superinterfaces:
com.solarmetric.util.Closeable, Connection, KodoPersistenceManager, LocalTransaction, LocalTransaction, PersistenceManager, com.solarmetric.profile.ProfilingAgentProvider, com.solarmetric.profile.ProfilingEnvironment, Synchronization, Transaction
All Known Implementing Classes:
PersistenceManagerImpl

public interface KodoPersistenceManagerSPI
extends KodoPersistenceManager

Internal persistence mangager interface.


Fields inherited from interface kodo.runtime.KodoPersistenceManager
CONN_RETAIN_DEMAND, CONN_RETAIN_PM, CONN_RETAIN_TRANS, LOCK_NONE, LOCK_READ, LOCK_WRITE
 
Method Summary
 void assertActiveTransaction()
          Throw an exception if there is no active transaction.
 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.
 LockManager getLockManager()
          Return the lock manager in use.
 Object getObjectById(Object oid, FetchConfiguration conf, 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[] getObjectsById(Object[] oids, FetchConfiguration conf, Object connection)
          Return the objects with the given oids.
 StoreManager getStoreManager(boolean unwrap)
          Return the store manager in use.
 void lock()
          Synchronizes on an internal lock if the Multithreaded flag is set to true.
 KodoStateManager makeEmbedded(Object pc, KodoStateManager owner, int ownerField)
          Make the given instance embedded.
 void unlock()
          Releases the internal lock.
 
Methods inherited from interface kodo.runtime.KodoPersistenceManager
attach, attachAll, attachAll, cancelAll, commitAndResume, detach, detachAll, detachAll, evictAll, evictAll, flush, getCachedObjectById, getClassLoader, getConfiguration, getConnection, getConnectionPassword, getConnectionRetainMode, getConnectionUserName, getDirtyClasses, getFetchConfiguration, getManagedObjects, getManagedRuntime, getObjectsById, getRetainValuesInOptimistic, getRollbackOnly, getState, getStateManager, getTransactionalObjects, isManaged, lockPersistent, lockPersistent, lockPersistentAll, lockPersistentAll, lockPersistentAll, lockPersistentAll, makeClassDirty, registerListener, removeListener, retrieve, rollbackAndResume, setRetainValuesInOptimistic, setRollbackOnly
 
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
 
Methods inherited from interface javax.jdo.Transaction
begin, commit, getNontransactionalRead, getNontransactionalWrite, getOptimistic, getPersistenceManager, getRestoreValues, getRetainValues, getSynchronization, isActive, rollback, setNontransactionalRead, setNontransactionalWrite, setOptimistic, setRestoreValues, setRetainValues, setSynchronization
 
Methods inherited from interface javax.transaction.Synchronization
afterCompletion, beforeCompletion
 
Methods inherited from interface javax.resource.cci.Connection
close, createInteraction, getLocalTransaction, getMetaData, getResultSetInfo
 
Methods inherited from interface javax.resource.cci.LocalTransaction
begin, commit, rollback
 
Methods inherited from interface javax.resource.spi.LocalTransaction
begin, commit, rollback
 
Methods inherited from interface com.solarmetric.util.Closeable
close
 
Methods inherited from interface com.solarmetric.profile.ProfilingAgentProvider
getProfilingAgent
 

Method Detail

getObjectById

public Object getObjectById(Object oid,
                            FetchConfiguration conf,
                            Object connection)
Return the object with the given oid. If present, the cached instance will be returned. Otherwise, the instance will be initialized through the store as usual; however, in this case the store will be passed the given connection information, and the system will load the object according to the given fetch configuratiion (or the persistence manager's configuration, if the given one is null).

getObjectById

public Object getObjectById(Object oid,
                            FetchConfiguration fetch,
                            Object connection,
                            boolean validate,
                            boolean copyOid,
                            boolean allowNew)
Return the object with the given oid.

getObjectsById

public Object[] getObjectsById(Object[] oids,
                               FetchConfiguration conf,
                               Object connection)
Return the objects with the given oids. If present, the cached instance will be returned. Otherwise, the instance will be initialized through the store as usual; however, in this case the store will be passed the given connection information, and the system will load the object according to the given fetch configuratiion (or the persistence manager's configuration, if the given one is null). This method is provided as an optimization opportunity to concrete jdo implementations built on this common runtime. It is not for use by client code.

makeEmbedded

public KodoStateManager makeEmbedded(Object pc,
                                     KodoStateManager owner,
                                     int ownerField)
Make the given instance embedded.
Parameters:
pc - the instance to embed, or null to embed a newly-created instance that will be loaded with datastore data
owner - the owning state manager
ownerField - the field number of the owning object
Returns:
the state manager for the embedded instance

getLockManager

public LockManager getLockManager()
Return the lock manager in use.
Since:
3.1

getStoreManager

public StoreManager getStoreManager(boolean unwrap)
Return the store manager in use.
Specified by:
getStoreManager in interface KodoPersistenceManager
Parameters:
unwrap - 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 returned

lock

public void lock()
Synchronizes on an internal lock if the Multithreaded flag is set to true. Make sure to call unlock() in a finally clause of the same method.

unlock

public void unlock()
Releases the internal lock.

assertOpen

public void assertOpen()
Throw an exception if this persistence manager has been closed.

assertActiveTransaction

public void assertActiveTransaction()
Throw an exception if there is no active transaction.

assertNontransactionalRead

public void assertNontransactionalRead()
Throw an exception if there is no transaction active and nontransactional reading is not enabled.

SolarMetric Kodo JDO 3.1.6 generated on August 25 2004

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.