SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

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 manager interface.


Field Summary
static BitSet EXCLUDE_ALL
          Marker bitset to indicate that all field loads should be excluded in the getObjectById methods of this interface.
static int OID_ALLOW_NEW
           
static int OID_COPY
           
static int OID_VALIDATE
           
 
Fields inherited from interface kodo.runtime.KodoPersistenceManager
CONN_RETAIN_DEMAND, CONN_RETAIN_PM, CONN_RETAIN_TRANS, DETACH_ALL, DETACH_FGS, DETACH_LOADED, LOCK_NONE, LOCK_READ, LOCK_WRITE, LOOKUP_CHECK, LOOKUP_HOLLOW
 
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.
 InverseManager getInverseManager()
          Return the inverse manager in use.
 LockManager getLockManager()
          Return the lock manager in use.
 Object getObjectById(Object oid, FetchConfiguration conf, BitSet exclude, Object context, int flags)
          Return the object with the given oid.
 Object[] getObjectsById(Object[] oids, FetchConfiguration conf, BitSet exclude, Object context, int flags)
          Return the objects with the given oids.
 KodoStateManager getStateManager(Object pc)
          Return the state manager for the given instance.
 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, Object id, KodoStateManager owner, int ownerField)
          Make the given instance embedded.
 KodoStateManager makePersistent(Object pc, Object id)
          Make the given instance persistent.
 KodoStateManager newStateManager(Object oid, boolean copyOids)
          Create a new state manager with the given oid and corresponding metadata.
 void unlock()
          Releases the internal lock.
 
Methods inherited from interface kodo.runtime.KodoPersistenceManager
addInstanceLifecycleListener, attach, attachAll, attachAll, cancelAll, checkConsistency, commitAndResume, detach, detachAll, detachAll, evictAll, evictAll, flush, getCachedObjectById, getClassLoader, getConfiguration, getConnection, getConnectionPassword, getConnectionRetainMode, getConnectionUserName, getDetachFields, getDetachOnClose, getDirtyClasses, getFetchConfiguration, getManagedObjects, getManagedRuntime, getObjectById, getObjectLookupMode, getObjectsById, getRetainValuesInOptimistic, getRollbackOnly, getState, getTransactionalObjects, getUserObject, isManaged, lockPersistent, lockPersistent, lockPersistentAll, lockPersistentAll, lockPersistentAll, lockPersistentAll, makeClassDirty, newNamedQuery, newObjectIdInstance, preFlush, putUserObject, refreshAll, registerListener, removeInstanceLifecycleListener, removeListener, removeUserObject, retrieve, rollbackAndResume, setDetachFields, setDetachOnClose, setObjectLookupMode, 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
 

Field Detail

EXCLUDE_ALL

public static final BitSet EXCLUDE_ALL
Marker bitset to indicate that all field loads should be excluded in the getObjectById methods of this interface.

OID_VALIDATE

public static final int OID_VALIDATE

OID_COPY

public static final int OID_COPY

OID_ALLOW_NEW

public static final int OID_ALLOW_NEW
Method Detail

getObjectById

public Object getObjectById(Object oid,
                            FetchConfiguration conf,
                            BitSet exclude,
                            Object context,
                            int flags)
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 context 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). Fields can optionally be excluded from required loading using the exclude mask.

getObjectsById

public Object[] getObjectsById(Object[] oids,
                               FetchConfiguration conf,
                               BitSet exclude,
                               Object context,
                               int flags)
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 context 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.

makePersistent

public KodoStateManager makePersistent(Object pc,
                                       Object id)
Make the given instance persistent.
Parameters:
pc - the instance to persist
id - the id to give the state manager; may be null for default
Returns:
the state manager for the newly persistent instance

makeEmbedded

public KodoStateManager makeEmbedded(Object pc,
                                     Object id,
                                     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
id - the id to give the embedded state manager; may be null for default
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

getInverseManager

public InverseManager getInverseManager()
Return the inverse manager in use.
Since:
3.2

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

getStateManager

public KodoStateManager getStateManager(Object pc)
Return the state manager for the given instance. Includes objects made persistent in the current transaction.
Specified by:
getStateManager in interface KodoPersistenceManager

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.

newStateManager

public KodoStateManager newStateManager(Object oid,
                                        boolean copyOids)
Create a new state manager with the given oid and corresponding metadata.
Since:
3.2

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

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