org.jpox.resource
Class PersistenceManagerImpl

java.lang.Object
  extended byorg.jpox.resource.PersistenceManagerImpl
All Implemented Interfaces:
javax.resource.cci.Connection, PersistenceManager, javax.jdo.PersistenceManager

public class PersistenceManagerImpl
extends java.lang.Object
implements javax.resource.cci.Connection, PersistenceManager

Implementation of the PersistenceManager for use in JCA environments. An application handle associated to the ManagedConnectionImpl.

Version:
$Revision: 1.51 $

Field Summary
protected static Localiser LOCALISER
          Localisation utility for output messages
 
Constructor Summary
PersistenceManagerImpl(ManagedConnectionImpl mc)
          Constructor.
 
Method Summary
 void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
           
 void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener, java.lang.Class[] classes)
          JDO 2.0 spec 12.15 "LifecycleListeners".
 void addQueryResult(QueryResult queryResult)
          Add opened query results to the pm
 void addQueryRun(java.lang.String singleStringQuery)
          Add queries already run to the pm
 void addStateManager(StateManager sm)
          Method to add the object managed by the specified StateManager to the cache.
 java.lang.Object attachCopy(java.lang.Object pc, boolean embedded)
          Method to attach a persistent object.
 void checkConsistency()
          Method to check the consistency of the cache.
 void clearDirty(StateManager sm)
          Mark the specified StateManager as clean.
 void close()
          Method to close the Persistence Manager.
 javax.resource.cci.Interaction createInteraction()
           
 javax.jdo.Transaction currentTransaction()
          Accessor for the current transaction
 void deletePersistent(java.lang.Object pc)
          JDO method to delete a Persistence Capable object
 void deletePersistentAll(java.util.Collection pcs)
          JDO method to delete a Collection of Persistence Capable objects
 void deletePersistentAll(java.lang.Object[] pcs)
          JDO method to delete an array of Persistence Capable objects
 java.lang.Object detachCopy(java.lang.Object pc)
          Detach the specified object from the PersistenceManager.
 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.
 java.lang.Object detachCopyInternal(java.lang.Object pc, FetchPlanState state)
          Method to detach a copy of the passed object using the detached state.
 void detachInternal(java.lang.Object pc, FetchPlanState state)
          Detach the specified object from the PersistenceManager.
 void dump(java.lang.Object obj, java.io.PrintWriter out)
          Method to dump to output an object for diagnostic purposes.
 void enlistInTransaction(StateManager sm)
          Method to enlist the specified StateManager in the current transaction.
 void evict(java.lang.Object o)
          Method to evict an object
 void evictAll()
          Method to evict all objects from the PM.
 void evictAll(java.util.Collection os)
          Method to evict all of the specified objects from the PM.
 void evictAll(java.lang.Object[] os)
          Method to evict an array of objects
 void evictFromTransaction(StateManager sm)
          Method to evict the specified StateManager from the current transaction.
 StateManager findStateManager(javax.jdo.spi.PersistenceCapable pc)
          Method to find the StateManager for the passed PersistenceCapable object when it is managed by this PM.
 void flush()
          This method flushes all dirty, new, and deleted instances to the datastore.
 ClassLoaderResolver getClassLoaderResolver()
          Accessor for the ClassLoaderResolver
 java.sql.Connection getConnection(boolean forWriting, boolean forQuery)
          Accessor for a connection to the datastore.
 java.sql.Connection getConnection(boolean forWriting, boolean forQuery, boolean useOpenedConnection)
          Accessor for the connection to the datasource.
 javax.jdo.datastore.JDOConnection getDataStoreConnection()
          (non-Javadoc)
 boolean getDetachAllOnCommit()
          Accessor for whether to detach objects on commit of the txn.
 boolean getDetachOnClose()
          Accessor for whether to detach objects on close of the PM's
 javax.jdo.Extent getExtent(java.lang.Class cls)
          Accessor for the extent of a candidate class.
 javax.jdo.Extent getExtent(java.lang.Class cls, boolean subclasses)
          Accessor for the extent of a candidate class.
 javax.jdo.FetchPlan getFetchPlan()
          Acessor for the current FetchPlan
 boolean getIgnoreCache()
          Accessor for whether to ignore the cache or not
 javax.resource.cci.LocalTransaction getLocalTransaction()
          Accessor for the local transaction.
 javax.resource.cci.ConnectionMetaData getMetaData()
          Accessor for Meta-Data.
 MetaDataManager getMetaDataManager()
          Accessor for the MetaData Manager.
 boolean getMultithreaded()
          Accessor for the multithreaded capability of the manager
 java.lang.Object getObjectByAID(java.lang.Class pcClass, FieldValues fv, boolean ignoreCache, boolean checkInheritance)
          Accessor for the StateManager of an object given the object AID.
 java.lang.Object getObjectById(java.lang.Class cls, java.lang.Object key)
           
 java.lang.Object getObjectById(java.lang.Object id)
          Accessor for an object given its id.
 java.lang.Object getObjectById(java.lang.Object id, boolean validate)
          Accessor for an object given its id.
 java.lang.Object getObjectById(java.lang.Object id, boolean validate, boolean checkInheritance)
          Accessor for an object given the object id.
 java.lang.Object getObjectById(java.lang.Object id, FieldValues fv)
          Accessor for an object given the object id.
 java.lang.Object getObjectById(java.lang.Object id, FieldValues fv, java.lang.Class clazz, boolean ignoreCache)
          Accessor for an object given the object id.
 java.lang.Object getObjectId(java.lang.Object pc)
          Accessor for the id of an object.
 java.lang.Class getObjectIdClass(java.lang.Class clazz)
          Retrieve the class for the objectid
 java.util.Collection getObjectsById(java.util.Collection oids)
           
 java.util.Collection getObjectsById(java.util.Collection oids, boolean validate)
           
 java.lang.Object[] getObjectsById(java.lang.Object[] oids)
           
 java.lang.Object[] getObjectsById(java.lang.Object[] oids, boolean validate)
           
 javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
          Retrieve the PersistenceManagerFactory for this manager
 PMFContext getPMFContext()
          Gets the context which this PersistenceManager is running
 PersistenceManager getPMHandle()
          Accessor for a handle to the Persistence Manager
 javax.resource.cci.ResultSetInfo getResultSetInfo()
           
 javax.jdo.datastore.Sequence getSequence(java.lang.String sequenceName)
          Accessor for a Sequence.
 StateManager getStateManagerById(java.lang.Object myID)
          Accessor for the StateManager of an object given the object id.
 StoreManager getStoreManager()
          Accessor for the Store Manager.
 java.lang.Object getTransactionalObjectId(java.lang.Object pc)
           
 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.
 boolean hasQueryRun(java.lang.String singleStringQuery)
          Whether the query was already run
 void hereIsStateManager(StateManager sm, javax.jdo.spi.PersistenceCapable pc)
          Method to add the StateManager for an object to this PersistenceManager's list.
 boolean isClosed()
          Accessor for whether the Persistence manager is closed.
 boolean isConnectionOpen()
          Checks whether a connection to the datasource is open.
 boolean isDelayDatastoreOperationsEnabled()
          Whether the datastore operations are delayed until commit.
 boolean isInserting(javax.jdo.spi.PersistenceCapable pc)
          Tests whether this object is being inserted.
 void makeNontransactional(java.lang.Object pc)
          Make a Persistence-Capable object non-transactional
 void makeNontransactionalAll(java.util.Collection pcs)
          Make a Collection of Persistence-Capable objects non-transactional
 void makeNontransactionalAll(java.lang.Object[] pcs)
          Make an array of Persistence-Capable objects non-transactional
 java.lang.Object makePersistent(java.lang.Object pc)
          Method to make an object persistent.
 java.util.Collection makePersistentAll(java.util.Collection pcs)
          Make a Collection of Persistence Capable objects persistent
 java.lang.Object[] makePersistentAll(java.lang.Object[] pcs)
          Make an array of Persistent Capable objects persistent
 java.lang.Object makePersistentInternal(java.lang.Object obj, FieldValues preInsertChanges)
          Method to make an object persistent during the persisting process.
 void makeTransactional(java.lang.Object pc)
          Make a Persistence-Capable object transient
 void makeTransactionalAll(java.util.Collection pcs)
          Make a collection of PersistenceCapable objects transactional
 void makeTransactionalAll(java.lang.Object[] pcs)
          Make an array of Persistence-Capable objects transactional
 void makeTransient(java.lang.Object pc)
          Make a Persistence-Capable object transient
 void makeTransient(java.lang.Object pc, boolean useFetchPlan)
          Make a Persistence-Capable object transient , optionally using the fetch plan.
 void makeTransientAll(java.util.Collection pcs)
          Make a Collection of Persistence-Capable objects transient
 void makeTransientAll(java.util.Collection pcs, boolean useFetchPlan)
          Make a Collection of Persistence-Capable objects transient
 void makeTransientAll(java.lang.Object[] pcs)
          Make an array of Persistence-Capable objects transient
 void makeTransientAll(java.lang.Object[] pcs, boolean useFetchPlan)
          Make an array of Persistence-Capable objects transient
 void makeTransientInternal(java.lang.Object obj, FetchPlanState state)
          Method to make an object transient.
 void markDirty(StateManager sm)
          Mark the specified StateManager as dirty
 java.lang.Object newInstance(java.lang.Class persistenceCapable)
          Method to create an instance of an interface or abstract class
 javax.jdo.Query newNamedQuery(java.lang.Class cls, java.lang.String queryName)
          Accessor for a new named query.
 java.lang.Object newObjectIdInstance(java.lang.Class pcClass, java.lang.Object key)
           
 java.lang.Object newObjectIdInstance(java.lang.Class clazz, java.lang.String str)
           
 javax.jdo.Query newQuery()
          Accessor for a new query.
 javax.jdo.Query newQuery(java.lang.Class cls)
          Accessor for a new query using this candidate class.
 javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln)
          Accessor for a new query.
 javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln, java.lang.String filter)
          Accessor for a new query.
 javax.jdo.Query newQuery(java.lang.Class cls, java.lang.String filter)
          Accessor for a new query.
 javax.jdo.Query newQuery(javax.jdo.Extent ext)
          Accessor for a new query based on the provided extent.
 javax.jdo.Query newQuery(javax.jdo.Extent cln, java.lang.String filter)
          Accessor for a new query.
 javax.jdo.Query newQuery(java.lang.Object obj)
          Accessor for a new query.
 javax.jdo.Query newQuery(java.lang.String query)
          Accessor for a single-string query.
 javax.jdo.Query newQuery(java.lang.String language, java.lang.Object query)
          Accessor for a new query in the specified query language etc.
 void notifyLifecycleListenersForEvent(java.lang.Object obj, int lifecycleEventType, java.lang.Object otherObj)
          Utility to notify the lifecycle listeners for an event on an object.
 void putObjectIntoCache(StateManager sm, boolean level1, boolean level2)
          Method to put an object into the respective cache.
 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 o)
          Method to refresh an object
 void refreshAll()
          Method to refresh all objects in the Persistence Manager.
 void refreshAll(java.util.Collection os)
          Method to refresh a collection of objects.
 void refreshAll(javax.jdo.JDOException exc)
          Method to refresh objects that failed verification in a JDOException
 void refreshAll(java.lang.Object[] os)
          Method to refresh an array of objects.
 void releaseConnection(java.sql.Connection conn)
          Method to release a connection.
 void removeAllInstanceLifecycleListeners()
           
 void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
           
 void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener)
          JDO 2.0 spec 12.15 "LifecycleListeners".
 void removeObjectFromCache(javax.jdo.spi.PersistenceCapable pc, java.lang.Object id, boolean level1, boolean level2)
          Method to remove an object from the respective cache.
 void removeQueryResult(QueryResult queryResult)
          Remove query results from the pm
 void removeQueryRun(java.lang.String singleStringQuery)
          Remove query results from the pm
 void removeStateManager(StateManager sm)
          Method to remove the object managed by the specified StateManager from the cache.
 java.lang.Object removeUserObject(java.lang.Object key)
          Method to remove a user object from the PersistenceManager.
 void replaceObjectId(javax.jdo.spi.PersistenceCapable pc, java.lang.Object oldID, java.lang.Object newID)
          Replace the previous object id for a PC object to a new
 void retrieve(java.lang.Object o)
          Method to retrieve an object
 void retrieve(java.lang.Object o, boolean fgOnly)
          Method to retrieve an object
 void retrieveAll(java.util.Collection pcs)
          Retrieve a Collection of Persistence-Capable objects
 void retrieveAll(java.util.Collection pcs, boolean fgOnly)
          Retrieve field values of instances from the store.
 void retrieveAll(java.lang.Object[] pcs)
          Retrieve an array of Persistence-Capable objects
 void retrieveAll(java.lang.Object[] pcs, boolean fgOnly)
          Retrieve field values of instances from the store.
 void setDetachAllOnCommit(boolean detach)
          Mutator for whether to detach all objects on commit of the txn.
 void setDetachOnClose(boolean detach)
          Mutator for whether to detach objects on close of the PM's
 void setIgnoreCache(boolean ignore)
          Mutator for whether to ignore the cache or not
 void setMultithreaded(boolean multithreaded)
          Mutator for the multithreaded capability of the manager
 void setUserObject(java.lang.Object obj)
          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

LOCALISER

protected static final Localiser LOCALISER
Localisation utility for output messages

Constructor Detail

PersistenceManagerImpl

public PersistenceManagerImpl(ManagedConnectionImpl mc)
Constructor.

Parameters:
mc - The connection implementation.
Method Detail

dump

public void dump(java.lang.Object obj,
                 java.io.PrintWriter out)
Method to dump to output an object for diagnostic purposes.

Specified by:
dump in interface PersistenceManager
Parameters:
obj - The object to dump
out - The PrintWriter to use
See Also:
PersistenceManager.dump(java.lang.Object, java.io.PrintWriter)

getObjectById

public java.lang.Object getObjectById(java.lang.Object id,
                                      FieldValues fv,
                                      java.lang.Class clazz,
                                      boolean ignoreCache)
Accessor for an object given the object id.

Specified by:
getObjectById in interface PersistenceManager
Parameters:
id - Id of the object.
fv - Field values for the object
clazz - Class name of the object
ignoreCache - true if it must ignore the cache
Returns:
The Object with this id

getObjectByAID

public java.lang.Object getObjectByAID(java.lang.Class pcClass,
                                       FieldValues fv,
                                       boolean ignoreCache,
                                       boolean checkInheritance)
Accessor for the StateManager of an object given the object AID.

Specified by:
getObjectByAID in interface PersistenceManager
Parameters:
pcClass -
fv -
ignoreCache - true if it must ignore the cache*
checkInheritance - Whether look to the database to determine which class this object is. This parameter is a hint. Set false, if it's already determined the correct pcClass for this pc "object" in a certain level in the hierarchy. Set to true and it will look to the database.
Returns:
Object with this AID

getLocalTransaction

public javax.resource.cci.LocalTransaction getLocalTransaction()
                                                        throws javax.resource.ResourceException
Accessor for the local transaction.

Specified by:
getLocalTransaction in interface javax.resource.cci.Connection
Returns:
The local transaction
Throws:
javax.resource.ResourceException - Thrown when an error occurs

getMetaData

public javax.resource.cci.ConnectionMetaData getMetaData()
                                                  throws javax.resource.ResourceException
Accessor for Meta-Data.

Specified by:
getMetaData in interface javax.resource.cci.Connection
Returns:
The Connection Meta-Data.
Throws:
javax.resource.ResourceException -

createInteraction

public javax.resource.cci.Interaction createInteraction()
                                                 throws javax.resource.ResourceException
Specified by:
createInteraction in interface javax.resource.cci.Connection
Returns:
Throws:
javax.resource.ResourceException -

getResultSetInfo

public javax.resource.cci.ResultSetInfo getResultSetInfo()
                                                  throws javax.resource.ResourceException
Specified by:
getResultSetInfo in interface javax.resource.cci.Connection
Returns:
Throws:
javax.resource.ResourceException -

close

public void close()
Method to close the Persistence Manager.

Specified by:
close in interface javax.resource.cci.Connection

isClosed

public boolean isClosed()
Accessor for whether the Persistence manager is closed.

Specified by:
isClosed in interface javax.jdo.PersistenceManager
Returns:
Whether the Persistence Manager is closed.

setDetachOnClose

public void setDetachOnClose(boolean detach)
Mutator for whether to detach objects on close of the PM's

Parameters:
detach - Whether to detach objects on close of the PM.

getDetachOnClose

public boolean getDetachOnClose()
Accessor for whether to detach objects on close of the PM's

Returns:
Whether to detach objects on close of the PM's

setDetachAllOnCommit

public void setDetachAllOnCommit(boolean detach)
Mutator for whether to detach all objects on commit of the txn.

Specified by:
setDetachAllOnCommit in interface javax.jdo.PersistenceManager
Parameters:
detach - Whether to detach objects on commit of the txn.

getDetachAllOnCommit

public boolean getDetachAllOnCommit()
Accessor for whether to detach objects on commit of the txn.

Specified by:
getDetachAllOnCommit in interface javax.jdo.PersistenceManager
Returns:
Whether to detach objects on commit of the txn.

isDelayDatastoreOperationsEnabled

public boolean isDelayDatastoreOperationsEnabled()
Whether the datastore operations are delayed until commit. In optimistic transactions this is automatically enabled.

Specified by:
isDelayDatastoreOperationsEnabled in interface PersistenceManager
Returns:
true if datastore operations are delayed until commit

refresh

public void refresh(java.lang.Object o)
Method to refresh an object

Specified by:
refresh in interface javax.jdo.PersistenceManager
Parameters:
o - Object to refresh

retrieve

public void retrieve(java.lang.Object o,
                     boolean fgOnly)
Method to retrieve an object

Specified by:
retrieve in interface javax.jdo.PersistenceManager
Parameters:
o - Object to retrieve
fgOnly - Whether to include only fields in current fetch group

retrieve

public void retrieve(java.lang.Object o)
Method to retrieve an object

Specified by:
retrieve in interface javax.jdo.PersistenceManager
Parameters:
o - Object to retrieve

retrieveAll

public void retrieveAll(java.util.Collection pcs)
Retrieve a Collection of Persistence-Capable objects

Specified by:
retrieveAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Collection of Persistence-Capable objects

retrieveAll

public void retrieveAll(java.lang.Object[] pcs)
Retrieve an array of Persistence-Capable objects

Specified by:
retrieveAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Array of Persistence-Capable objects

retrieveAll

public void retrieveAll(java.lang.Object[] pcs,
                        boolean fgOnly)
Retrieve field values of instances from the store. This tells the 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.

Specified by:
retrieveAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - the instances
fgOnly - whether to retrieve only the current fetch-group fields
Since:
JDO 1.0.1

retrieveAll

public void retrieveAll(java.util.Collection pcs,
                        boolean fgOnly)
Retrieve field values of instances from the store. This tells the 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.

Specified by:
retrieveAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - the instances
fgOnly - whether to retrieve only the current fetch group fields
Since:
JDO 1.0.1

currentTransaction

public javax.jdo.Transaction currentTransaction()
Accessor for the current transaction

Specified by:
currentTransaction in interface javax.jdo.PersistenceManager
Returns:
The current transaction

evict

public void evict(java.lang.Object o)
Method to evict an object

Specified by:
evict in interface javax.jdo.PersistenceManager
Parameters:
o - Object to evict

evictAll

public void evictAll(java.lang.Object[] os)
Method to evict an array of objects

Specified by:
evictAll in interface javax.jdo.PersistenceManager
Parameters:
os - Array of objects to evict

evictAll

public void evictAll(java.util.Collection os)
Method to evict all of the specified objects from the PM.

Specified by:
evictAll in interface javax.jdo.PersistenceManager
Parameters:
os - Collection of objects to evict

evictAll

public void evictAll()
Method to evict all objects from the PM.

Specified by:
evictAll in interface javax.jdo.PersistenceManager

refreshAll

public void refreshAll(java.lang.Object[] os)
Method to refresh an array of objects.

Specified by:
refreshAll in interface javax.jdo.PersistenceManager
Parameters:
os - Array of objects to refresh

refreshAll

public void refreshAll(java.util.Collection os)
Method to refresh a collection of objects.

Specified by:
refreshAll in interface javax.jdo.PersistenceManager
Parameters:
os - Collection of objects to refresh

refreshAll

public void refreshAll(javax.jdo.JDOException exc)
Method to refresh objects that failed verification in a JDOException

Specified by:
refreshAll in interface javax.jdo.PersistenceManager
Parameters:
exc - Exception containing objects that failed verification

refreshAll

public void refreshAll()
Method to refresh all objects in the Persistence Manager.

Specified by:
refreshAll in interface javax.jdo.PersistenceManager

newQuery

public javax.jdo.Query newQuery()
Accessor for a new query.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Returns:
The query.

newQuery

public javax.jdo.Query newQuery(java.lang.Object obj)
Accessor for a new query.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
obj - object
Returns:
The new query

newQuery

public javax.jdo.Query newQuery(java.lang.String query)
Accessor for a single-string query.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
query - The single-string query
Returns:
The Query

newQuery

public javax.jdo.Query newQuery(java.lang.String language,
                                java.lang.Object query)
Accessor for a new query in the specified query language etc.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
language - The query language
query - The query definition
Returns:
The new query

newQuery

public javax.jdo.Query newQuery(java.lang.Class cls)
Accessor for a new query using this candidate class.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
cls - The candidate class to use.
Returns:
The new query

newQuery

public javax.jdo.Query newQuery(javax.jdo.Extent ext)
Accessor for a new query based on the provided extent.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
ext - The extent to use
Returns:
The new query

newQuery

public javax.jdo.Query newQuery(java.lang.Class cls,
                                java.util.Collection cln)
Accessor for a new query.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
cls - The candidate class.
cln - The collection to use.
Returns:
The new query

newQuery

public javax.jdo.Query newQuery(java.lang.Class cls,
                                java.lang.String filter)
Accessor for a new query.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
cls - The candidate class
filter - The filter to use
Returns:
The new query

newQuery

public javax.jdo.Query newQuery(java.lang.Class cls,
                                java.util.Collection cln,
                                java.lang.String filter)
Accessor for a new query.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
cls - The candidate class
cln - The collection
filter - The filter to use
Returns:
The new query

newQuery

public javax.jdo.Query newQuery(javax.jdo.Extent cln,
                                java.lang.String filter)
Accessor for a new query.

Specified by:
newQuery in interface javax.jdo.PersistenceManager
Parameters:
cln - The collection
filter - The filter to use
Returns:
The new query

newNamedQuery

public javax.jdo.Query newNamedQuery(java.lang.Class cls,
                                     java.lang.String queryName)
Accessor for a new named query.

Specified by:
newNamedQuery in interface javax.jdo.PersistenceManager
Parameters:
cls - The candidate class
queryName - The name of the query
Returns:
The new query

getExtent

public javax.jdo.Extent getExtent(java.lang.Class cls,
                                  boolean subclasses)
Accessor for the extent of a candidate class.

Specified by:
getExtent in interface javax.jdo.PersistenceManager
Parameters:
cls - The candidate class
subclasses - Whether to include subclasses
Returns:
The extent for these classes

getExtent

public javax.jdo.Extent getExtent(java.lang.Class cls)
Accessor for the extent of a candidate class.

Specified by:
getExtent in interface javax.jdo.PersistenceManager
Parameters:
cls - The candidate class
Returns:
The extent for these classes
Since:
1.1

getFetchPlan

public javax.jdo.FetchPlan getFetchPlan()
Acessor for the current FetchPlan

Specified by:
getFetchPlan in interface javax.jdo.PersistenceManager
Returns:
FetchPlan
Since:
1.1

getObjectById

public java.lang.Object getObjectById(java.lang.Object id)
Accessor for an object given its id.

Specified by:
getObjectById in interface javax.jdo.PersistenceManager
Parameters:
id - Id of the object.
Returns:
The object with this id

getObjectById

public java.lang.Object getObjectById(java.lang.Object id,
                                      boolean validate)
Accessor for an object given its id.

Specified by:
getObjectById in interface javax.jdo.PersistenceManager
Parameters:
id - Id of the object.
validate - Whether to validate the object before returning it
Returns:
The object with this id

getObjectsById

public java.util.Collection getObjectsById(java.util.Collection oids)
Specified by:
getObjectsById in interface javax.jdo.PersistenceManager

getObjectsById

public java.lang.Object[] getObjectsById(java.lang.Object[] oids)
Specified by:
getObjectsById in interface javax.jdo.PersistenceManager

getObjectsById

public java.util.Collection getObjectsById(java.util.Collection oids,
                                           boolean validate)
Specified by:
getObjectsById in interface javax.jdo.PersistenceManager

getObjectsById

public java.lang.Object[] getObjectsById(java.lang.Object[] oids,
                                         boolean validate)
Specified by:
getObjectsById in interface javax.jdo.PersistenceManager

getObjectById

public java.lang.Object getObjectById(java.lang.Class cls,
                                      java.lang.Object key)
Specified by:
getObjectById in interface javax.jdo.PersistenceManager

newObjectIdInstance

public java.lang.Object newObjectIdInstance(java.lang.Class pcClass,
                                            java.lang.Object key)
Specified by:
newObjectIdInstance in interface javax.jdo.PersistenceManager

getObjectById

public java.lang.Object getObjectById(java.lang.Object id,
                                      boolean validate,
                                      boolean checkInheritance)
Accessor for an object given the object id.

Specified by:
getObjectById in interface PersistenceManager
Parameters:
id - Id of the object.
validate - Whether to validate the object state
checkInheritance - Whether look to the database to determine which class this object is. This parameter is a hint. Set false, if it's already determined the correct pcClass for this pc "object" in a certain level in the hierarchy. Set to true and it will look to the database.
Returns:
The Object

getObjectId

public java.lang.Object getObjectId(java.lang.Object pc)
Accessor for the id of an object.

Specified by:
getObjectId in interface javax.jdo.PersistenceManager
Parameters:
pc - The object
Returns:
The objects id

getTransactionalObjectId

public java.lang.Object getTransactionalObjectId(java.lang.Object pc)
Specified by:
getTransactionalObjectId in interface javax.jdo.PersistenceManager
Parameters:
pc -
Returns:

newObjectIdInstance

public java.lang.Object newObjectIdInstance(java.lang.Class clazz,
                                            java.lang.String str)
Parameters:
clazz -
str -
Returns:

newInstance

public java.lang.Object newInstance(java.lang.Class persistenceCapable)
Method to create an instance of an interface or abstract class

Specified by:
newInstance in interface javax.jdo.PersistenceManager
Parameters:
persistenceCapable - interface/abstract class declared in metadata
Returns:
Instance of the interface / abstract class

makePersistentInternal

public java.lang.Object makePersistentInternal(java.lang.Object obj,
                                               FieldValues preInsertChanges)
Method to make an object persistent during the persisting process. For internal use only

Specified by:
makePersistentInternal in interface PersistenceManager
Parameters:
obj - The object to persist
preInsertChanges - Changes to make before inserting
Returns:
The persisted object

makePersistent

public java.lang.Object makePersistent(java.lang.Object pc)
Method to make an object persistent.

Specified by:
makePersistent in interface javax.jdo.PersistenceManager
Parameters:
pc - The object to persist

makePersistentAll

public java.lang.Object[] makePersistentAll(java.lang.Object[] pcs)
Make an array of Persistent Capable objects persistent

Specified by:
makePersistentAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Array of Persistent Capable objects

makePersistentAll

public java.util.Collection makePersistentAll(java.util.Collection pcs)
Make a Collection of Persistence Capable objects persistent

Specified by:
makePersistentAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Collection of Persistence Capable objects

deletePersistent

public void deletePersistent(java.lang.Object pc)
JDO method to delete a Persistence Capable object

Specified by:
deletePersistent in interface javax.jdo.PersistenceManager
Parameters:
pc - Persistence Capable object

deletePersistentAll

public void deletePersistentAll(java.lang.Object[] pcs)
JDO method to delete an array of Persistence Capable objects

Specified by:
deletePersistentAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Array of Persistence Capable objects

deletePersistentAll

public void deletePersistentAll(java.util.Collection pcs)
JDO method to delete a Collection of Persistence Capable objects

Specified by:
deletePersistentAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Collection of Persistence Capable objects

makeTransient

public void makeTransient(java.lang.Object pc,
                          boolean useFetchPlan)
Make a Persistence-Capable object transient , optionally using the fetch plan.

Specified by:
makeTransient in interface javax.jdo.PersistenceManager
Parameters:
pc - Persistence-Capable object
useFetchPlan - Whether to use the fetch plan

makeTransientAll

public void makeTransientAll(java.lang.Object[] pcs,
                             boolean useFetchPlan)
Make an array of Persistence-Capable objects transient

Specified by:
makeTransientAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Array of Persistence-Capable objects
useFetchPlan - Whether to use the fetch plan

makeTransientAll

public void makeTransientAll(java.util.Collection pcs,
                             boolean useFetchPlan)
Make a Collection of Persistence-Capable objects transient

Specified by:
makeTransientAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Collection of Persistence-Capable objects
useFetchPlan - Whether to use the fetch plan

makeTransient

public void makeTransient(java.lang.Object pc)
Make a Persistence-Capable object transient

Specified by:
makeTransient in interface javax.jdo.PersistenceManager
Parameters:
pc - Persistence-Capable object

makeTransientAll

public void makeTransientAll(java.lang.Object[] pcs)
Make an array of Persistence-Capable objects transient

Specified by:
makeTransientAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Array of Persistence-Capable objects

makeTransientAll

public void makeTransientAll(java.util.Collection pcs)
Make a Collection of Persistence-Capable objects transient

Specified by:
makeTransientAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Collection of Persistence-Capable objects

makeTransientInternal

public void makeTransientInternal(java.lang.Object obj,
                                  FetchPlanState state)
Method to make an object transient. For internal use only

Specified by:
makeTransientInternal in interface PersistenceManager
Parameters:
obj - The object to persist
state - Object containing the state of the fetchplan process
Returns:
The persisted object

makeTransactional

public void makeTransactional(java.lang.Object pc)
Make a Persistence-Capable object transient

Specified by:
makeTransactional in interface javax.jdo.PersistenceManager
Parameters:
pc - Persistence-Capable object

makeTransactionalAll

public void makeTransactionalAll(java.lang.Object[] pcs)
Make an array of Persistence-Capable objects transactional

Specified by:
makeTransactionalAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Array of Persistence-Capable objects

makeTransactionalAll

public void makeTransactionalAll(java.util.Collection pcs)
Make a collection of PersistenceCapable objects transactional

Specified by:
makeTransactionalAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Collection of Persistence-Capable objects

makeNontransactional

public void makeNontransactional(java.lang.Object pc)
Make a Persistence-Capable object non-transactional

Specified by:
makeNontransactional in interface javax.jdo.PersistenceManager
Parameters:
pc - Persistence-Capable object

makeNontransactionalAll

public void makeNontransactionalAll(java.lang.Object[] pcs)
Make an array of Persistence-Capable objects non-transactional

Specified by:
makeNontransactionalAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Array of Persistence-Capable objects

makeNontransactionalAll

public void makeNontransactionalAll(java.util.Collection pcs)
Make a Collection of Persistence-Capable objects non-transactional

Specified by:
makeNontransactionalAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - Collection of Persistence-Capable objects

detachInternal

public void detachInternal(java.lang.Object pc,
                           FetchPlanState state)
Detach the specified object from the PersistenceManager.

Specified by:
detachInternal in interface PersistenceManager
Parameters:
pc - the instance to detach
state - State for the detachment process
Since:
JDO 2.0

detachCopy

public java.lang.Object detachCopy(java.lang.Object pc)
Detach the specified object from the PersistenceManager.

Specified by:
detachCopy in interface javax.jdo.PersistenceManager
Parameters:
pc - the instance to detach
Returns:
the detached instance
Since:
JDO 2.0
See Also:
detachCopyAll(Object[])

detachCopyInternal

public java.lang.Object detachCopyInternal(java.lang.Object pc,
                                           FetchPlanState state)
Method to detach a copy of the passed object using the detached state.

Specified by:
detachCopyInternal in interface PersistenceManager
Parameters:
pc - The Object
state - Detach state to use
Returns:
The detached object copy of the original

detachCopyAll

public java.lang.Object[] detachCopyAll(java.lang.Object[] pcs)
Detach the specified objects from the 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.

Specified by:
detachCopyAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - the instances to detach
Returns:
the detached instances
Throws:
javax.jdo.JDOUserException - if any of the instances do not
Since:
JDO 2.0
See Also:
makePersistentAll(Object[]), getFetchPlan()

detachCopyAll

public java.util.Collection detachCopyAll(java.util.Collection pcs)
Detach the specified objects from the PersistenceManager.

Specified by:
detachCopyAll in interface javax.jdo.PersistenceManager
Parameters:
pcs - the instances to detach
Returns:
the detached instances
Since:
JDO 2.0
See Also:
detachCopyAll(Object[])

attachCopy

public java.lang.Object attachCopy(java.lang.Object pc,
                                   boolean embedded)
Method to attach a persistent object.

Specified by:
attachCopy in interface PersistenceManager
Parameters:
pc - The object
embedded - Whether the object is embedded
Returns:
The attached object

putUserObject

public java.lang.Object putUserObject(java.lang.Object key,
                                      java.lang.Object value)
Method to put a user object into the PersistenceManager. This is so that multiple users can each have a user object for example. The parameter is not inspected or used in any way by the JDO implementation.

Specified by:
putUserObject in interface javax.jdo.PersistenceManager
Parameters:
key - The key to store the user object under
value - The object to store
Returns:
The previous value for this key
Since:
1.1

getUserObject

public java.lang.Object getUserObject(java.lang.Object key)
Method to get a user object from the PersistenceManager. This is for user objects which are stored under a key. The parameter is not inspected or used in any way by the JDO implementation.

Specified by:
getUserObject in interface javax.jdo.PersistenceManager
Parameters:
key - The key to store the user object under
Returns:
The user object for that key
Since:
1.1

removeUserObject

public java.lang.Object removeUserObject(java.lang.Object key)
Method to remove a user object from the PersistenceManager. This is for user objects which are stored under a key. The parameter is not inspected or used in any way by the JDO implementation.

Specified by:
removeUserObject in interface javax.jdo.PersistenceManager
Parameters:
key - The key whose uder object is to be removed.
Returns:
The user object that was removed
Since:
1.1

setUserObject

public void setUserObject(java.lang.Object obj)
The application might manage PersistenceManager instances by using an associated object for bookkeeping purposes. These methods allow the user to manage the associated object. The parameter is not inspected or used in any way by the JDO implementation.

Specified by:
setUserObject in interface javax.jdo.PersistenceManager
Parameters:
obj - User Object

getUserObject

public java.lang.Object getUserObject()
The application might manage PersistenceManager instances by using an associated object for bookkeeping purposes. These methods allow the user to manage the associated object. The parameter is not inspected or used in any way by the JDO implementation.*

Specified by:
getUserObject in interface javax.jdo.PersistenceManager
Returns:
User object

getPersistenceManagerFactory

public javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
Retrieve the PersistenceManagerFactory for this manager

Specified by:
getPersistenceManagerFactory in interface javax.jdo.PersistenceManager
Returns:
The PersistenceManagerFactory

getObjectIdClass

public java.lang.Class getObjectIdClass(java.lang.Class clazz)
Retrieve the class for the objectid

Specified by:
getObjectIdClass in interface javax.jdo.PersistenceManager
Parameters:
clazz - The class to retrieve
Returns:
The Class of the ObjectId

setMultithreaded

public void setMultithreaded(boolean multithreaded)
Mutator for the multithreaded capability of the manager

Specified by:
setMultithreaded in interface javax.jdo.PersistenceManager
Parameters:
multithreaded - Whether to run multithreaded or not

getMultithreaded

public boolean getMultithreaded()
Accessor for the multithreaded capability of the manager

Specified by:
getMultithreaded in interface javax.jdo.PersistenceManager
Returns:
Whether the PersistenceManager is multithreaded or not

setIgnoreCache

public void setIgnoreCache(boolean ignore)
Mutator for whether to ignore the cache or not

Specified by:
setIgnoreCache in interface javax.jdo.PersistenceManager
Parameters:
ignore - Whether to ignore the cache or not

getIgnoreCache

public boolean getIgnoreCache()
Accessor for whether to ignore the cache or not

Specified by:
getIgnoreCache in interface javax.jdo.PersistenceManager
Returns:
Whether to ignore the cache or not

getStoreManager

public StoreManager getStoreManager()
Accessor for the Store Manager.

Specified by:
getStoreManager in interface PersistenceManager
Returns:
The Store Manager.

getMetaDataManager

public MetaDataManager getMetaDataManager()
Accessor for the MetaData Manager.

Specified by:
getMetaDataManager in interface PersistenceManager
Returns:
The MetaData Manager.

getConnection

public java.sql.Connection getConnection(boolean forWriting,
                                         boolean forQuery)
                                  throws java.sql.SQLException
Accessor for a connection to the datastore.

Specified by:
getConnection in interface PersistenceManager
Parameters:
forWriting - Whether it is for writing to
forQuery - Whether the connection is to be used by a query (i.e.JDOQUERY).
Returns:
The Connection.
Throws:
java.sql.SQLException - Thrown when an error occurs in obtaining it.

getConnection

public java.sql.Connection getConnection(boolean forWriting,
                                         boolean forQuery,
                                         boolean useOpenedConnection)
                                  throws java.sql.SQLException
Accessor for the connection to the datasource.

Specified by:
getConnection in interface PersistenceManager
Parameters:
forWriting - Whether the connection is read-only or read-write.
forQuery - Whether the connection is to be used by a query (i.e.JDOQUERY).
useOpenedConnection - whether to use an already opened connection, if one is opened.
Returns:
The Connection
Throws:
java.sql.SQLException

isConnectionOpen

public boolean isConnectionOpen()
Checks whether a connection to the datasource is open.

Specified by:
isConnectionOpen in interface PersistenceManager
Returns:
true if the Connection is open

releaseConnection

public void releaseConnection(java.sql.Connection conn)
                       throws java.sql.SQLException
Method to release a connection.

Specified by:
releaseConnection in interface PersistenceManager
Parameters:
conn - The Connection to release.
Throws:
java.sql.SQLException - Thrown when an error occurs

enlistInTransaction

public void enlistInTransaction(StateManager sm)
Description copied from interface: PersistenceManager
Method to enlist the specified StateManager in the current transaction.

Specified by:
enlistInTransaction in interface PersistenceManager
Parameters:
sm - The StateManager

evictFromTransaction

public void evictFromTransaction(StateManager sm)
Description copied from interface: PersistenceManager
Method to evict the specified StateManager from the current transaction.

Specified by:
evictFromTransaction in interface PersistenceManager
Parameters:
sm - The StateManager

removeStateManager

public void removeStateManager(StateManager sm)
Description copied from interface: PersistenceManager
Method to remove the object managed by the specified StateManager from the cache.

Specified by:
removeStateManager in interface PersistenceManager
Parameters:
sm - The StateManager

getObjectById

public java.lang.Object getObjectById(java.lang.Object id,
                                      FieldValues fv)
Description copied from interface: PersistenceManager
Accessor for an object given the object id.

Specified by:
getObjectById in interface PersistenceManager
Parameters:
id - Id of the object.
fv - the FieldValues
Returns:
the Object

findStateManager

public StateManager findStateManager(javax.jdo.spi.PersistenceCapable pc)
Description copied from interface: PersistenceManager
Method to find the StateManager for the passed PersistenceCapable object when it is managed by this PM.

Specified by:
findStateManager in interface PersistenceManager
Parameters:
pc - The PersistenceCapable object
Returns:
The StateManager

hereIsStateManager

public void hereIsStateManager(StateManager sm,
                               javax.jdo.spi.PersistenceCapable pc)
Description copied from interface: PersistenceManager
Method to add the StateManager for an object to this PersistenceManager's list.

Specified by:
hereIsStateManager in interface PersistenceManager
Parameters:
sm - The StateManager
pc - The object managed by the StateManager

markDirty

public void markDirty(StateManager sm)
Description copied from interface: PersistenceManager
Mark the specified StateManager as dirty

Specified by:
markDirty in interface PersistenceManager
Parameters:
sm - The StateManager

flush

public void flush()
This method flushes all dirty, new, and deleted instances to the datastore. It has no effect if a transaction is not active. If a datastore transaction is active, this method synchronizes the cache with the datastore and reports any exceptions. If an optimistic transaction is active, this method obtains a datastore connection and synchronizes the cache with the datastore using this connection. The connection obtained by this method is held until the end of the transaction.

Specified by:
flush in interface javax.jdo.PersistenceManager

checkConsistency

public void checkConsistency()
Method to check the consistency of the cache.

Specified by:
checkConsistency in interface javax.jdo.PersistenceManager

isInserting

public boolean isInserting(javax.jdo.spi.PersistenceCapable pc)
Tests whether this object is being inserted.

Specified by:
isInserting in interface PersistenceManager
Parameters:
pc - the object to verify the status
Returns:
true if this instance is inserting.

clearDirty

public void clearDirty(StateManager sm)
Description copied from interface: PersistenceManager
Mark the specified StateManager as clean.

Specified by:
clearDirty in interface PersistenceManager
Parameters:
sm - The StateManager

getClassLoaderResolver

public ClassLoaderResolver getClassLoaderResolver()
Accessor for the ClassLoaderResolver

Specified by:
getClassLoaderResolver in interface PersistenceManager
Returns:
the ClassLoaderResolver

getPMHandle

public PersistenceManager getPMHandle()
Accessor for a handle to the Persistence Manager

Specified by:
getPMHandle in interface PersistenceManager
Returns:
The PM handle.

addStateManager

public void addStateManager(StateManager sm)
Description copied from interface: PersistenceManager
Method to add the object managed by the specified StateManager to the cache.

Specified by:
addStateManager in interface PersistenceManager
Parameters:
sm - The StateManager

getStateManagerById

public StateManager getStateManagerById(java.lang.Object myID)
Description copied from interface: PersistenceManager
Accessor for the StateManager of an object given the object id.

Specified by:
getStateManagerById in interface PersistenceManager
Parameters:
myID - Id of the object.
Returns:
The StateManager

getPMFContext

public PMFContext getPMFContext()
Gets the context which this PersistenceManager is running

Specified by:
getPMFContext in interface PersistenceManager
Returns:
Returns the pmfContext.

getDataStoreConnection

public javax.jdo.datastore.JDOConnection getDataStoreConnection()
(non-Javadoc)

Specified by:
getDataStoreConnection in interface javax.jdo.PersistenceManager
Since:
1.1
See Also:
PersistenceManager.getDataStoreConnection()

getSequence

public javax.jdo.datastore.Sequence getSequence(java.lang.String sequenceName)
Accessor for a Sequence.

Specified by:
getSequence in interface javax.jdo.PersistenceManager
Parameters:
sequenceName - Name of the sequence
Returns:
The sequence

notifyLifecycleListenersForEvent

public void notifyLifecycleListenersForEvent(java.lang.Object obj,
                                             int lifecycleEventType,
                                             java.lang.Object otherObj)
Utility to notify the lifecycle listeners for an event on an object. JDO 2.0 spec 12.15 "LifecycleListeners".

Specified by:
notifyLifecycleListenersForEvent in interface PersistenceManager
Parameters:
obj - The object that had the operation performed on it
lifecycleEventType - The lifecycle event
otherObj - Other object involved in the event (if any)
Since:
1.1

removeAllInstanceLifecycleListeners

public void removeAllInstanceLifecycleListeners()
See Also:
AbstractPersistenceManager.removeAllInstanceLifecycleListeners()

addInstanceLifecycleListener

public void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener,
                                         java.lang.Class[] classes)
JDO 2.0 spec 12.15 "LifecycleListeners".

Specified by:
addInstanceLifecycleListener in interface javax.jdo.PersistenceManager
Parameters:
listener - The instance lifecycle listener to sends events to
classes - The classes that it is interested in
Since:
1.1

removeInstanceLifecycleListener

public void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener)
JDO 2.0 spec 12.15 "LifecycleListeners".

Specified by:
removeInstanceLifecycleListener in interface javax.jdo.PersistenceManager
Parameters:
listener - The instance lifecycle listener to remove.
Since:
1.1

addQueryResult

public void addQueryResult(QueryResult queryResult)
Description copied from interface: PersistenceManager
Add opened query results to the pm

Specified by:
addQueryResult in interface PersistenceManager
Parameters:
queryResult - The result to add

removeQueryResult

public void removeQueryResult(QueryResult queryResult)
Description copied from interface: PersistenceManager
Remove query results from the pm

Specified by:
removeQueryResult in interface PersistenceManager
Parameters:
queryResult - The result to remove

addQueryRun

public void addQueryRun(java.lang.String singleStringQuery)
Description copied from interface: PersistenceManager
Add queries already run to the pm

Specified by:
addQueryRun in interface PersistenceManager
Parameters:
singleStringQuery -

hasQueryRun

public boolean hasQueryRun(java.lang.String singleStringQuery)
Description copied from interface: PersistenceManager
Whether the query was already run

Specified by:
hasQueryRun in interface PersistenceManager
Parameters:
singleStringQuery -
Returns:
true if the query was run previously by this PersistenceManager

removeQueryRun

public void removeQueryRun(java.lang.String singleStringQuery)
Description copied from interface: PersistenceManager
Remove query results from the pm

Specified by:
removeQueryRun in interface PersistenceManager
Parameters:
singleStringQuery -

replaceObjectId

public void replaceObjectId(javax.jdo.spi.PersistenceCapable pc,
                            java.lang.Object oldID,
                            java.lang.Object newID)
Replace the previous object id for a PC object to a new

Specified by:
replaceObjectId in interface PersistenceManager
Parameters:
pc - The Persistence Capable object
oldID - the old id
newID - the new id

putObjectIntoCache

public void putObjectIntoCache(StateManager sm,
                               boolean level1,
                               boolean level2)
Method to put an object into the respective cache.

Specified by:
putObjectIntoCache in interface PersistenceManager
Parameters:
sm - The state manager
level1 - Whether to put into L1 cache
level2 - Whether to put into L2 cache

removeObjectFromCache

public void removeObjectFromCache(javax.jdo.spi.PersistenceCapable pc,
                                  java.lang.Object id,
                                  boolean level1,
                                  boolean level2)
Method to remove an object from the respective cache.

Specified by:
removeObjectFromCache in interface PersistenceManager
Parameters:
pc - The object
id - The id of the object
level1 - Whether to remove from the L1 cache
level2 - Whether to remove from the L2 cache

addConnectionEventListener

public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Parameters:
listener -

removeConnectionEventListener

public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Parameters:
listener -


Copyright © -2007 . All Rights Reserved.