org.objectweb.speedo.pm.jdo.lib
Class JDOPOManager

java.lang.Object
  extended by org.objectweb.speedo.pm.lib.AbstractPOManager
      extended by org.objectweb.speedo.pm.jdo.lib.JDOPOManager
All Implemented Interfaces:
JDOConnection, PersistenceManager, javax.transaction.Synchronization, BindingController, POManagerItf, JDOPOManagerItf

public class JDOPOManager
extends AbstractPOManager
implements JDOPOManagerItf, BindingController

Is a fractal component exporting the POManagerItf interface. This implementation delegates most of the JDO methods (javax.jdo.PersistenceManager) to the underlying TransactionPersistenceManager, the perseus component managing the concurrency, the caching and the loading aspect. In order to represents a working set (transtional or not) this PM is linked forever to an org.objectweb.speedo.workingset.jdo.api.JDOTransactionItf instance. The status of this JDOTransactionItf instance changes when this PM is allocated or closed, or when transaction demarcations are done through the javax.jdo.Transaction interface. This implementation uses a QueryManager for allocating CompiledQuery instance. Concerning the javax.jdo.Query implementation, this PM uses org.objectweb.speedo.query.lib.SpeedoQuery which are created each time (No pooling mechanism). The last dependencies is the JormFactory and a P

Author:
S.Chassande-Barrioz
See Also:
PersistenceManager, TransactionalPersistenceManager, JormFactory, POManagerFactoryItf, QueryManager, CompiledQuery, JDOTransactionItf

Field Summary
 
Fields inherited from class org.objectweb.speedo.pm.lib.AbstractPOManager
COMPONENT_BINDING, connectionSpec, currentThread, fetchPlan, jf, JORM_FACTORY_BINDING, logger, loggerFactory, nbUse, pmf, PNAME_CODER_BINDING, pnc, PO_MANAGER_FACTORY_BINDING, prefetchOnExtent, prefetchOnQuery, QUERY_MANAGER_BINDING, queryManager, semaphore, thisPM, tpm, TRANSACTION_BINDING, TRANSACTIONAL_PERSISTENCE_MANAGER_BINDING, tx
 
Constructor Summary
JDOPOManager()
           
 
Method Summary
 void addInstanceLifecycleListener(InstanceLifecycleListener l, java.lang.Class[] classes)
           
 void checkConsistency()
           
 void close()
          This method closes the PersistenceManager.
 void closePOManager()
          Close the POM
 Query createQuery(java.lang.Object o)
           
 Transaction currentTransaction()
          Return the JDOTransactionItf instance associated with a PersistenceManager.
 void deleteByQuery(QueryDefinition qd)
           
 void deletePersistent(java.lang.Object o)
          Delete the persistent instance from the data store.
 void deletePersistentAll(java.util.Collection pcs)
          Delete a Set of instances from the data store.
 void deletePersistentAll(java.lang.Object[] pcs)
          Delete an array of instances from the data store.
 java.lang.Object detachCopy(java.lang.Object o)
          Make a detached copy of the persitent object o and return it.
 java.util.Collection detachCopyAll(java.util.Collection collection)
          Create a detached copy for each element of collection (assuming each element is persistent).
 java.lang.Object[] detachCopyAll(java.lang.Object[] objects)
           
 void evict(java.lang.Object o)
          Mark an instance as no longer needed in the cache.
 void evictAll()
          Mark all persistent-nontransactional instances as no longer needed in the cache.
 void evictAll(java.util.Collection pcs)
          Mark a Set of instances as no longer needed in the cache.
 void evictAll(java.lang.Object[] pcs)
          Mark an array of instances as no longer needed in the cache.
 void flush()
           
 JDOConnection getDataStoreConnection()
           
 boolean getDetachAllOnCommit()
           
 java.lang.Object getEncodedPName(PersistentObjectItf po)
          Encodes a PName into a serializable representation which could be decoded later.
 Extent getExtent(java.lang.Class arg0)
           
 Extent getExtent(java.lang.Class persistenceCapableClass, boolean subclasses)
          Not implemented.
 FetchPlan getFetchPlan()
           
 boolean getIgnoreCache()
          Get the ignoreCache setting for queries.
 boolean getMultithreaded()
          Get the current Multithreaded flag for this PersistenceManager.
 java.lang.Object getNativeConnection()
           
 java.lang.Object getObjectById(java.lang.Class arg0, java.lang.Object oid)
           
 java.lang.Object getObjectById(java.lang.Object oid)
           
 java.lang.Object getObjectById(java.lang.Object oid, boolean validate)
          This method locates a persistent instance in the cache of instances managed by this PersistenceManager.
 java.lang.Object getObjectId(java.lang.Object pc)
          The ObjectId returned by this method represents the JDO identity of the instance.
 java.lang.Class getObjectIdClass(java.lang.Class cls)
          Fetches the Null PName associated to the PBinder of the persistent class
 java.util.Collection getObjectsById(java.util.Collection arg0)
           
 java.util.Collection getObjectsById(java.util.Collection arg0, boolean validate)
           
 java.lang.Object[] getObjectsById(java.lang.Object[] arg0)
           
 java.lang.Object[] getObjectsById(java.lang.Object[] arg0, boolean arg1)
           
 PersistenceManagerFactory getPersistenceManagerFactory()
           
 Sequence getSequence(java.lang.String name)
           
 java.lang.Object getTransactionalObjectId(java.lang.Object o)
          Not implemented.
 java.lang.Object getUserObject()
          The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance.
 java.lang.Object getUserObject(java.lang.Object arg0)
           
 boolean isClosed()
           
 void makeNontransactional(java.lang.Object o)
           
 void makeNontransactionalAll(java.util.Collection pcs)
           
 void makeNontransactionalAll(java.lang.Object[] pcs)
           
 java.lang.Object makePersistent(java.lang.Object o)
          Make the transient instance persistent in this PersistenceManager.
 java.util.Collection makePersistentAll(java.util.Collection pcs)
          Make a Set of instances persistent.
 java.lang.Object[] makePersistentAll(java.lang.Object[] pcs)
          Make an array of instances persistent.
 void makeTransactional(java.lang.Object o)
          Make an instance subject to transactional boundaries.
 void makeTransactionalAll(java.util.Collection pcs)
          Make a Set of instances subject to transactional boundaries.
 void makeTransactionalAll(java.lang.Object[] pcs)
          Make an array of instances subject to transactional boundaries.
 void makeTransient(java.lang.Object o)
          Make an instance transient, removing it from management by this PersistenceManager.
 void makeTransient(java.lang.Object o, boolean useFetchPlan)
           
 void makeTransientAll(java.util.Collection pcs)
          Make a Set of instances transient, removing them from management by this PersistenceManager.
 void makeTransientAll(java.util.Collection os, boolean useFetchPlan)
           
 void makeTransientAll(java.lang.Object[] pcs)
          Make an array of instances transient, removing them from management by this PersistenceManager.
 void makeTransientAll(java.lang.Object[] os, boolean useFetchPlan)
           
 java.lang.Object newInstance(java.lang.Class arg0)
           
 Query newNamedQuery(java.lang.Class klass, java.lang.String name)
           
 java.lang.Object newObjectIdInstance(java.lang.Class aClass, java.lang.Object s)
           
 Query newQuery()
          Create a new Query with no elements.
 Query newQuery(java.lang.Class cls)
          Create a new Query specifying the Class of the candidate instances.
 Query newQuery(java.lang.Class cls, java.util.Collection cln)
          Create a new Query with the Class of the candidate instances and candidate Set.
 Query newQuery(java.lang.Class cls, java.util.Collection cln, java.lang.String filter)
          Create a new Query with the Class of the candidate instances, candidate Set, and filter.
 Query newQuery(java.lang.Class cls, java.lang.String filter)
          Create a new Query with the Class of the candidate instances and filter.
 Query newQuery(Extent extent)
           
 Query newQuery(Extent extent, java.lang.String filter)
           
 Query newQuery(java.lang.Object compiled)
          Create a new Query using elements from another Query.
 Query newQuery(java.lang.String query)
           
 Query newQuery(java.lang.String language, java.lang.Object query)
          Create a new Query using the specified language.
 java.lang.Object putUserObject(java.lang.Object arg0, java.lang.Object arg1)
           
 void refresh(java.lang.Object o)
          Refresh the state of the instance from the data store.
 void refreshAll()
          Refresh the state of all applicable instances from the data store.
 void refreshAll(java.util.Collection pcs)
          Refresh the state of a Set of instances from the data store.
 void refreshAll(JDOException arg0)
           
 void refreshAll(java.lang.Object[] pcs)
          Refresh the state of an array of instances from the data store.
 void removeInstanceLifecycleListener(InstanceLifecycleListener classes)
           
 java.lang.Object removeUserObject(java.lang.Object arg0)
           
protected  void resetPMOnOpen(java.lang.Object connectionspec)
           
 void retrieve(java.lang.Object o)
           
 void retrieve(java.lang.Object o, boolean FGOnly)
           
 void retrieveAll(java.util.Collection pcs)
           
 void retrieveAll(java.util.Collection collection, boolean b)
           
 void retrieveAll(java.lang.Object[] pcs)
           
 void retrieveAll(java.lang.Object[] objects, boolean b)
           
 void setDetachAllOnCommit(boolean arg0)
           
 void setIgnoreCache(boolean flag)
          Set the ignoreCache parameter for queries.
 void setMultithreaded(boolean flag)
          Set the Multithreaded flag for this PersistenceManager.
 void setUserObject(java.lang.Object o)
           
 java.lang.Object speedoAttachCopy(java.lang.Object detached, java.util.Map map)
          Apply the changes contained in the detached object to the corresponding persistent instance in the cache.
 void speedoDeletePersistent(java.lang.Object o)
          Delete persistent a PersistentObjectItf.
 void speedoDeletePersistent(java.lang.Object oid, java.lang.Class pc)
           
 java.lang.Object speedoDetachCopy(PersistentObjectItf po, java.util.Map map, java.util.Collection fgHints)
           
 FetchPlanItf speedoGetFetchPlan()
           
 java.lang.Object speedoGetObjectById(java.lang.Object oid, boolean validate)
           
 java.lang.Object speedoMakePersistent(PersistentObjectItf po, java.util.Map map)
          Make persistent a PersistentObjectItf.
 void speedoRefresh(PersistentObjectItf sp, java.util.Map map, java.util.Collection fgHints)
           
 void speedoRetrieve(PersistentObjectItf sp, java.util.Map map, java.util.Collection fgHints)
           
 
Methods inherited from class org.objectweb.speedo.pm.lib.AbstractPOManager
addUse, afterCompletion, assertIsOpen, assertIsPO, assertPOManager, beforeCompletion, bindFc, bindPMThread, decodeIdentifier, getConnectionSpec, getPOManagerFactory, getSemaphore, getSpeedoTransaction, getTransactionalPersistenceManager, isPOMClosed, listFc, lookupFc, open, speedoDeletePersistentAll, speedoFlush, speedoGetObject, speedoGetObject, speedoPersist, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.speedo.pm.api.POManagerItf
addUse, decodeIdentifier, getConnectionSpec, getPOManagerFactory, getSemaphore, getSpeedoTransaction, getTransactionalPersistenceManager, isPOMClosed, open, speedoDeletePersistentAll, speedoGetObject
 
Methods inherited from interface javax.transaction.Synchronization
afterCompletion, beforeCompletion
 
Methods inherited from interface org.objectweb.fractal.api.control.BindingController
bindFc, listFc, lookupFc, unbindFc
 

Constructor Detail

JDOPOManager

public JDOPOManager()
Method Detail

createQuery

public Query createQuery(java.lang.Object o)

getNativeConnection

public java.lang.Object getNativeConnection()
Specified by:
getNativeConnection in interface JDOConnection

isClosed

public boolean isClosed()
Specified by:
isClosed in interface PersistenceManager

addInstanceLifecycleListener

public void addInstanceLifecycleListener(InstanceLifecycleListener l,
                                         java.lang.Class[] classes)
Specified by:
addInstanceLifecycleListener in interface PersistenceManager

removeInstanceLifecycleListener

public void removeInstanceLifecycleListener(InstanceLifecycleListener classes)
Specified by:
removeInstanceLifecycleListener in interface PersistenceManager

flush

public void flush()
Specified by:
flush in interface PersistenceManager

getDataStoreConnection

public JDOConnection getDataStoreConnection()
Specified by:
getDataStoreConnection in interface PersistenceManager

speedoGetFetchPlan

public FetchPlanItf speedoGetFetchPlan()
Specified by:
speedoGetFetchPlan in interface POManagerItf
Specified by:
speedoGetFetchPlan in class AbstractPOManager

getFetchPlan

public FetchPlan getFetchPlan()
Specified by:
getFetchPlan in interface PersistenceManager

getObjectIdClass

public java.lang.Class getObjectIdClass(java.lang.Class cls)
Fetches the Null PName associated to the PBinder of the persistent class

Specified by:
getObjectIdClass in interface PersistenceManager

close

public void close()
This method closes the PersistenceManager.

Specified by:
close in interface JDOConnection
Specified by:
close in interface PersistenceManager
Throws:
JDOUserException - if the transaction associated to the persistence manager is active.
JDOFatalDataStoreException - if there is a problem while releasing the persistence manager.

currentTransaction

public Transaction currentTransaction()
Return the JDOTransactionItf instance associated with a PersistenceManager.

Specified by:
currentTransaction in interface PersistenceManager
Returns:
the JDOTransactionItf associated with this PersistenceManager.

evict

public void evict(java.lang.Object o)
Mark an instance as no longer needed in the cache.

Specified by:
evict in interface PersistenceManager
Parameters:
o - the instance to evict from the cache.

evictAll

public void evictAll(java.lang.Object[] pcs)
Mark an array of instances as no longer needed in the cache.

Specified by:
evictAll in interface PersistenceManager
Parameters:
pcs - the array of instances to evict from the cache.
Throws:
JDOUserException - if some instances cannot be removed.
See Also:
evict(java.lang.Object pc)

evictAll

public void evictAll(java.util.Collection pcs)
Mark a Set of instances as no longer needed in the cache.

Specified by:
evictAll in interface PersistenceManager
Parameters:
pcs - the Set of instance to evict from the cache.
See Also:
evict(java.lang.Object pc)

evictAll

public void evictAll()
Mark all persistent-nontransactional instances as no longer needed in the cache. It transitions all persistent-nontransactional instances to hollow. Transactional instances are subject to eviction based on the RetainValues setting.

Specified by:
evictAll in interface PersistenceManager
See Also:
evict(java.lang.Object pc)

refresh

public void refresh(java.lang.Object o)
Refresh the state of the instance from the data store.

In an optimistic transaction, the state of instances in the cache might not match the state in the data store. This method is used to reload the state of the instance from the data store so that a subsequent commit is more likely to succeed.

Outside a transaction, this method will refresh nontransactional state.

Specified by:
refresh in interface PersistenceManager
Parameters:
o - the instance to refresh.

speedoRefresh

public void speedoRefresh(PersistentObjectItf sp,
                          java.util.Map map,
                          java.util.Collection fgHints)
Specified by:
speedoRefresh in interface POManagerItf

refreshAll

public void refreshAll(java.lang.Object[] pcs)
Refresh the state of an array of instances from the data store.

Specified by:
refreshAll in interface PersistenceManager
Parameters:
pcs - the array of instances to refresh. object.
See Also:
refresh(java.lang.Object pc)

refreshAll

public void refreshAll(java.util.Collection pcs)
Refresh the state of a Set of instances from the data store.

Specified by:
refreshAll in interface PersistenceManager
Parameters:
pcs - the Set of instances to refresh.
See Also:
refresh(java.lang.Object pc)

refreshAll

public void refreshAll()
Refresh the state of all applicable instances from the data store.

If called with an active transaction, all transactional instances will be refreshed. If called outside an active transaction, all nontransactional instances will be refreshed.

Specified by:
refreshAll in interface PersistenceManager
See Also:
refresh(java.lang.Object pc)

refreshAll

public void refreshAll(JDOException arg0)
Specified by:
refreshAll in interface PersistenceManager

newQuery

public Query newQuery()
Create a new Query with no elements.

Specified by:
newQuery in interface PersistenceManager
Returns:
the new Query.

newQuery

public Query newQuery(java.lang.String query)
Specified by:
newQuery in interface PersistenceManager

newNamedQuery

public Query newNamedQuery(java.lang.Class klass,
                           java.lang.String name)
Specified by:
newNamedQuery in interface PersistenceManager

newQuery

public Query newQuery(java.lang.Object compiled)
Create a new Query using elements from another Query. The other Query must have been created by the same JDO implementation. It might be active in a different PersistenceManager or might have been serialized and restored.

All of the settings of the other Query are copied to this Query, except for the candidate Set or Extent.

Specified by:
newQuery in interface PersistenceManager
Parameters:
compiled - another Query from the same JDO implementation
Returns:
the new Query

newQuery

public Query newQuery(java.lang.String language,
                      java.lang.Object query)
Create a new Query using the specified language.

Specified by:
newQuery in interface PersistenceManager
Parameters:
language - the language of the query parameter
query - the query, which is of a form determined by the language
Returns:
the new Query

newQuery

public Query newQuery(java.lang.Class cls)
Create a new Query specifying the Class of the candidate instances.

Specified by:
newQuery in interface PersistenceManager
Parameters:
cls - the Class of the candidate instances
Returns:
the new Query

newQuery

public Query newQuery(Extent extent)
Specified by:
newQuery in interface PersistenceManager

newQuery

public Query newQuery(Extent extent,
                      java.lang.String filter)
Specified by:
newQuery in interface PersistenceManager

newQuery

public Query newQuery(java.lang.Class cls,
                      java.util.Collection cln)
Create a new Query with the Class of the candidate instances and candidate Set.

Specified by:
newQuery in interface PersistenceManager
Parameters:
cls - the Class of results
cln - the Set of candidate instances
Returns:
the new Query

newQuery

public Query newQuery(java.lang.Class cls,
                      java.lang.String filter)
Create a new Query with the Class of the candidate instances and filter.

Specified by:
newQuery in interface PersistenceManager
Parameters:
cls - the Class of results
filter - the filter for candidate instances
Returns:
the new Query

newQuery

public Query newQuery(java.lang.Class cls,
                      java.util.Collection cln,
                      java.lang.String filter)
Create a new Query with the Class of the candidate instances, candidate Set, and filter.

Specified by:
newQuery in interface PersistenceManager
Parameters:
cls - the Class of candidate instances
cln - the Set of candidate instances
filter - the filter for candidate instances
Returns:
the new Query

getExtent

public Extent getExtent(java.lang.Class persistenceCapableClass,
                        boolean subclasses)
Not implemented. The PersistenceManager manages a collection of instances in the data store based on the class of the instances. This method returns a Extent of instances in the data store that might be iterated or given to a Query. The Extent itself might not reference any instances, but only hold the class name and an indicator whether subclasses are included in the Extent.

Specified by:
getExtent in interface PersistenceManager
Parameters:
persistenceCapableClass - Class of instances
subclasses - whether to include instances of subclasses
Returns:
an Extent of the specified Class

getExtent

public Extent getExtent(java.lang.Class arg0)
Specified by:
getExtent in interface PersistenceManager

getObjectById

public java.lang.Object getObjectById(java.lang.Object oid,
                                      boolean validate)
This method locates a persistent instance in the cache of instances managed by this PersistenceManager. The getObjectById method attempts to find an instance in the cache with the specified JDO identity. The oid parameter object might have been returned by an earlier call to getObjectId or getTransactionalObjectId, or might have been constructed by the application.

Specified by:
getObjectById in interface PersistenceManager
Parameters:
oid - an ObjectId
validate - if the existence of the instance is to be validated. The flag is ignored in this implementation.
Returns:
the PersistenceCapable instance with the specified ObjectId
See Also:
getObjectId(java.lang.Object pc), getTransactionalObjectId(java.lang.Object pc)

getObjectById

public java.lang.Object getObjectById(java.lang.Class arg0,
                                      java.lang.Object oid)
Specified by:
getObjectById in interface PersistenceManager

getObjectById

public java.lang.Object getObjectById(java.lang.Object oid)
Specified by:
getObjectById in interface PersistenceManager

getObjectsById

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

getObjectsById

public java.util.Collection getObjectsById(java.util.Collection arg0)
Specified by:
getObjectsById in interface PersistenceManager

getObjectsById

public java.lang.Object[] getObjectsById(java.lang.Object[] arg0,
                                         boolean arg1)
Specified by:
getObjectsById in interface PersistenceManager

getObjectsById

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

speedoGetObjectById

public java.lang.Object speedoGetObjectById(java.lang.Object oid,
                                            boolean validate)

getObjectId

public java.lang.Object getObjectId(java.lang.Object pc)
The ObjectId returned by this method represents the JDO identity of the instance. The ObjectId is a copy (clone) of the internal state of the instance, and changing it does not affect the JDO identity of the instance.

Specified by:
getObjectId in interface PersistenceManager
Parameters:
pc - the PersistenceCapable instance
Returns:
the ObjectId of the instance
See Also:
getTransactionalObjectId(java.lang.Object pc), getObjectById(java.lang.Object oid, boolean validate)

getEncodedPName

public java.lang.Object getEncodedPName(PersistentObjectItf po)
Description copied from interface: POManagerItf
Encodes a PName into a serializable representation which could be decoded later. The representation depends on the PName structure.

Specified by:
getEncodedPName in interface POManagerItf
Overrides:
getEncodedPName in class AbstractPOManager
Parameters:
po - is a persistent object

getTransactionalObjectId

public java.lang.Object getTransactionalObjectId(java.lang.Object o)
Not implemented. The ObjectId returned by this method represents the JDO identity of the instance. The ObjectId is a copy (clone) of the internal state of the instance, and changing it does not affect the JDO identity of the instance.

If the object identity is being changed in the transaction, by the application modifying one or more of the application key fields, then this method returns the current identity in the transaction.

If there is no transaction in progress, or if none of the key fields is being modified, then this method will return the same value as getObjectId.

Specified by:
getTransactionalObjectId in interface PersistenceManager
Parameters:
o - a PersistenceCapable instance
Returns:
the ObjectId of the instance
See Also:
getObjectId(java.lang.Object pc), getObjectById(java.lang.Object oid, boolean validate)

makePersistent

public java.lang.Object makePersistent(java.lang.Object o)
Make the transient instance persistent in this PersistenceManager. This method must be called in an active transaction. The PersistenceManager assigns an ObjectId to the instance and transitions it to persistent-new. The instance will be managed in the Extent associated with its Class. The instance will be put into the data store at commit. The closure of instances of PersistenceCapable classes reachable from persistent fields will be made persistent at commit. [This is known as persistence by reachability.]

Specified by:
makePersistent in interface PersistenceManager
Parameters:
o - a transient instance of a Class that implements PersistenceCapable

speedoMakePersistent

public java.lang.Object speedoMakePersistent(PersistentObjectItf po,
                                             java.util.Map map)
Description copied from interface: POManagerItf
Make persistent a PersistentObjectItf. This method does the same thing than the PersistenceManager.makePersistent(Object) method except the call to the bind to the POManagerItf to the current thread.

Specified by:
speedoMakePersistent in interface POManagerItf
Parameters:
po - is the instance to make persistent.
map - is the context of the attachment process if any. If no attachment, it is null.
Returns:
TODO

makePersistentAll

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

Specified by:
makePersistentAll in interface PersistenceManager
Parameters:
pcs - an array of transient instances
Throws:
JDOUserException - if an object cannot be made persistent.
See Also:
makePersistent(java.lang.Object pc)

makePersistentAll

public java.util.Collection makePersistentAll(java.util.Collection pcs)
Make a Set of instances persistent.

Specified by:
makePersistentAll in interface PersistenceManager
Parameters:
pcs - a Set of transient instances
See Also:
makePersistent(java.lang.Object pc)

deletePersistent

public void deletePersistent(java.lang.Object o)
Delete the persistent instance from the data store. This method must be called in an active transaction. The data store object will be removed at commit. Unlike makePersistent, which makes the closure of the instance persistent, the closure of the instance is not deleted from the data store. This method has no effect if the instance is already deleted in the current transaction.

Specified by:
deletePersistent in interface PersistenceManager
Parameters:
o - a persistent instance
Throws:
JDOUserException - if the instance is transient or managed by another PersistenceManager.

speedoDeletePersistent

public void speedoDeletePersistent(java.lang.Object o)
Description copied from interface: POManagerItf
Delete persistent a PersistentObjectItf. This method does the same thing than the PersistenceManager.deletePersistent(Object) method except the call to the bind to the POManagerItf to the current thread.

Specified by:
speedoDeletePersistent in interface POManagerItf
Parameters:
o - is the instance to make persistent.

speedoDeletePersistent

public void speedoDeletePersistent(java.lang.Object oid,
                                   java.lang.Class pc)
Specified by:
speedoDeletePersistent in interface POManagerItf

deleteByQuery

public void deleteByQuery(QueryDefinition qd)
Specified by:
deleteByQuery in interface JDOPOManagerItf

deletePersistentAll

public void deletePersistentAll(java.lang.Object[] pcs)
Delete an array of instances from the data store.

Specified by:
deletePersistentAll in interface PersistenceManager
Parameters:
pcs - a Set of persistent instances
See Also:
deletePersistent(java.lang.Object pc)

deletePersistentAll

public void deletePersistentAll(java.util.Collection pcs)
Delete a Set of instances from the data store.

Specified by:
deletePersistentAll in interface PersistenceManager
Parameters:
pcs - a Set of persistent instances
See Also:
deletePersistent(java.lang.Object pc)

makeTransient

public void makeTransient(java.lang.Object o)
Make an instance transient, removing it from management by this PersistenceManager.

The instance loses its JDO identity and it is no longer associated with any PersistenceManager. The state of fields is preserved unchanged.

Specified by:
makeTransient in interface PersistenceManager
Parameters:
o - the instance to make transient.
Throws:
JDOUserException - if the instance is dirty.

makeTransientAll

public void makeTransientAll(java.lang.Object[] pcs)
Make an array of instances transient, removing them from management by this PersistenceManager.

Specified by:
makeTransientAll in interface PersistenceManager
Parameters:
pcs - the instances to make transient.
See Also:
makeTransient(java.lang.Object pc)

makeTransientAll

public void makeTransientAll(java.util.Collection pcs)
Make a Set of instances transient, removing them from management by this PersistenceManager.

The instances lose their JDO identity and they are no longer associated with any PersistenceManager. The state of fields is preserved unchanged.

Specified by:
makeTransientAll in interface PersistenceManager
Parameters:
pcs - the instances to make transient.

makeTransactional

public void makeTransactional(java.lang.Object o)
Make an instance subject to transactional boundaries.

Specified by:
makeTransactional in interface PersistenceManager
Parameters:
o - the instance to make transactional.
See Also:
PersistenceManager.makeTransactional(java.lang.Object)

makeTransactionalAll

public void makeTransactionalAll(java.lang.Object[] pcs)
Make an array of instances subject to transactional boundaries.

Specified by:
makeTransactionalAll in interface PersistenceManager
Parameters:
pcs - the array of instances to make transactional.
See Also:
makeTransactional(java.lang.Object pc)

makeTransactionalAll

public void makeTransactionalAll(java.util.Collection pcs)
Make a Set of instances subject to transactional boundaries.

Specified by:
makeTransactionalAll in interface PersistenceManager
Parameters:
pcs - the Set of instances to make transactional.
See Also:
makeTransactional(java.lang.Object pc)

makeNontransactional

public void makeNontransactional(java.lang.Object o)
Specified by:
makeNontransactional in interface PersistenceManager

makeNontransactionalAll

public void makeNontransactionalAll(java.lang.Object[] pcs)
Specified by:
makeNontransactionalAll in interface PersistenceManager

makeNontransactionalAll

public void makeNontransactionalAll(java.util.Collection pcs)
Specified by:
makeNontransactionalAll in interface PersistenceManager

setUserObject

public void setUserObject(java.lang.Object o)
Specified by:
setUserObject in interface PersistenceManager

getUserObject

public java.lang.Object getUserObject()
The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance.

Specified by:
getUserObject in interface PersistenceManager
Returns:
the user object associated with this PersistenceManager
See Also:
setUserObject(java.lang.Object)

getPersistenceManagerFactory

public PersistenceManagerFactory getPersistenceManagerFactory()
Specified by:
getPersistenceManagerFactory in interface PersistenceManager

setMultithreaded

public void setMultithreaded(boolean flag)
Set the Multithreaded flag for this PersistenceManager. Applications that use multiple threads to invoke methods or access fields from instances managed by this PersistenceManager must set this flag to true. Instances managed by this PersistenceManager include persistent or transactional instances of PersistenceCapable classes, as well as helper instances such as Query, JDOTransactionItf, or Extent.

Specified by:
setMultithreaded in interface PersistenceManager
Parameters:
flag - the Multithreaded setting.

getMultithreaded

public boolean getMultithreaded()
Get the current Multithreaded flag for this PersistenceManager. This option is ignored by the implementation.

Specified by:
getMultithreaded in interface PersistenceManager
Returns:
the Multithreaded setting.
See Also:
setMultithreaded(boolean)

setIgnoreCache

public void setIgnoreCache(boolean flag)
Set the ignoreCache parameter for queries.

Specified by:
setIgnoreCache in interface PersistenceManager
Parameters:
flag - the ignoreCache setting.

getIgnoreCache

public boolean getIgnoreCache()
Get the ignoreCache setting for queries.

Specified by:
getIgnoreCache in interface PersistenceManager
Returns:
the ignoreCache setting.
See Also:
setIgnoreCache(boolean)

newObjectIdInstance

public java.lang.Object newObjectIdInstance(java.lang.Class aClass,
                                            java.lang.Object s)
Specified by:
newObjectIdInstance in interface PersistenceManager

retrieve

public void retrieve(java.lang.Object o)
Specified by:
retrieve in interface PersistenceManager

speedoRetrieve

public void speedoRetrieve(PersistentObjectItf sp,
                           java.util.Map map,
                           java.util.Collection fgHints)
Specified by:
speedoRetrieve in interface POManagerItf

retrieveAll

public void retrieveAll(java.util.Collection pcs)
Specified by:
retrieveAll in interface PersistenceManager

retrieveAll

public void retrieveAll(java.lang.Object[] pcs)
Specified by:
retrieveAll in interface PersistenceManager

retrieveAll

public void retrieveAll(java.util.Collection collection,
                        boolean b)
Specified by:
retrieveAll in interface PersistenceManager

retrieveAll

public void retrieveAll(java.lang.Object[] objects,
                        boolean b)
Specified by:
retrieveAll in interface PersistenceManager

detachCopy

public java.lang.Object detachCopy(java.lang.Object o)
Make a detached copy of the persitent object o and return it. Only the fields belonging to the fetch group are reachable.

Specified by:
detachCopy in interface PersistenceManager
Parameters:
o -
Returns:
the detached copy of the persistent object

speedoDetachCopy

public java.lang.Object speedoDetachCopy(PersistentObjectItf po,
                                         java.util.Map map,
                                         java.util.Collection fgHints)
Specified by:
speedoDetachCopy in interface POManagerItf

detachCopyAll

public java.util.Collection detachCopyAll(java.util.Collection collection)
Create a detached copy for each element of collection (assuming each element is persistent). If there are duplicates in collection, the corresponding detached copy is used for each such duplicate.

Specified by:
detachCopyAll in interface PersistenceManager
Parameters:
collection -
Returns:
the collection of the detached copies in the same order than the parameter

detachCopyAll

public java.lang.Object[] detachCopyAll(java.lang.Object[] objects)
Specified by:
detachCopyAll in interface PersistenceManager

speedoAttachCopy

public java.lang.Object speedoAttachCopy(java.lang.Object detached,
                                         java.util.Map map)
Apply the changes contained in the detached object to the corresponding persistent instance in the cache.

Specified by:
speedoAttachCopy in interface POManagerItf
Parameters:
detached -
map - is the attachement context
Returns:
the peristent object containg attached values

getUserObject

public java.lang.Object getUserObject(java.lang.Object arg0)
Specified by:
getUserObject in interface PersistenceManager

putUserObject

public java.lang.Object putUserObject(java.lang.Object arg0,
                                      java.lang.Object arg1)
Specified by:
putUserObject in interface PersistenceManager

removeUserObject

public java.lang.Object removeUserObject(java.lang.Object arg0)
Specified by:
removeUserObject in interface PersistenceManager

checkConsistency

public void checkConsistency()
Specified by:
checkConsistency in interface PersistenceManager

getSequence

public Sequence getSequence(java.lang.String name)
Specified by:
getSequence in interface PersistenceManager

newInstance

public java.lang.Object newInstance(java.lang.Class arg0)
Specified by:
newInstance in interface PersistenceManager

closePOManager

public void closePOManager()
Description copied from interface: POManagerItf
Close the POM

Specified by:
closePOManager in interface POManagerItf
Overrides:
closePOManager in class AbstractPOManager

resetPMOnOpen

protected void resetPMOnOpen(java.lang.Object connectionspec)
Overrides:
resetPMOnOpen in class AbstractPOManager

makeTransient

public void makeTransient(java.lang.Object o,
                          boolean useFetchPlan)
Specified by:
makeTransient in interface PersistenceManager

makeTransientAll

public void makeTransientAll(java.lang.Object[] os,
                             boolean useFetchPlan)
Specified by:
makeTransientAll in interface PersistenceManager

makeTransientAll

public void makeTransientAll(java.util.Collection os,
                             boolean useFetchPlan)
Specified by:
makeTransientAll in interface PersistenceManager

retrieve

public void retrieve(java.lang.Object o,
                     boolean FGOnly)
Specified by:
retrieve in interface PersistenceManager

getDetachAllOnCommit

public boolean getDetachAllOnCommit()
Specified by:
getDetachAllOnCommit in interface PersistenceManager

setDetachAllOnCommit

public void setDetachAllOnCommit(boolean arg0)
Specified by:
setDetachAllOnCommit in interface PersistenceManager