|
SolarMetric Kodo JDO 3.4.1 generated on May 30 2006 | ||||||||
| 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.
| Field Summary | |
protected static int |
FLUSH_COMMIT
Flush in preparation of commit. |
protected static int |
FLUSH_INC
Incremental flush. |
protected static int |
FLUSH_LOGICAL
Run persistence-by-reachability and other flush-time operations without accessing the database. |
protected static int |
FLUSH_ROLLBACK
Flush to check consistency of cache, then immediately rollback changes. |
| Fields inherited from interface kodo.runtime.KodoPersistenceManagerSPI |
EXCLUDE_ALL, OID_ALLOW_NEW, OID_COPY, 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 |
| Constructor Summary | |
PersistenceManagerImpl()
|
|
| Method Summary | |
void |
addInstanceLifecycleListener(InstanceLifecycleListener listener,
Class[] classes)
JDO 2.0 Preview. |
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 |
checkConsistency()
JDO 2.0 Preview. |
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()
JDO 2.0 Preview. |
protected void |
flush(int reason)
Flush the transactional state to the data store. |
protected void |
free()
Free the resources used by this persistence manager. |
Collection |
getAddedClasses()
Return the set of classes that have been made persistent in the current transaction. |
boolean |
getAttachFetchFields()
If true, then when attaching a graph of detached objects, the graph will be analyzed to determine all of the instantiated fields and add them to the FetchConfiguration's fields in order to
allow for more optimized loading. |
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 |
getDeletedClasses()
Return the set of classes that have been deleted in the current transaction. |
int |
getDetachFields()
Detach mode constant to determine which fields are part of the detached graph. |
boolean |
getDetachOnClose()
Whether to detach all persistent managed objects when the persistence manager closes. |
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()
|
InverseManager |
getInverseManager()
Return the inverse manager in use. |
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(Class cls,
Object val)
JDO 2.0 Preview. |
Object |
getObjectById(Object oid,
boolean validate)
|
Object |
getObjectById(Object oid,
FetchConfiguration fetch,
BitSet exclude,
Object context,
int flags)
Return the object with the given oid. |
Object |
getObjectId(Object pc)
|
Class |
getObjectIdClass(Class cls)
|
int |
getObjectLookupMode()
Whether to return hollow objects from PersistenceManager.getObjectById(java.lang.Object, boolean) when the validate parameter
is false. |
Object[] |
getObjectsById(Object[] oids,
boolean validate)
JDO 2.0 Preview. |
Object[] |
getObjectsById(Object[] oids,
FetchConfiguration fetch,
BitSet exclude,
Object context,
int flags)
Return the objects with the given oids. |
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 given instance or oid. |
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. |
Collection |
getUpdatedClasses()
Return the set of classes for objects that have been modified in the current transaction. |
Object |
getUserObject()
|
Object |
getUserObject(Object key)
JDO 2.0 Preview. |
void |
initialize(PersistenceManagerFactoryImpl factory,
StoreManager sm,
String user,
String pass,
boolean managed,
int connMode)
Initialize the persistence manager. |
boolean |
isActive()
|
boolean |
isClosed()
|
boolean |
isLargeTransaction()
Whether memory usage is reduced during this transaction at the expense of possibly more aggressive data cache evictions. |
boolean |
isManaged()
Whether this persistence manager is using managed transactions. |
boolean |
isPopulateDataCache()
Whether objects accessed during this transaction will be added to the DataCache. |
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,
Object id,
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)
|
KodoStateManager |
makePersistent(Object pc,
Object id)
Make the given instance persistent. |
void |
makePersistentAll(Collection pcs)
|
void |
makePersistentAll(Object[] pcs)
|
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. |
Query |
newNamedQuery(Class cls,
String name)
JDO 2.0 Preview. |
Object |
newObjectIdInstance(Class cls,
Object val)
JDO 2.0 Preview. |
protected Object |
newObjectIdInstance(Class cls,
Object val,
boolean requireMetaData)
Create a new object id instance from the given value. |
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)
|
KodoStateManager |
newStateManager(Object oid,
boolean copyOids)
Create a new state manager with the given oid and corresponding metadata. |
void |
preFlush()
Run pre-flush actions on transactional objects, including persistence-by-reachability, inverse relationship management, deletion of dependent instances, and instance callbacks. |
Object |
putUserObject(Object key,
Object val)
JDO 2.0 Preview. |
void |
refresh(Object pc)
|
void |
refreshAll()
|
void |
refreshAll(Collection pcs)
|
void |
refreshAll(JDOException jdoe)
JDO 2.0 Preview. |
void |
refreshAll(Object[] pcs)
|
void |
registerListener(TransactionListener tl)
Register a listener for transaction-related events. |
void |
releaseSavepoint()
Release the last set savepoint and any resources associated with it. |
void |
releaseSavepoint(String savepoint)
Release the savepoint and any resources associated with it. |
void |
removeInstanceLifecycleListener(InstanceLifecycleListener listener)
JDO 2.0 Preview. |
boolean |
removeListener(TransactionListener tl)
Remove a listener for transaction-related events. |
Object |
removeUserObject(Object key)
JDO 2.0 Preview. |
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 |
rollbackToSavepoint()
Rollback the current transaction to the last savepoint. |
void |
rollbackToSavepoint(String savepoint)
Rollback the current transaction to the given savepoint name. |
void |
setAttachFetchFields(boolean attachFetchFields)
See getAttachFetchFields(). |
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 |
setDetachFields(int mode)
Detach mode constant to determine which fields are part of the detached graph. |
void |
setDetachFields(String mode)
For string-based auto-configuration of detach fields mode. |
void |
setDetachOnClose(boolean detach)
Whether to detach all persistent managed objects when the persistence manager closes. |
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 |
setLargeTransaction(boolean largeTransaction)
If a large number of objects will be created, modified, or deleted during this transaction setting this option to true will reduce memory usage if you perform periodic flushes. |
void |
setMultithreaded(boolean multithreaded)
|
void |
setNontransactionalRead(boolean val)
|
void |
setNontransactionalWrite(boolean val)
|
void |
setObjectLookupMode(int mode)
Whether to return hollow objects from PersistenceManager.getObjectById(java.lang.Object, boolean) when the validate parameter
is false. |
void |
setOptimistic(boolean val)
|
void |
setPopulateDataCache(boolean cacheObjects)
Whether to populate the DataCache with objects used by this transaction. |
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 |
setSavepoint(String name)
Set a transactional savepoint where operations after this savepoint will be rolled back. |
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 |
| Field Detail |
protected static final int FLUSH_INC
protected static final int FLUSH_COMMIT
protected static final int FLUSH_ROLLBACK
protected static final int FLUSH_LOGICAL
| 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. Maps
oids to state managers. 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 void setPopulateDataCache(boolean cacheObjects)
KodoPersistenceManagersetPopulateDataCache in interface KodoPersistenceManagerpublic boolean isPopulateDataCache()
KodoPersistenceManagerisPopulateDataCache in interface KodoPersistenceManagerpublic void setLargeTransaction(boolean largeTransaction)
KodoPersistenceManagersetLargeTransaction in interface KodoPersistenceManagerpublic boolean isLargeTransaction()
KodoPersistenceManagerisLargeTransaction in interface KodoPersistenceManagerpublic 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 int getObjectLookupMode()
KodoPersistenceManagerPersistenceManager.getObjectById(java.lang.Object, boolean) when the validate parameter
is false.getObjectLookupMode in interface KodoPersistenceManagerpublic void setObjectLookupMode(int mode)
KodoPersistenceManagerPersistenceManager.getObjectById(java.lang.Object, boolean) when the validate parameter
is false.setObjectLookupMode 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()
KodoPersistenceManagerTransaction.getRollbackOnly in interface KodoPersistenceManagerpublic void setRollbackOnly()
KodoPersistenceManagerTransaction.setRollbackOnly in interface KodoPersistenceManagerpublic void setSavepoint(String name)
KodoPersistenceManagersetSavepoint in interface KodoPersistenceManagerpublic void releaseSavepoint()
KodoPersistenceManagerreleaseSavepoint in interface KodoPersistenceManagerpublic void releaseSavepoint(String savepoint)
KodoPersistenceManagerreleaseSavepoint in interface KodoPersistenceManagerpublic void rollbackToSavepoint()
KodoPersistenceManagerrollbackToSavepoint in interface KodoPersistenceManagerpublic void rollbackToSavepoint(String savepoint)
KodoPersistenceManagerrollbackToSavepoint in interface KodoPersistenceManagerpublic void flush()
KodoPersistenceManagerJDOFatalException.flush in interface KodoPersistenceManagerpublic void checkConsistency()
KodoPersistenceManagerKodoPersistenceManager.flush(). In an
optimistic transaction that has not yet begun a datastore-level
transaction, however, it will only report exceptions that would occur
on flush, without retaining any datastore resources.checkConsistency in interface KodoPersistenceManagerpublic void preFlush()
KodoPersistenceManagerpreFlush 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 flush(int reason)
reason - one of FLUSH_INC, FLUSH_COMMIT,
FLUSH_ROLLBACK, or FLUSH_LOGICALprotected 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()
KodoPersistenceManagerpm.currentTransaction().getOptimistic() == false).
When finished with this connection, you should close it as appropriate.getConnection 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 getUpdatedClasses()
KodoPersistenceManagergetUpdatedClasses in interface KodoPersistenceManagerpublic Collection getDeletedClasses()
KodoPersistenceManagergetDeletedClasses in interface KodoPersistenceManagerpublic Collection getAddedClasses()
KodoPersistenceManagergetAddedClasses in interface KodoPersistenceManagerpublic Collection getDirtyClasses()
KodoPersistenceManagerKodoPersistenceManager.makeClassDirty(java.lang.Class).getDirtyClasses in interface KodoPersistenceManager
public Object putUserObject(Object key,
Object val)
KodoPersistenceManagerputUserObject in interface KodoPersistenceManagerpublic Object getUserObject(Object key)
KodoPersistenceManagergetUserObject in interface KodoPersistenceManagerpublic Object removeUserObject(Object key)
KodoPersistenceManagerremoveUserObject in interface KodoPersistenceManagerpublic Object getUserObject()
getUserObject in interface PersistenceManagerpublic void setUserObject(Object o)
setUserObject in interface PersistenceManagerpublic PersistenceManagerFactory getPersistenceManagerFactory()
getPersistenceManagerFactory 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 newObjectIdInstance(Class cls,
Object val)
KodoPersistenceManagernewObjectIdInstance in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagercls - the persitent class that uses this identity valueval - an object id instance, stringified object id, or primary
key value
protected Object newObjectIdInstance(Class cls,
Object val,
boolean requireMetaData)
public Object getObjectById(Object oid,
boolean validate)
getObjectById in interface PersistenceManager
public Object getObjectById(Object oid,
FetchConfiguration fetch,
BitSet exclude,
Object context,
int flags)
KodoPersistenceManagerSPIexclude mask.getObjectById in interface KodoPersistenceManagerSPI
public KodoStateManager newStateManager(Object oid,
boolean copyOids)
newStateManager 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,
BitSet exclude,
Object context,
int flags)
KodoPersistenceManagerSPIgetObjectsById in interface KodoPersistenceManagerSPI
public Object getObjectById(Class cls,
Object val)
KodoPersistenceManagergetObjectById in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagercls - the class of the matching objectval - either an oid instance, the string version of the oid, or
the primary key valuepublic 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 PersistenceManager
public KodoStateManager makePersistent(Object pc,
Object id)
KodoPersistenceManagerSPImakePersistent in interface KodoPersistenceManagerSPIkodo.runtime.KodoPersistenceManagerSPIpc - the instance to persistid - the id to give the state manager; may be null for defaultpublic 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,
Object id,
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 dataid - the id to give the embedded state manager; may be
null for defaultowner - 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 refreshAll(JDOException jdoe)
KodoPersistenceManagerJDOException or nested exceptions.refreshAll in interface KodoPersistenceManagerpublic 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 PersistenceManager
public Query newNamedQuery(Class cls,
String name)
KodoPersistenceManagernewNamedQuery in interface KodoPersistenceManagerkodo.runtime.KodoPersistenceManagercls - if not null, the candidate class to queryname - the name of the query to lookupQuery instance based on the information
defined in the metadatapublic 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 InverseManager getInverseManager()
KodoPersistenceManagerSPIgetInverseManager in interface KodoPersistenceManagerSPIpublic KodoStateManager getState(Object oid)
KodoPersistenceManagergetState in interface KodoPersistenceManagerpublic KodoStateManager getStateManager(Object pc)
KodoPersistenceManagerSPIgetStateManager in interface KodoPersistenceManagerSPI
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 void addInstanceLifecycleListener(InstanceLifecycleListener listener,
Class[] classes)
KodoPersistenceManageraddInstanceLifecycleListener in interface KodoPersistenceManagerpublic void removeInstanceLifecycleListener(InstanceLifecycleListener listener)
KodoPersistenceManagerremoveInstanceLifecycleListener in interface KodoPersistenceManagerpublic boolean getDetachOnClose()
KodoPersistenceManagergetDetachOnClose in interface KodoPersistenceManagerpublic void setDetachOnClose(boolean detach)
KodoPersistenceManagersetDetachOnClose in interface KodoPersistenceManagerpublic void setAttachFetchFields(boolean attachFetchFields)
KodoPersistenceManagerKodoPersistenceManager.getAttachFetchFields().setAttachFetchFields in interface KodoPersistenceManagerpublic boolean getAttachFetchFields()
KodoPersistenceManagerFetchConfiguration's fields in order to
allow for more optimized loading.getAttachFetchFields in interface KodoPersistenceManagerpublic void setDetachFields(String mode)
public int getDetachFields()
KodoPersistenceManagerKodoPersistenceManager.DETACH_FGS.getDetachFields in interface KodoPersistenceManagerpublic void setDetachFields(int mode)
KodoPersistenceManagerKodoPersistenceManager.DETACH_FGS.setDetachFields in interface KodoPersistenceManagerpublic 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.4.1 generated on May 30 2006 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||