Method Summary |
|
public void | addInstanceLifecycleListener(InstanceLifecycleListener listener, 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(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. |
public void | checkConsistency() This method validates the cache with the datastore. |
public synchronized void | close() Method to close the Persistence Manager. |
public javax.jdo.Transaction | currentTransaction() Accessor for the current transaction. |
public synchronized void | deletePersistent(Object obj) JDO method to delete an object from the datastore. |
public synchronized void | deletePersistentAll(Object[] pcs) JDO method to delete an array of objects from the datastore. |
public synchronized void | deletePersistentAll(Collection pcs) JDO method to delete a collection of objects from the datastore. |
public synchronized Object | detachCopy(Object pc) JDO method to detach a persistent object. |
public synchronized Object[] | detachCopyAll(Object[] pcs) Detach the specified objects from the PersistenceManager . |
public synchronized Collection | detachCopyAll(Collection pcs) Detach the specified objects from the PersistenceManager . |
public synchronized void | evict(Object obj) Method to evict an object from L1 cache. |
public synchronized void | evictAll(Class cls, boolean subclasses) Method to evict all objects of the specified type (and optionaly its subclasses). |
public synchronized void | evictAll(boolean subclasses, Class cls) Method to evict all objects of the specified type (and optionaly its subclasses). |
public synchronized void | evictAll(Object[] pcs) Method to evict an array of objects from L1 cache. |
public synchronized void | evictAll(Collection pcs) Method to evict a collection of objects from L1 cache. |
public synchronized void | evictAll() Method to evict all current objects from L1 cache. |
public synchronized void | flush() This method flushes all dirty, new, and deleted instances to the
datastore. |
public AbstractPersistenceManagerFactory | getAbstractPersistenceManagerFactory() Accessor for the PersistenceManager Factory. |
public boolean | getCopyOnAttach() Accessor for whether to copy objects on attaching. |
public JDOConnection | getDataStoreConnection() Accessor for a connection on the datastore. |
public boolean | getDetachAllOnCommit() Accessor for whether to detach all objects on commit of the transaction. |
public synchronized Extent | getExtent(Class pcClass, boolean subclasses) Extents are collections of datastore objects managed by the datastore,
not by explicit user operations on collections. |
public synchronized Extent | getExtent(Class pcClass) Extents are collections of datastore objects managed by the datastore,
not by explicit user operations on collections. |
public FetchPlan | getFetchPlan() |
public boolean | getIgnoreCache() Accessor for whether to ignore the cache. |
public Set | getManagedObjects() Accessor for the objects currently managed by this PM in the current transaction. |
public Set | getManagedObjects(Class[] classes) Accessor for the objects currently managed by this PM in the current transaction. |
public Set | getManagedObjects(EnumSet states) Accessor for the objects currently managed by this PM in the current transaction. |
public Set | getManagedObjects(EnumSet states, Class[] classes) Accessor for the objects currently managed by this PM in the current transaction. |
public boolean | getMultithreaded() Accessor for whether the Persistence Manager is multithreaded. |
public synchronized Object | getObjectById(Object id) Accessor for an object given the object id.
Parameters: id - Id of the object. |
public synchronized Object | getObjectById(Object id, boolean validate) Accessor for an object given the object id. |
public Object | getObjectById(Class cls, Object key) Convenience method that exactly matches the behavior of calling
pm.getObjectById (pm.newObjectIdInstance (cls, key), true). |
public Object | getObjectId(Object pc) Accessor for an object id given the object. |
public Class | getObjectIdClass(Class cls) Accessor for the class of the object id given the class of object. |
public ObjectManager | getObjectManager() Convenience accessor for the ObjectManager performing the actual persistence. |
public Collection | getObjectsById(Collection oids, boolean validate) Accessor for the objects given the object ids. |
public Object[] | getObjectsById(boolean validate, Object[] oids) Accessor for the objects given the object ids.
Parameters: validate - Whether to validate the object state Parameters: oids - Ids of the objects. |
public Object[] | getObjectsById(Object[] oids, boolean validate) Accessor for the objects given the object ids. |
public Collection | getObjectsById(Collection oids) Accessor for the objects given the object ids, validating the objects.
Parameters: oids - Ids of the objects. |
public Object[] | getObjectsById(Object[] oids) Accessor for the objects given the object ids, validating the objects.
Parameters: oids - Ids of the objects. |
public PersistenceManagerFactory | getPersistenceManagerFactory() Accessor for the PersistenceManager Factory. |
public Sequence | getSequence(String sequenceName) Method to retrieve a sequence by name. |
public Date | getServerDate() Accessor for the date on the datastore. |
public Object | getTransactionalObjectId(Object pc) Accessor for the object id of a transactional object given the object. |
public synchronized Object | getUserObject(Object key) Method to get a user object from the PersistenceManager. |
public synchronized Object | getUserObject() The application might manage PersistenceManager instances by using an
associated object for bookkeeping purposes. |
protected boolean | hasPersistenceInformationForClass(Class cls) Utility method to check if the specified class has reachable metadata/annotations. |
public boolean | isClosed() Accessor for whether this ObjectManager is closed. |
public synchronized void | makeNontransactional(Object pc) Method to make nontransactional an object. |
public synchronized void | makeNontransactionalAll(Object[] pcs) Method to make nontransactional an array of objects. |
public synchronized void | makeNontransactionalAll(Collection pcs) Method to make nontransactional a collection of objects. |
public synchronized Object | makePersistent(Object obj) JDO method to persist an object. |
public synchronized Object[] | makePersistentAll(Object[] pcs) JDO method to make persistent an array of objects. |
public synchronized Collection | makePersistentAll(Collection pcs) JDO method to make persistent a collection of objects. |
public synchronized void | makeTransactional(Object pc) Method to make transactional an object. |
public synchronized void | makeTransactionalAll(Object[] pcs) Method to make transactional an array of objects. |
public synchronized void | makeTransactionalAll(Collection pcs) Method to make transactional a collection of objects. |
public synchronized void | makeTransient(Object pc, boolean useFetchPlan) Method to make transient an object allowing fetching using the fetch plan. |
public synchronized void | makeTransient(Object pc) Method to make transient an object. |
public synchronized void | makeTransientAll(Object[] pcs) Method to make transient an array of objects. |
public synchronized void | makeTransientAll(Object[] pcs, boolean includeFetchPlan) Method to make transient an array of objects. |
public synchronized void | makeTransientAll(boolean includeFetchPlan, Object[] pcs) Method to make transient an array of objects. |
public synchronized void | makeTransientAll(Collection pcs, boolean useFetchPlan) Method to make transient a collection of objects. |
public synchronized void | makeTransientAll(Collection pcs) Method to make transient a collection of objects. |
public Object | newInstance(Class persistenceCapable) Method to generate an instance of an interface, abstract class, or concrete PC class. |
public synchronized Query | newNamedQuery(Class cls, String queryName) Construct a query instance with the candidate class and the query name.
Parameters: cls - The class to query Parameters: queryName - Name of the query. |
public Object | newObjectIdInstance(Class pcClass, Object key) This method returns an object id instance corresponding to the pcClass and key arguments.
It has 2 modes of operation. |
public synchronized Query | newQuery() Construct an empty query instance. |
public synchronized Query | newQuery(Object obj) Construct a query instance from another query. |
public synchronized Query | newQuery(String query) Construct a query instance using the specified Single-String query. |
public synchronized Query | newQuery(String language, Object query) Construct a query instance using the specified language and the specified
query. |
public synchronized Query | newQuery(Class cls) Construct a query instance with the candidate class specified. |
public synchronized Query | newQuery(Extent cln) Construct a query instance with the candidate Extent specified; the
candidate class is taken from the Extent. |
public synchronized Query | newQuery(Class cls, Collection cln) Construct a query instance with the candidate class and candidate
Collection specified. |
public synchronized Query | newQuery(Class cls, String filter) Construct a query instance with the candidate class and filter specified. |
public synchronized Query | newQuery(Class cls, Collection cln, String filter) Construct a query instance with the candidate class, the candidate
Collection, and filter specified. |
public synchronized Query | newQuery(Extent cln, String filter) Construct a query instance with the candidate Extent and filter
specified. |
public synchronized Object | putUserObject(Object key, Object value) Method to put a user object into the PersistenceManager. |
public synchronized void | refresh(Object obj) Method to do a refresh of an object. |
public synchronized void | refreshAll(Object[] pcs) Method to do a refresh of an array of objects. |
public synchronized void | refreshAll(Collection pcs) Method to do a refresh of a collection of objects. |
public synchronized void | refreshAll() Method to do a refresh of all objects. |
public synchronized void | refreshAll(JDOException exc) Method to do a refresh of objects that failed verification in the
exception. |
public void | removeInstanceLifecycleListener(InstanceLifecycleListener listener) Method to remove a currently registered lifecycle listener, as per JDO 2.0 spec 12.15. |
public synchronized Object | removeUserObject(Object key) Method to remove a user object from the PersistenceManager. |
public synchronized void | retrieve(Object pc, boolean fgOnly) Method to retrieve the fields of an object. |
public synchronized void | retrieve(Object pc) Method to retrieve the fields of an object. |
public synchronized void | retrieveAll(Object[] pcs) Method to retrieve an array of objects. |
public void | retrieveAll(Object[] pcs, boolean fgOnly) Retrieve field values of instances from the store. |
public void | retrieveAll(boolean fgOnly, Object[] pcs) Retrieve field values of instances from the store. |
public void | retrieveAll(Collection pcs, boolean fgOnly) Retrieve field values of instances from the store. |
public synchronized void | retrieveAll(Collection pcs) Method to retrieve a collection of objects. |
public void | setCopyOnAttach(boolean flag) Mutator for whether to copy objects on attach. |
public void | setDetachAllOnCommit(boolean flag) Mutator for whether to detach all objects on commit of the transaction. |
public void | setIgnoreCache(boolean flag) Mutator for whether to ignore the cache. |
public void | setMultithreaded(boolean flag) Mutator for whether the Persistence Manager is multithreaded. |
protected void | setTransaction(org.jpox.Transaction tx) Method to allow setting of the transaction by a superclass. |
public synchronized void | setUserObject(Object userObject) The application might manage PersistenceManager instances by using an
associated object for bookkeeping purposes. |