|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface implemented by Kodo persistence managers.
| Field Summary | |
static int |
CONN_RETAIN_DEMAND
Constant indicating that connections will be obtained as needed. |
static int |
CONN_RETAIN_PM
Constant indicating that each persistence manager will retain a single connection that it will use for its lifespan. |
static int |
CONN_RETAIN_TRANS
Constant indicating that connections will be retained for the life of each transaction. |
| 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. |
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 |
commitAndResume()
Issue a commit and then start a new transaction. |
Object |
detach(Object pc)
JDO 2.0 Preview. |
Collection |
detachAll(Collection pcs)
JDO 2.0 Preview. |
Object[] |
detachAll(Object[] pcs)
JDO 2.0 Preview. |
void |
evictAll(Class cls)
Evict all persistent-clean and persistent-nontransactional instances in the extent of the given class (including subclasses). |
void |
evictAll(Extent extent)
Evict all persistent-clean and persistent-nontransactional instances in the given Extent. |
void |
flush()
Flush all transactional instances to the data store. |
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. |
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. |
FetchConfiguration |
getFetchConfiguration()
Return the (mutable) fetch configuration for loading objects from this persistence manager. |
Collection |
getManagedObjects()
Return a list of all managed instances. |
ManagedRuntime |
getManagedRuntime()
Return the managed runtime in use. |
Object |
getObjectById(Object oid,
FetchConfiguration conf,
Object connection)
Return the object with the given oid. |
Object[] |
getObjectsById(Object[] oids,
boolean validate)
JDO 2.0 Preview. |
Object[] |
getObjectsById(Object[] oids,
FetchConfiguration conf,
Object connection)
Return the objects with the given oids. |
boolean |
getRollbackOnly()
JDO 2.0 Preview. |
KodoStateManager |
getState(Object oid)
Deprecated. Use getStateManager(java.lang.Object) instead. |
KodoStateManager |
getStateManager(Object pc)
Return the state manager for the given instance. |
StoreManager |
getStoreManager(boolean unwrap)
Return the store manager in use. |
Collection |
getTransactionalObjects()
Return a list of current transaction instances. |
boolean |
isManaged()
Whether this persistence manager is using managed transactions. |
void |
lock()
Deprecated. |
void |
makeClassDirty(Class cls)
Mark the given class as dirty within the current transaction. |
KodoStateManager |
makeEmbedded(Object pc,
KodoStateManager owner,
int ownerField)
Deprecated. |
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,
boolean dfgOnly)
Immediately load the given object's persistent fields. |
void |
rollbackAndResume()
Issue a rollback and then start a new transaction. |
void |
setRollbackOnly()
JDO 2.0 Preview. |
void |
unlock()
Deprecated. |
| 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 |
| Field Detail |
public static final int CONN_RETAIN_DEMAND
public static final int CONN_RETAIN_TRANS
public static final int CONN_RETAIN_PM
| Method Detail |
public JDOConfiguration getConfiguration()
public FetchConfiguration getFetchConfiguration()
public int getConnectionRetainMode()
public Object getConnection()
public boolean isManaged()
public ManagedRuntime getManagedRuntime()
public ClassLoader getClassLoader()
public String getConnectionUserName()
public String getConnectionPassword()
public void registerListener(TransactionListener tl)
public boolean removeListener(TransactionListener tl)
public void commitAndResume()
pm.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.
Transaction.commit(),
Transaction.begin()public void rollbackAndResume()
pm.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.
Transaction.rollback(),
Transaction.begin()public void setRollbackOnly()
public boolean getRollbackOnly()
public void flush()
JDOFatalException.
public Object getObjectById(Object oid,
FetchConfiguration conf,
Object connection)
public Object[] getObjectsById(Object[] oids,
boolean validate)
oids - the oids of the objects to returnboolean - if true, the existance of the objects in
the datastore will be validated.PersistenceManager.getObjectById(Object,boolean)
public Object[] getObjectsById(Object[] oids,
FetchConfiguration conf,
Object connection)
public Object getCachedObjectById(Object oid)
oid - the object's id
public KodoStateManager makeEmbedded(Object pc,
KodoStateManager owner,
int ownerField)
pc - 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 evictAll(Class cls)
public void evictAll(Extent extent)
Extent.public Object detach(Object pc)
pc - the instance to detachdetachAll(Object[])public Collection detachAll(Collection pcs)
pc - the instances to detachdetachAll(Object[])public Object[] detachAll(Object[] pcs)
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.pc - the instances to detachJDOUserException - if any of the instances do not
have the detachable metadata extension.attachAll(Object[]),
KodoHelper.getDetachedObjectId(java.lang.Object),
KodoHelper.getDetachedState(java.lang.Object),
getFetchConfiguration()public Object attach(Object pc)
pc - instance to importattachAll(Object[])public Collection attachAll(Collection pcs)
pcs - Collection of instances to importattachAll(Object[])public Object[] attachAll(Object[] pcs)
pcs - 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.detachAll(Object[])
public void retrieve(Object pc,
boolean dfgOnly)
pc - 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 StoreManager getStoreManager(boolean unwrap)
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 returnedpublic KodoStateManager getState(Object oid)
getStateManager(java.lang.Object) instead.
public KodoStateManager getStateManager(Object pc)
public Collection getManagedObjects()
public Collection getTransactionalObjects()
public void makeClassDirty(Class cls)
public Collection getDirtyClasses()
makeClassDirty(java.lang.Class).public void assertOpen()
public void assertActiveTransaction()
public void assertNontransactionalRead()
public void lock()
Multithreaded flag is set to true. Make sure to call
unlock() in a finally clause of the same method.public void unlock()
|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||