|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.resource.PersistenceManagerImpl
Implementation of the PersistenceManager for use in JCA environments.
An application handle associated to the ManagedConnectionImpl
.
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 |
protected static final Localiser LOCALISER
Constructor Detail |
public PersistenceManagerImpl(ManagedConnectionImpl mc)
mc
- The connection implementation.Method Detail |
public void dump(java.lang.Object obj, java.io.PrintWriter out)
dump
in interface PersistenceManager
obj
- The object to dumpout
- The PrintWriter to usePersistenceManager.dump(java.lang.Object, java.io.PrintWriter)
public java.lang.Object getObjectById(java.lang.Object id, FieldValues fv, java.lang.Class clazz, boolean ignoreCache)
getObjectById
in interface PersistenceManager
id
- Id of the object.fv
- Field values for the objectclazz
- Class name of the objectignoreCache
- true if it must ignore the cache
public java.lang.Object getObjectByAID(java.lang.Class pcClass, FieldValues fv, boolean ignoreCache, boolean checkInheritance)
getObjectByAID
in interface PersistenceManager
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.
public javax.resource.cci.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
getLocalTransaction
in interface javax.resource.cci.Connection
javax.resource.ResourceException
- Thrown when an error occurspublic javax.resource.cci.ConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.cci.Connection
javax.resource.ResourceException
- public javax.resource.cci.Interaction createInteraction() throws javax.resource.ResourceException
createInteraction
in interface javax.resource.cci.Connection
javax.resource.ResourceException
- public javax.resource.cci.ResultSetInfo getResultSetInfo() throws javax.resource.ResourceException
getResultSetInfo
in interface javax.resource.cci.Connection
javax.resource.ResourceException
- public void close()
close
in interface javax.resource.cci.Connection
public boolean isClosed()
isClosed
in interface javax.jdo.PersistenceManager
public void setDetachOnClose(boolean detach)
detach
- Whether to detach objects on close of the PM.public boolean getDetachOnClose()
public void setDetachAllOnCommit(boolean detach)
setDetachAllOnCommit
in interface javax.jdo.PersistenceManager
detach
- Whether to detach objects on commit of the txn.public boolean getDetachAllOnCommit()
getDetachAllOnCommit
in interface javax.jdo.PersistenceManager
public boolean isDelayDatastoreOperationsEnabled()
isDelayDatastoreOperationsEnabled
in interface PersistenceManager
public void refresh(java.lang.Object o)
refresh
in interface javax.jdo.PersistenceManager
o
- Object to refreshpublic void retrieve(java.lang.Object o, boolean fgOnly)
retrieve
in interface javax.jdo.PersistenceManager
o
- Object to retrievefgOnly
- Whether to include only fields in current fetch grouppublic void retrieve(java.lang.Object o)
retrieve
in interface javax.jdo.PersistenceManager
o
- Object to retrievepublic void retrieveAll(java.util.Collection pcs)
retrieveAll
in interface javax.jdo.PersistenceManager
pcs
- Collection of Persistence-Capable objectspublic void retrieveAll(java.lang.Object[] pcs)
retrieveAll
in interface javax.jdo.PersistenceManager
pcs
- Array of Persistence-Capable objectspublic void retrieveAll(java.lang.Object[] pcs, boolean fgOnly)
PersistenceManager
that the application intends to use
the instances, and their field values should be retrieved. The fields
in the current fetch group must be retrieved, and the implementation
might retrieve more fields than the current fetch-group.
The PersistenceManager
might use policy information
about the class to retrieve associated instances.
retrieveAll
in interface javax.jdo.PersistenceManager
pcs
- the instancesfgOnly
- whether to retrieve only the current fetch-group fieldspublic void retrieveAll(java.util.Collection pcs, boolean fgOnly)
PersistenceManager
that the application intends to use
the instances, and their field values should be retrieved. The fields
in the current fetch group must be retrieved, and the implementation
might retrieve more fields than the current fetch-group.
The PersistenceManager
might use policy information
about the class to retrieve associated instances.
retrieveAll
in interface javax.jdo.PersistenceManager
pcs
- the instancesfgOnly
- whether to retrieve only the current fetch group fieldspublic javax.jdo.Transaction currentTransaction()
currentTransaction
in interface javax.jdo.PersistenceManager
public void evict(java.lang.Object o)
evict
in interface javax.jdo.PersistenceManager
o
- Object to evictpublic void evictAll(java.lang.Object[] os)
evictAll
in interface javax.jdo.PersistenceManager
os
- Array of objects to evictpublic void evictAll(java.util.Collection os)
evictAll
in interface javax.jdo.PersistenceManager
os
- Collection of objects to evictpublic void evictAll()
evictAll
in interface javax.jdo.PersistenceManager
public void refreshAll(java.lang.Object[] os)
refreshAll
in interface javax.jdo.PersistenceManager
os
- Array of objects to refreshpublic void refreshAll(java.util.Collection os)
refreshAll
in interface javax.jdo.PersistenceManager
os
- Collection of objects to refreshpublic void refreshAll(javax.jdo.JDOException exc)
refreshAll
in interface javax.jdo.PersistenceManager
exc
- Exception containing objects that failed verificationpublic void refreshAll()
refreshAll
in interface javax.jdo.PersistenceManager
public javax.jdo.Query newQuery()
newQuery
in interface javax.jdo.PersistenceManager
public javax.jdo.Query newQuery(java.lang.Object obj)
newQuery
in interface javax.jdo.PersistenceManager
obj
- object
public javax.jdo.Query newQuery(java.lang.String query)
newQuery
in interface javax.jdo.PersistenceManager
query
- The single-string query
public javax.jdo.Query newQuery(java.lang.String language, java.lang.Object query)
newQuery
in interface javax.jdo.PersistenceManager
language
- The query languagequery
- The query definition
public javax.jdo.Query newQuery(java.lang.Class cls)
newQuery
in interface javax.jdo.PersistenceManager
cls
- The candidate class to use.
public javax.jdo.Query newQuery(javax.jdo.Extent ext)
newQuery
in interface javax.jdo.PersistenceManager
ext
- The extent to use
public javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln)
newQuery
in interface javax.jdo.PersistenceManager
cls
- The candidate class.cln
- The collection to use.
public javax.jdo.Query newQuery(java.lang.Class cls, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
cls
- The candidate classfilter
- The filter to use
public javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
cls
- The candidate classcln
- The collectionfilter
- The filter to use
public javax.jdo.Query newQuery(javax.jdo.Extent cln, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
cln
- The collectionfilter
- The filter to use
public javax.jdo.Query newNamedQuery(java.lang.Class cls, java.lang.String queryName)
newNamedQuery
in interface javax.jdo.PersistenceManager
cls
- The candidate classqueryName
- The name of the query
public javax.jdo.Extent getExtent(java.lang.Class cls, boolean subclasses)
getExtent
in interface javax.jdo.PersistenceManager
cls
- The candidate classsubclasses
- Whether to include subclasses
public javax.jdo.Extent getExtent(java.lang.Class cls)
getExtent
in interface javax.jdo.PersistenceManager
cls
- The candidate class
public javax.jdo.FetchPlan getFetchPlan()
getFetchPlan
in interface javax.jdo.PersistenceManager
public java.lang.Object getObjectById(java.lang.Object id)
getObjectById
in interface javax.jdo.PersistenceManager
id
- Id of the object.
public java.lang.Object getObjectById(java.lang.Object id, boolean validate)
getObjectById
in interface javax.jdo.PersistenceManager
id
- Id of the object.validate
- Whether to validate the object before returning it
public java.util.Collection getObjectsById(java.util.Collection oids)
getObjectsById
in interface javax.jdo.PersistenceManager
public java.lang.Object[] getObjectsById(java.lang.Object[] oids)
getObjectsById
in interface javax.jdo.PersistenceManager
public java.util.Collection getObjectsById(java.util.Collection oids, boolean validate)
getObjectsById
in interface javax.jdo.PersistenceManager
public java.lang.Object[] getObjectsById(java.lang.Object[] oids, boolean validate)
getObjectsById
in interface javax.jdo.PersistenceManager
public java.lang.Object getObjectById(java.lang.Class cls, java.lang.Object key)
getObjectById
in interface javax.jdo.PersistenceManager
public java.lang.Object newObjectIdInstance(java.lang.Class pcClass, java.lang.Object key)
newObjectIdInstance
in interface javax.jdo.PersistenceManager
public java.lang.Object getObjectById(java.lang.Object id, boolean validate, boolean checkInheritance)
getObjectById
in interface PersistenceManager
id
- Id of the object.validate
- Whether to validate the object statecheckInheritance
- 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.
public java.lang.Object getObjectId(java.lang.Object pc)
getObjectId
in interface javax.jdo.PersistenceManager
pc
- The object
public java.lang.Object getTransactionalObjectId(java.lang.Object pc)
getTransactionalObjectId
in interface javax.jdo.PersistenceManager
pc
- public java.lang.Object newObjectIdInstance(java.lang.Class clazz, java.lang.String str)
clazz
- str
- public java.lang.Object newInstance(java.lang.Class persistenceCapable)
newInstance
in interface javax.jdo.PersistenceManager
persistenceCapable
- interface/abstract class declared in metadata
public java.lang.Object makePersistentInternal(java.lang.Object obj, FieldValues preInsertChanges)
makePersistentInternal
in interface PersistenceManager
obj
- The object to persistpreInsertChanges
- Changes to make before inserting
public java.lang.Object makePersistent(java.lang.Object pc)
makePersistent
in interface javax.jdo.PersistenceManager
pc
- The object to persistpublic java.lang.Object[] makePersistentAll(java.lang.Object[] pcs)
makePersistentAll
in interface javax.jdo.PersistenceManager
pcs
- Array of Persistent Capable objectspublic java.util.Collection makePersistentAll(java.util.Collection pcs)
makePersistentAll
in interface javax.jdo.PersistenceManager
pcs
- Collection of Persistence Capable objectspublic void deletePersistent(java.lang.Object pc)
deletePersistent
in interface javax.jdo.PersistenceManager
pc
- Persistence Capable objectpublic void deletePersistentAll(java.lang.Object[] pcs)
deletePersistentAll
in interface javax.jdo.PersistenceManager
pcs
- Array of Persistence Capable objectspublic void deletePersistentAll(java.util.Collection pcs)
deletePersistentAll
in interface javax.jdo.PersistenceManager
pcs
- Collection of Persistence Capable objectspublic void makeTransient(java.lang.Object pc, boolean useFetchPlan)
makeTransient
in interface javax.jdo.PersistenceManager
pc
- Persistence-Capable objectuseFetchPlan
- Whether to use the fetch planpublic void makeTransientAll(java.lang.Object[] pcs, boolean useFetchPlan)
makeTransientAll
in interface javax.jdo.PersistenceManager
pcs
- Array of Persistence-Capable objectsuseFetchPlan
- Whether to use the fetch planpublic void makeTransientAll(java.util.Collection pcs, boolean useFetchPlan)
makeTransientAll
in interface javax.jdo.PersistenceManager
pcs
- Collection of Persistence-Capable objectsuseFetchPlan
- Whether to use the fetch planpublic void makeTransient(java.lang.Object pc)
makeTransient
in interface javax.jdo.PersistenceManager
pc
- Persistence-Capable objectpublic void makeTransientAll(java.lang.Object[] pcs)
makeTransientAll
in interface javax.jdo.PersistenceManager
pcs
- Array of Persistence-Capable objectspublic void makeTransientAll(java.util.Collection pcs)
makeTransientAll
in interface javax.jdo.PersistenceManager
pcs
- Collection of Persistence-Capable objectspublic void makeTransientInternal(java.lang.Object obj, FetchPlanState state)
makeTransientInternal
in interface PersistenceManager
obj
- The object to persiststate
- Object containing the state of the fetchplan process
public void makeTransactional(java.lang.Object pc)
makeTransactional
in interface javax.jdo.PersistenceManager
pc
- Persistence-Capable objectpublic void makeTransactionalAll(java.lang.Object[] pcs)
makeTransactionalAll
in interface javax.jdo.PersistenceManager
pcs
- Array of Persistence-Capable objectspublic void makeTransactionalAll(java.util.Collection pcs)
makeTransactionalAll
in interface javax.jdo.PersistenceManager
pcs
- Collection of Persistence-Capable objectspublic void makeNontransactional(java.lang.Object pc)
makeNontransactional
in interface javax.jdo.PersistenceManager
pc
- Persistence-Capable objectpublic void makeNontransactionalAll(java.lang.Object[] pcs)
makeNontransactionalAll
in interface javax.jdo.PersistenceManager
pcs
- Array of Persistence-Capable objectspublic void makeNontransactionalAll(java.util.Collection pcs)
makeNontransactionalAll
in interface javax.jdo.PersistenceManager
pcs
- Collection of Persistence-Capable objectspublic void detachInternal(java.lang.Object pc, FetchPlanState state)
PersistenceManager
.
detachInternal
in interface PersistenceManager
pc
- the instance to detachstate
- State for the detachment processpublic java.lang.Object detachCopy(java.lang.Object pc)
PersistenceManager
.
detachCopy
in interface javax.jdo.PersistenceManager
pc
- the instance to detach
detachCopyAll(Object[])
public java.lang.Object detachCopyInternal(java.lang.Object pc, FetchPlanState state)
detachCopyInternal
in interface PersistenceManager
pc
- The Objectstate
- Detach state to use
public java.lang.Object[] detachCopyAll(java.lang.Object[] pcs)
PersistenceManager
. The objects returned can be
manipulated and re-attached with
makePersistentAll(Object[])
.
The detached instances will be
unmanaged copies of the specified parameters, and are suitable
for serialization and manipulation outside of a JDO
environment. When detaching instances, only fields in the
current FetchPlan
will be traversed. Thus, to detach a
graph of objects, relations to other persistent instances must
either be in the default-fetch-group
, or in the
current custom FetchPlan
.
detachCopyAll
in interface javax.jdo.PersistenceManager
pcs
- the instances to detach
javax.jdo.JDOUserException
- if any of the instances do notmakePersistentAll(Object[])
,
getFetchPlan()
public java.util.Collection detachCopyAll(java.util.Collection pcs)
PersistenceManager
.
detachCopyAll
in interface javax.jdo.PersistenceManager
pcs
- the instances to detach
detachCopyAll(Object[])
public java.lang.Object attachCopy(java.lang.Object pc, boolean embedded)
attachCopy
in interface PersistenceManager
pc
- The objectembedded
- Whether the object is embedded
public java.lang.Object putUserObject(java.lang.Object key, java.lang.Object value)
putUserObject
in interface javax.jdo.PersistenceManager
key
- The key to store the user object undervalue
- The object to store
public java.lang.Object getUserObject(java.lang.Object key)
getUserObject
in interface javax.jdo.PersistenceManager
key
- The key to store the user object under
public java.lang.Object removeUserObject(java.lang.Object key)
removeUserObject
in interface javax.jdo.PersistenceManager
key
- The key whose uder object is to be removed.
public void setUserObject(java.lang.Object obj)
setUserObject
in interface javax.jdo.PersistenceManager
obj
- User Objectpublic java.lang.Object getUserObject()
getUserObject
in interface javax.jdo.PersistenceManager
public javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
getPersistenceManagerFactory
in interface javax.jdo.PersistenceManager
public java.lang.Class getObjectIdClass(java.lang.Class clazz)
getObjectIdClass
in interface javax.jdo.PersistenceManager
clazz
- The class to retrieve
public void setMultithreaded(boolean multithreaded)
setMultithreaded
in interface javax.jdo.PersistenceManager
multithreaded
- Whether to run multithreaded or notpublic boolean getMultithreaded()
getMultithreaded
in interface javax.jdo.PersistenceManager
public void setIgnoreCache(boolean ignore)
setIgnoreCache
in interface javax.jdo.PersistenceManager
ignore
- Whether to ignore the cache or notpublic boolean getIgnoreCache()
getIgnoreCache
in interface javax.jdo.PersistenceManager
public StoreManager getStoreManager()
getStoreManager
in interface PersistenceManager
public MetaDataManager getMetaDataManager()
getMetaDataManager
in interface PersistenceManager
public java.sql.Connection getConnection(boolean forWriting, boolean forQuery) throws java.sql.SQLException
getConnection
in interface PersistenceManager
forWriting
- Whether it is for writing toforQuery
- Whether the connection is to be used by a query (i.e.JDOQUERY).
java.sql.SQLException
- Thrown when an error occurs in obtaining it.public java.sql.Connection getConnection(boolean forWriting, boolean forQuery, boolean useOpenedConnection) throws java.sql.SQLException
getConnection
in interface PersistenceManager
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.
java.sql.SQLException
public boolean isConnectionOpen()
isConnectionOpen
in interface PersistenceManager
public void releaseConnection(java.sql.Connection conn) throws java.sql.SQLException
releaseConnection
in interface PersistenceManager
conn
- The Connection to release.
java.sql.SQLException
- Thrown when an error occurspublic void enlistInTransaction(StateManager sm)
PersistenceManager
enlistInTransaction
in interface PersistenceManager
sm
- The StateManagerpublic void evictFromTransaction(StateManager sm)
PersistenceManager
evictFromTransaction
in interface PersistenceManager
sm
- The StateManagerpublic void removeStateManager(StateManager sm)
PersistenceManager
removeStateManager
in interface PersistenceManager
sm
- The StateManagerpublic java.lang.Object getObjectById(java.lang.Object id, FieldValues fv)
PersistenceManager
getObjectById
in interface PersistenceManager
id
- Id of the object.fv
- the FieldValues
public StateManager findStateManager(javax.jdo.spi.PersistenceCapable pc)
PersistenceManager
findStateManager
in interface PersistenceManager
pc
- The PersistenceCapable object
public void hereIsStateManager(StateManager sm, javax.jdo.spi.PersistenceCapable pc)
PersistenceManager
hereIsStateManager
in interface PersistenceManager
sm
- The StateManagerpc
- The object managed by the StateManagerpublic void markDirty(StateManager sm)
PersistenceManager
markDirty
in interface PersistenceManager
sm
- The StateManagerpublic void flush()
flush
in interface javax.jdo.PersistenceManager
public void checkConsistency()
checkConsistency
in interface javax.jdo.PersistenceManager
public boolean isInserting(javax.jdo.spi.PersistenceCapable pc)
isInserting
in interface PersistenceManager
pc
- the object to verify the status
public void clearDirty(StateManager sm)
PersistenceManager
clearDirty
in interface PersistenceManager
sm
- The StateManagerpublic ClassLoaderResolver getClassLoaderResolver()
getClassLoaderResolver
in interface PersistenceManager
public PersistenceManager getPMHandle()
getPMHandle
in interface PersistenceManager
public void addStateManager(StateManager sm)
PersistenceManager
addStateManager
in interface PersistenceManager
sm
- The StateManagerpublic StateManager getStateManagerById(java.lang.Object myID)
PersistenceManager
getStateManagerById
in interface PersistenceManager
myID
- Id of the object.
public PMFContext getPMFContext()
getPMFContext
in interface PersistenceManager
public javax.jdo.datastore.JDOConnection getDataStoreConnection()
getDataStoreConnection
in interface javax.jdo.PersistenceManager
PersistenceManager.getDataStoreConnection()
public javax.jdo.datastore.Sequence getSequence(java.lang.String sequenceName)
getSequence
in interface javax.jdo.PersistenceManager
sequenceName
- Name of the sequence
public void notifyLifecycleListenersForEvent(java.lang.Object obj, int lifecycleEventType, java.lang.Object otherObj)
notifyLifecycleListenersForEvent
in interface PersistenceManager
obj
- The object that had the operation performed on itlifecycleEventType
- The lifecycle eventotherObj
- Other object involved in the event (if any)public void removeAllInstanceLifecycleListeners()
AbstractPersistenceManager.removeAllInstanceLifecycleListeners()
public void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener, java.lang.Class[] classes)
addInstanceLifecycleListener
in interface javax.jdo.PersistenceManager
listener
- The instance lifecycle listener to sends events toclasses
- The classes that it is interested inpublic void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener)
removeInstanceLifecycleListener
in interface javax.jdo.PersistenceManager
listener
- The instance lifecycle listener to remove.public void addQueryResult(QueryResult queryResult)
PersistenceManager
addQueryResult
in interface PersistenceManager
queryResult
- The result to addpublic void removeQueryResult(QueryResult queryResult)
PersistenceManager
removeQueryResult
in interface PersistenceManager
queryResult
- The result to removepublic void addQueryRun(java.lang.String singleStringQuery)
PersistenceManager
addQueryRun
in interface PersistenceManager
singleStringQuery
- public boolean hasQueryRun(java.lang.String singleStringQuery)
PersistenceManager
hasQueryRun
in interface PersistenceManager
singleStringQuery
-
public void removeQueryRun(java.lang.String singleStringQuery)
PersistenceManager
removeQueryRun
in interface PersistenceManager
singleStringQuery
- public void replaceObjectId(javax.jdo.spi.PersistenceCapable pc, java.lang.Object oldID, java.lang.Object newID)
replaceObjectId
in interface PersistenceManager
pc
- The Persistence Capable objectoldID
- the old idnewID
- the new idpublic void putObjectIntoCache(StateManager sm, boolean level1, boolean level2)
putObjectIntoCache
in interface PersistenceManager
sm
- The state managerlevel1
- Whether to put into L1 cachelevel2
- Whether to put into L2 cachepublic void removeObjectFromCache(javax.jdo.spi.PersistenceCapable pc, java.lang.Object id, boolean level1, boolean level2)
removeObjectFromCache
in interface PersistenceManager
pc
- The objectid
- The id of the objectlevel1
- Whether to remove from the L1 cachelevel2
- Whether to remove from the L2 cachepublic void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
listener
- public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
listener
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |