|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.jdo.JDOPersistenceManager
public class JDOPersistenceManager
Provide the basics of a JDO PersistenceManager using an underlying ObjectManager to perform the actual persistence.
| Field Summary | |
|---|---|
protected AbstractPersistenceManagerFactory |
apmf
Owning PersistenceManagerFactory. |
protected JDOFetchPlan |
fetchPlan
JDO Fetch Plan. |
protected javax.jdo.Transaction |
jdotx
|
protected static Localiser |
LOCALISER
Localisation utility for output messages from core. |
protected static Localiser |
LOCALISER_JDO
Localisation utility for output messages from jdo. |
protected ObjectManager |
objectMgr
Backing ObjectManager for this PersistenceManager. |
| Constructor Summary | |
|---|---|
JDOPersistenceManager(AbstractPersistenceManagerFactory apmf,
java.lang.String userName,
java.lang.String password)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener,
java.lang.Class[] classes)
Method to register a lifecycle listener as per JDO 2.0 spec 12.15. |
protected void |
assertActiveTransaction()
Method to assert if the current transaction is active. |
protected void |
assertIsOpen()
Method to assert if this Persistence Manager is open. |
protected void |
assertReadable(java.lang.String operation)
Method to assert if no active transaction and nontransactionalRead is not set. |
protected void |
assertWritable()
Method to assert if the current transaction is active or non transactional writes are allowed. |
void |
checkConsistency()
This method validates the cache with the datastore. |
void |
close()
Method to close the Persistence Manager. |
javax.jdo.Transaction |
currentTransaction()
Accessor for the current transaction. |
void |
deletePersistent(java.lang.Object obj)
JDO method to delete an object from the datastore. |
void |
deletePersistentAll(java.util.Collection pcs)
JDO method to delete a collection of objects from the datastore. |
void |
deletePersistentAll(java.lang.Object[] pcs)
JDO method to delete an array of objects from the datastore. |
java.lang.Object |
detachCopy(java.lang.Object pc)
JDO method to detach a persistent object. |
java.util.Collection |
detachCopyAll(java.util.Collection pcs)
Detach the specified objects from the PersistenceManager. |
java.lang.Object[] |
detachCopyAll(java.lang.Object[] pcs)
Detach the specified objects from the PersistenceManager. |
void |
evict(java.lang.Object obj)
Method to evict an object from L1 cache. |
void |
evictAll()
Method to evict all current objects from L1 cache. |
void |
evictAll(boolean subclasses,
java.lang.Class cls)
Method to evict all objects of the specified type (and optionaly its subclasses). |
void |
evictAll(java.lang.Class cls,
boolean subclasses)
Deprecated. |
void |
evictAll(java.util.Collection pcs)
Method to evict a collection of objects from L1 cache. |
void |
evictAll(java.lang.Object[] pcs)
Method to evict an array of objects from L1 cache. |
void |
flush()
This method flushes all dirty, new, and deleted instances to the datastore. |
AbstractPersistenceManagerFactory |
getAbstractPersistenceManagerFactory()
Accessor for the PersistenceManager Factory. |
boolean |
getCopyOnAttach()
Accessor for whether to copy objects on attaching. |
javax.jdo.datastore.JDOConnection |
getDataStoreConnection()
Accessor for a connection on the datastore. |
boolean |
getDetachAllOnCommit()
Accessor for whether to detach all objects on commit of the transaction. |
javax.jdo.Extent |
getExtent(java.lang.Class pcClass)
Extents are collections of datastore objects managed by the datastore, not by explicit user operations on collections. |
javax.jdo.Extent |
getExtent(java.lang.Class pcClass,
boolean subclasses)
Extents are collections of datastore objects managed by the datastore, not by explicit user operations on collections. |
javax.jdo.FetchGroup |
getFetchGroup(java.lang.Class cls,
java.lang.String name)
Method to return a fetch group for the specified class, with the specified name. |
javax.jdo.FetchPlan |
getFetchPlan()
Acessor for the current FetchPlan |
boolean |
getIgnoreCache()
Accessor for whether to ignore the cache. |
java.util.Set |
getManagedObjects()
Accessor for the objects currently managed by this PM in the current transaction. |
java.util.Set |
getManagedObjects(java.lang.Class[] classes)
Accessor for the objects currently managed by this PM in the current transaction. |
java.util.Set |
getManagedObjects(java.util.EnumSet states)
Accessor for the objects currently managed by this PM in the current transaction. |
java.util.Set |
getManagedObjects(java.util.EnumSet states,
java.lang.Class[] classes)
Accessor for the objects currently managed by this PM in the current transaction. |
boolean |
getMultithreaded()
Accessor for whether the Persistence Manager is multithreaded. |
java.lang.Object |
getObjectById(java.lang.Class cls,
java.lang.Object key)
Convenience method that exactly matches the behavior of calling pm.getObjectById (pm.newObjectIdInstance (cls, key), true). |
java.lang.Object |
getObjectById(java.lang.Object id)
Accessor for an object given the object id. |
java.lang.Object |
getObjectById(java.lang.Object id,
boolean validate)
Accessor for an object given the object id. |
java.lang.Object |
getObjectId(java.lang.Object pc)
Accessor for an object id given the object. |
java.lang.Class |
getObjectIdClass(java.lang.Class cls)
Accessor for the class of the object id given the class of object. |
ObjectManager |
getObjectManager()
Convenience accessor for the ObjectManager performing the actual persistence. |
java.lang.Object[] |
getObjectsById(boolean validate,
java.lang.Object[] oids)
Accessor for the objects given the object ids. |
java.util.Collection |
getObjectsById(java.util.Collection oids)
Accessor for the objects given the object ids, validating the objects. |
java.util.Collection |
getObjectsById(java.util.Collection oids,
boolean validate)
Accessor for the objects given the object ids. |
java.lang.Object[] |
getObjectsById(java.lang.Object[] oids)
Accessor for the objects given the object ids, validating the objects. |
java.lang.Object[] |
getObjectsById(java.lang.Object[] oids,
boolean validate)
Accessor for the objects given the object ids. |
javax.jdo.PersistenceManagerFactory |
getPersistenceManagerFactory()
Accessor for the PersistenceManager Factory. |
javax.jdo.datastore.Sequence |
getSequence(java.lang.String sequenceName)
Method to retrieve a sequence by name. |
java.util.Date |
getServerDate()
Accessor for the date on the datastore. |
java.lang.Object |
getTransactionalObjectId(java.lang.Object pc)
Accessor for the object id of a transactional object given the object. |
java.lang.Object |
getUserObject()
The application might manage PersistenceManager instances by using an associated object for bookkeeping purposes. |
java.lang.Object |
getUserObject(java.lang.Object key)
Method to get a user object from the PersistenceManager. |
protected boolean |
hasPersistenceInformationForClass(java.lang.Class cls)
Utility method to check if the specified class has reachable metadata/annotations. |
boolean |
isClosed()
Accessor for whether this ObjectManager is closed. |
void |
makeNontransactional(java.lang.Object pc)
Method to make nontransactional an object. |
void |
makeNontransactionalAll(java.util.Collection pcs)
Method to make nontransactional a collection of objects. |
void |
makeNontransactionalAll(java.lang.Object[] pcs)
Method to make nontransactional an array of objects. |
java.lang.Object |
makePersistent(java.lang.Object obj)
JDO method to persist an object. |
java.util.Collection |
makePersistentAll(java.util.Collection pcs)
JDO method to make persistent a collection of objects. |
java.lang.Object[] |
makePersistentAll(java.lang.Object[] pcs)
JDO method to make persistent an array of objects. |
void |
makeTransactional(java.lang.Object pc)
Method to make transactional an object. |
void |
makeTransactionalAll(java.util.Collection pcs)
Method to make transactional a collection of objects. |
void |
makeTransactionalAll(java.lang.Object[] pcs)
Method to make transactional an array of objects. |
void |
makeTransient(java.lang.Object pc)
Method to make transient an object. |
void |
makeTransient(java.lang.Object pc,
boolean useFetchPlan)
Method to make transient an object allowing fetching using the fetch plan. |
void |
makeTransientAll(boolean includeFetchPlan,
java.lang.Object[] pcs)
Method to make transient an array of objects. |
void |
makeTransientAll(java.util.Collection pcs)
Method to make transient a collection of objects. |
void |
makeTransientAll(java.util.Collection pcs,
boolean useFetchPlan)
Method to make transient a collection of objects. |
void |
makeTransientAll(java.lang.Object[] pcs)
Method to make transient an array of objects. |
void |
makeTransientAll(java.lang.Object[] pcs,
boolean includeFetchPlan)
Method to make transient an array of objects. |
java.lang.Object |
newInstance(java.lang.Class persistenceCapable)
Method to generate an instance of an interface, abstract class, or concrete PC class. |
javax.jdo.Query |
newNamedQuery(java.lang.Class cls,
java.lang.String queryName)
Construct a query instance with the candidate class and the query name. |
java.lang.Object |
newObjectIdInstance(java.lang.Class pcClass,
java.lang.Object key)
This method returns an object id instance corresponding to the pcClass and key arguments. |
javax.jdo.Query |
newQuery()
Construct an empty query instance. |
javax.jdo.Query |
newQuery(java.lang.Class cls)
Construct a query instance with the candidate class specified. |
javax.jdo.Query |
newQuery(java.lang.Class cls,
java.util.Collection cln)
Construct a query instance with the candidate class and candidate Collection specified. |
javax.jdo.Query |
newQuery(java.lang.Class cls,
java.util.Collection cln,
java.lang.String filter)
Construct a query instance with the candidate class, the candidate Collection, and filter specified. |
javax.jdo.Query |
newQuery(java.lang.Class cls,
java.lang.String filter)
Construct a query instance with the candidate class and filter specified. |
javax.jdo.Query |
newQuery(javax.jdo.Extent cln)
Construct a query instance with the candidate Extent specified; the candidate class is taken from the Extent. |
javax.jdo.Query |
newQuery(javax.jdo.Extent cln,
java.lang.String filter)
Construct a query instance with the candidate Extent and filter specified. |
javax.jdo.Query |
newQuery(java.lang.Object obj)
Construct a query instance from another query. |
javax.jdo.Query |
newQuery(java.lang.String query)
Construct a query instance using the specified Single-String query. |
javax.jdo.Query |
newQuery(java.lang.String language,
java.lang.Object query)
Construct a query instance using the specified language and the specified query. |
java.lang.Object |
putUserObject(java.lang.Object key,
java.lang.Object value)
Method to put a user object into the PersistenceManager. |
void |
refresh(java.lang.Object obj)
Method to do a refresh of an object. |
void |
refreshAll()
Method to do a refresh of all objects. |
void |
refreshAll(java.util.Collection pcs)
Method to do a refresh of a collection of objects. |
void |
refreshAll(javax.jdo.JDOException exc)
Method to do a refresh of objects that failed verification in the exception. |
void |
refreshAll(java.lang.Object[] pcs)
Method to do a refresh of an array of objects. |
void |
removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener)
Method to remove a currently registered lifecycle listener, as per JDO 2.0 spec 12.15. |
java.lang.Object |
removeUserObject(java.lang.Object key)
Method to remove a user object from the PersistenceManager. |
void |
retrieve(java.lang.Object pc)
Method to retrieve the fields of an object. |
void |
retrieve(java.lang.Object pc,
boolean fgOnly)
Method to retrieve the fields of an object. |
void |
retrieveAll(boolean fgOnly,
java.lang.Object[] pcs)
Retrieve field values of instances from the store. |
void |
retrieveAll(java.util.Collection pcs)
Method to retrieve a collection of objects. |
void |
retrieveAll(java.util.Collection pcs,
boolean fgOnly)
Retrieve field values of instances from the store. |
void |
retrieveAll(java.lang.Object[] pcs)
Method to retrieve an array of objects. |
void |
retrieveAll(java.lang.Object[] pcs,
boolean fgOnly)
Retrieve field values of instances from the store. |
void |
setCopyOnAttach(boolean flag)
Mutator for whether to copy objects on attach. |
void |
setDetachAllOnCommit(boolean flag)
Mutator for whether to detach all objects on commit of the transaction. |
void |
setIgnoreCache(boolean flag)
Mutator for whether to ignore the cache. |
void |
setMultithreaded(boolean flag)
Mutator for whether the Persistence Manager is multithreaded. |
protected void |
setTransaction(Transaction tx)
Method to allow setting of the transaction by a superclass. |
void |
setUserObject(java.lang.Object userObject)
The application might manage PersistenceManager instances by using an associated object for bookkeeping purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Localiser LOCALISER
protected static final Localiser LOCALISER_JDO
protected ObjectManager objectMgr
protected javax.jdo.Transaction jdotx
protected AbstractPersistenceManagerFactory apmf
protected JDOFetchPlan fetchPlan
| Constructor Detail |
|---|
public JDOPersistenceManager(AbstractPersistenceManagerFactory apmf,
java.lang.String userName,
java.lang.String password)
apmf - Persistence Manager FactoryuserName - Username for the datastorepassword - Password for the datastore| Method Detail |
|---|
public ObjectManager getObjectManager()
public javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
getPersistenceManagerFactory in interface javax.jdo.PersistenceManagerpublic AbstractPersistenceManagerFactory getAbstractPersistenceManagerFactory()
public boolean getDetachAllOnCommit()
getDetachAllOnCommit in interface javax.jdo.PersistenceManagerpublic boolean getCopyOnAttach()
getCopyOnAttach in interface javax.jdo.PersistenceManagerpublic javax.jdo.FetchPlan getFetchPlan()
getFetchPlan in interface javax.jdo.PersistenceManagerpublic boolean getIgnoreCache()
getIgnoreCache in interface javax.jdo.PersistenceManagerpublic boolean getMultithreaded()
getMultithreaded in interface javax.jdo.PersistenceManagerpublic void setDetachAllOnCommit(boolean flag)
setDetachAllOnCommit in interface javax.jdo.PersistenceManagerflag - Whether to detach all on commit.public void setCopyOnAttach(boolean flag)
setCopyOnAttach in interface javax.jdo.PersistenceManagerflag - Whether to copy on attachingpublic void setIgnoreCache(boolean flag)
setIgnoreCache in interface javax.jdo.PersistenceManagerflag - Whether to ignore the cache.public void setMultithreaded(boolean flag)
setMultithreaded in interface javax.jdo.PersistenceManagerflag - Whether to run multithreaded.public java.util.Date getServerDate()
getServerDate in interface javax.jdo.PersistenceManagerpublic void close()
close in interface javax.jdo.PersistenceManagerpublic boolean isClosed()
isClosed in interface javax.jdo.PersistenceManagerpublic javax.jdo.Transaction currentTransaction()
currentTransaction in interface javax.jdo.PersistenceManagerprotected void setTransaction(Transaction tx)
tx - The transactionpublic void evict(java.lang.Object obj)
evict in interface javax.jdo.PersistenceManagerobj - The object
javax.jdo.JDOUserException - thrown if some instances could not be evicted
public void evictAll(java.lang.Class cls,
boolean subclasses)
cls - Type of persistable objectsubclasses - Whether to include subclasses
public void evictAll(boolean subclasses,
java.lang.Class cls)
evictAll in interface javax.jdo.PersistenceManagercls - Type of persistable objectsubclasses - Whether to include subclassespublic void evictAll(java.lang.Object[] pcs)
evictAll in interface javax.jdo.PersistenceManagerpcs - The objectspublic void evictAll(java.util.Collection pcs)
evictAll in interface javax.jdo.PersistenceManagerpcs - The objects
javax.jdo.JDOUserException - thrown if some instances could not be evictedpublic void evictAll()
evictAll in interface javax.jdo.PersistenceManagerpublic void refresh(java.lang.Object obj)
refresh in interface javax.jdo.PersistenceManagerobj - The Object
javax.jdo.JDOUserException - thrown if the object could not be refreshedpublic void refreshAll(java.lang.Object[] pcs)
refreshAll in interface javax.jdo.PersistenceManagerpcs - The Objectspublic void refreshAll(java.util.Collection pcs)
refreshAll in interface javax.jdo.PersistenceManagerpcs - The Objects
javax.jdo.JDOUserException - thrown if instances could not be refreshed.public void refreshAll()
refreshAll in interface javax.jdo.PersistenceManagerjavax.jdo.JDOUserException - thrown if instances could not be refreshed.public void refreshAll(javax.jdo.JDOException exc)
refreshAll in interface javax.jdo.PersistenceManagerexc - The JDO exception containing the objects that failed
public void retrieve(java.lang.Object pc,
boolean fgOnly)
retrieve in interface javax.jdo.PersistenceManagerpc - The objectfgOnly - Whether to retrieve the current fetch group fields onlypublic void retrieve(java.lang.Object pc)
retrieve in interface javax.jdo.PersistenceManagerpc - The objectpublic void retrieveAll(java.lang.Object[] pcs)
retrieveAll in interface javax.jdo.PersistenceManagerpcs - The objects
public void retrieveAll(java.lang.Object[] pcs,
boolean fgOnly)
PersistenceManager that the application intends to use the
instances, and their field values should be retrieved. The fields in the
current fetch group must be retrieved, and the implementation might
retrieve more fields than the current fetch group.
The PersistenceManager might use policy information about
the class to retrieve associated instances.
retrieveAll in interface javax.jdo.PersistenceManagerpcs - the instancesfgOnly - whether to retrieve only the current fetch group fields
public void retrieveAll(boolean fgOnly,
java.lang.Object[] pcs)
retrieveAll in interface javax.jdo.PersistenceManagerfgOnly - whether to retrieve only the current fetch group fieldspcs - the instances
public void retrieveAll(java.util.Collection pcs,
boolean fgOnly)
PersistenceManager that the application intends to use the
instances, and their field values should be retrieved. The fields in the
current fetch group must be retrieved, and the implementation might
retrieve more fields than the current fetch group.
The PersistenceManager might use policy information about
the class to retrieve associated instances.
retrieveAll in interface javax.jdo.PersistenceManagerpcs - the instancesfgOnly - whether to retrieve only the current fetch-group fieldspublic void retrieveAll(java.util.Collection pcs)
retrieveAll in interface javax.jdo.PersistenceManagerpcs - The objectspublic java.lang.Object makePersistent(java.lang.Object obj)
makePersistent in interface javax.jdo.PersistenceManagerobj - The object
public java.lang.Object[] makePersistentAll(java.lang.Object[] pcs)
makePersistentAll in interface javax.jdo.PersistenceManagerpcs - The objects to persistpublic java.util.Collection makePersistentAll(java.util.Collection pcs)
makePersistentAll in interface javax.jdo.PersistenceManagerpcs - The objects to persistpublic void deletePersistent(java.lang.Object obj)
deletePersistent in interface javax.jdo.PersistenceManagerobj - The objectpublic void deletePersistentAll(java.lang.Object[] pcs)
deletePersistentAll in interface javax.jdo.PersistenceManagerpcs - The objectspublic void deletePersistentAll(java.util.Collection pcs)
deletePersistentAll in interface javax.jdo.PersistenceManagerpcs - The objects
public void makeTransient(java.lang.Object pc,
boolean useFetchPlan)
makeTransient in interface javax.jdo.PersistenceManagerpc - The objectuseFetchPlan - Whether to make transient all objects in the fetch planpublic void makeTransient(java.lang.Object pc)
makeTransient in interface javax.jdo.PersistenceManagerpc - The objectpublic void makeTransientAll(java.lang.Object[] pcs)
makeTransientAll in interface javax.jdo.PersistenceManagerpcs - The objects
public void makeTransientAll(java.lang.Object[] pcs,
boolean includeFetchPlan)
makeTransientAll in interface javax.jdo.PersistenceManagerpcs - The objectsincludeFetchPlan - Whether to make transient all objects in the fetch plan
public void makeTransientAll(boolean includeFetchPlan,
java.lang.Object[] pcs)
makeTransientAll in interface javax.jdo.PersistenceManagerincludeFetchPlan - Whether to make transient all objects in the fetch planpcs - The objects
public void makeTransientAll(java.util.Collection pcs,
boolean useFetchPlan)
makeTransientAll in interface javax.jdo.PersistenceManagerpcs - The objectsuseFetchPlan - Whether to use the fetch plan when making transient
javax.jdo.JDOUserException - thrown if objects could not be made transient.public void makeTransientAll(java.util.Collection pcs)
makeTransientAll in interface javax.jdo.PersistenceManagerpcs - The objects
javax.jdo.JDOUserException - thrown if objects could not be made transient.public void makeTransactional(java.lang.Object pc)
makeTransactional in interface javax.jdo.PersistenceManagerpc - The objectpublic void makeTransactionalAll(java.lang.Object[] pcs)
makeTransactionalAll in interface javax.jdo.PersistenceManagerpcs - The objectspublic void makeTransactionalAll(java.util.Collection pcs)
makeTransactionalAll in interface javax.jdo.PersistenceManagerpcs - The objects
javax.jdo.JDOUserException - thrown if objects could not be made transactionalpublic void makeNontransactional(java.lang.Object pc)
makeNontransactional in interface javax.jdo.PersistenceManagerpc - The objectpublic void makeNontransactionalAll(java.lang.Object[] pcs)
makeNontransactionalAll in interface javax.jdo.PersistenceManagerpcs - The objects.public void makeNontransactionalAll(java.util.Collection pcs)
makeNontransactionalAll in interface javax.jdo.PersistenceManagerpcs - The objects.
javax.jdo.JDOUserException - thrown if objects could not be made nontransactionalpublic java.lang.Object detachCopy(java.lang.Object pc)
detachCopy in interface javax.jdo.PersistenceManagerpc - The object
public java.lang.Object[] detachCopyAll(java.lang.Object[] pcs)
PersistenceManager.
The objects returned can be manipulated and re-attached with
makePersistentAll(Object[]).
The detached instances will be unmanaged copies of the specified parameters,
and are suitable for serialization and manipulation outside of a JDO environment.
When detaching instances, only fields in the current FetchPlan 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 FetchPlan.
detachCopyAll in interface javax.jdo.PersistenceManagerpcs - the instances to detach
public java.util.Collection detachCopyAll(java.util.Collection pcs)
PersistenceManager.
detachCopyAll in interface javax.jdo.PersistenceManagerpcs - the instances to detach
detachCopyAll(Object[])public javax.jdo.Query newQuery()
newQuery in interface javax.jdo.PersistenceManagerpublic javax.jdo.Query newQuery(java.lang.Object obj)
newQuery in interface javax.jdo.PersistenceManagerobj - The object to use in the query
public javax.jdo.Query newQuery(java.lang.String query)
newQuery in interface javax.jdo.PersistenceManagerquery - The single-string query
public javax.jdo.Query newQuery(java.lang.String language,
java.lang.Object query)
newQuery in interface javax.jdo.PersistenceManagerlanguage - The language parameter for the JDO Query language. This is by default
"javax.jdo.query.JDOQL", but in JDO 2.0 can also be "javax.jdo.query.SQL", or vendor provided languages.query - The query object
public javax.jdo.Query newQuery(java.lang.Class cls)
newQuery in interface javax.jdo.PersistenceManagercls - The class to query
public javax.jdo.Query newQuery(javax.jdo.Extent cln)
newQuery in interface javax.jdo.PersistenceManagercln - The extent to query
public javax.jdo.Query newQuery(java.lang.Class cls,
java.util.Collection cln)
newQuery in interface javax.jdo.PersistenceManagercls - The class to querycln - The collection
public javax.jdo.Query newQuery(java.lang.Class cls,
java.lang.String filter)
newQuery in interface javax.jdo.PersistenceManagercls - The class to queryfilter - A filter to apply
public javax.jdo.Query newQuery(java.lang.Class cls,
java.util.Collection cln,
java.lang.String filter)
newQuery in interface javax.jdo.PersistenceManagercls - The class to querycln - A collectionfilter - A filter to apply
public javax.jdo.Query newQuery(javax.jdo.Extent cln,
java.lang.String filter)
newQuery in interface javax.jdo.PersistenceManagercln - The extent to queryfilter - A filter to apply
public javax.jdo.Query newNamedQuery(java.lang.Class cls,
java.lang.String queryName)
newNamedQuery in interface javax.jdo.PersistenceManagercls - The class to queryqueryName - Name of the query.
public javax.jdo.Extent getExtent(java.lang.Class pcClass,
boolean subclasses)
getExtent in interface javax.jdo.PersistenceManagerpcClass - The class to querysubclasses - Whether to include subclasses in the query.
public javax.jdo.Extent getExtent(java.lang.Class pcClass)
getExtent in interface javax.jdo.PersistenceManagerpcClass - The class to query
public java.lang.Object newInstance(java.lang.Class persistenceCapable)
newInstance in interface javax.jdo.PersistenceManagerpersistenceCapable - The class of the interface or abstract class, or concrete class defined in MetaData
public java.lang.Object newObjectIdInstance(java.lang.Class pcClass,
java.lang.Object key)
newObjectIdInstance in interface javax.jdo.PersistenceManagerpcClass - Class of the PersistenceCapable to create the OID for.key - Value of the key for SingleFieldIdentity, or toString() for other cases
public java.util.Set getManagedObjects()
getManagedObjects in interface javax.jdo.PersistenceManagerpublic java.util.Set getManagedObjects(java.lang.Class[] classes)
getManagedObjects in interface javax.jdo.PersistenceManagerclasses - Classes that we want objects for
public java.util.Set getManagedObjects(java.util.EnumSet states)
getManagedObjects in interface javax.jdo.PersistenceManagerstates - States that we want objects for
public java.util.Set getManagedObjects(java.util.EnumSet states,
java.lang.Class[] classes)
getManagedObjects in interface javax.jdo.PersistenceManagerstates - States that we want objects forclasses - Classes that we want objects for
public java.lang.Object getObjectById(java.lang.Object id)
getObjectById in interface javax.jdo.PersistenceManagerid - Id of the object.
public java.lang.Object getObjectById(java.lang.Object id,
boolean validate)
getObjectById in interface javax.jdo.PersistenceManagerid - Id of the object.validate - Whether to validate the object state
public java.util.Collection getObjectsById(java.util.Collection oids,
boolean validate)
getObjectsById in interface javax.jdo.PersistenceManageroids - Ids of the objects.validate - Whether to validate the object state
public java.lang.Object[] getObjectsById(boolean validate,
java.lang.Object[] oids)
getObjectsById in interface javax.jdo.PersistenceManagervalidate - Whether to validate the object stateoids - Ids of the objects.
public java.lang.Object[] getObjectsById(java.lang.Object[] oids,
boolean validate)
getObjectsById in interface javax.jdo.PersistenceManageroids - Ids of the objects.validate - Whether to validate the object state
public java.util.Collection getObjectsById(java.util.Collection oids)
getObjectsById in interface javax.jdo.PersistenceManageroids - Ids of the objects.
public java.lang.Object[] getObjectsById(java.lang.Object[] oids)
getObjectsById in interface javax.jdo.PersistenceManageroids - Ids of the objects.
public java.lang.Object getObjectById(java.lang.Class cls,
java.lang.Object key)
getObjectById in interface javax.jdo.PersistenceManagercls - Class of the PersistenceCapablekey - Value of the key field for SingleFieldIdentity, or the string value of the key otherwise
public java.lang.Object getObjectId(java.lang.Object pc)
getObjectId in interface javax.jdo.PersistenceManagerpc - The object
public java.lang.Object getTransactionalObjectId(java.lang.Object pc)
getTransactionalObjectId in interface javax.jdo.PersistenceManagerpc - The object
public java.lang.Class getObjectIdClass(java.lang.Class cls)
getObjectIdClass in interface javax.jdo.PersistenceManagercls - The class name of the object
public java.lang.Object putUserObject(java.lang.Object key,
java.lang.Object value)
putUserObject in interface javax.jdo.PersistenceManagerkey - The key to store the user object undervalue - The object to store
public java.lang.Object getUserObject(java.lang.Object key)
getUserObject in interface javax.jdo.PersistenceManagerkey - The key to store the user object under
public java.lang.Object removeUserObject(java.lang.Object key)
removeUserObject in interface javax.jdo.PersistenceManagerkey - The key whose uder object is to be removed.
public void setUserObject(java.lang.Object userObject)
setUserObject in interface javax.jdo.PersistenceManageruserObject - The objectpublic java.lang.Object getUserObject()
getUserObject in interface javax.jdo.PersistenceManagerpublic void flush()
flush in interface javax.jdo.PersistenceManagerpublic void checkConsistency()
checkConsistency in interface javax.jdo.PersistenceManagerpublic javax.jdo.datastore.Sequence getSequence(java.lang.String sequenceName)
getSequence in interface javax.jdo.PersistenceManagersequenceName - Fully qualified name of the sequence
public void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener,
java.lang.Class[] classes)
addInstanceLifecycleListener in interface javax.jdo.PersistenceManagerlistener - The instance lifecycle listener to sends events toclasses - The classes that it is interested inpublic void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener)
removeInstanceLifecycleListener in interface javax.jdo.PersistenceManagerlistener - The instance lifecycle listener to remove.protected void assertIsOpen()
javax.jdo.JDOFatalUserException - if the PM is closed.protected void assertActiveTransaction()
protected void assertWritable()
a - TransactionNotWritableException if not active and non transactional writes are disabledprotected void assertReadable(java.lang.String operation)
javax.jdo.JDOUserException - if the tx is not active and no non-transactional read is availableprotected boolean hasPersistenceInformationForClass(java.lang.Class cls)
cls - The class to check
public javax.jdo.datastore.JDOConnection getDataStoreConnection()
getDataStoreConnection in interface javax.jdo.PersistenceManagerPersistenceManager.getDataStoreConnection()
public javax.jdo.FetchGroup getFetchGroup(java.lang.Class cls,
java.lang.String name)
getFetchGroup in interface javax.jdo.PersistenceManagercls - The classname - The name of the fetch group
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||