|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extension of JDO PersistenceManager. Adds aspects particular to JPOX.
Method Summary | |
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 copy of the passed object (and related objects). |
void |
clearDirty(StateManager sm)
Mark the specified StateManager as clean. |
java.lang.Object |
detachCopyInternal(java.lang.Object pc,
FetchPlanState state)
Method to detach the passed object using the provided state. |
void |
detachInternal(java.lang.Object pc,
FetchPlanState state)
Method to detach the passed object. |
void |
dump(java.lang.Object obj,
java.io.PrintWriter out)
Diagnostic method to dump the state of the PC object to the passed PrintWriter. |
void |
enlistInTransaction(StateManager sm)
Method to enlist the specified StateManager in the current transaction. |
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. |
ClassLoaderResolver |
getClassLoaderResolver()
Accessor for the ClassLoader resolver to use in class loading issues. |
java.sql.Connection |
getConnection(boolean forWriting,
boolean forQuery)
Accessor for the connection to the datasource. |
java.sql.Connection |
getConnection(boolean forWriting,
boolean forQuery,
boolean useOpenedConnection)
Accessor for the connection to the datasource. |
MetaDataManager |
getMetaDataManager()
Accessor for the MetaData Manager. |
java.lang.Object |
getObjectByAID(java.lang.Class pcClass,
FieldValues fv,
boolean ignoreCache,
boolean checkInheritance)
Accessor for an object given the object 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 pcClass,
boolean ignoreCache)
Accessor for an object given the object id. |
PMFContext |
getPMFContext()
Accessor for the context in which this PersistenceManager is running. |
PersistenceManager |
getPMHandle()
Accessor for a handle to this PersistenceManager. |
StateManager |
getStateManagerById(java.lang.Object myID)
Accessor for the StateManager of an object given the object id. |
StoreManager |
getStoreManager()
Accessor for the Store Manager. |
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 |
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. |
java.lang.Object |
makePersistentInternal(java.lang.Object pc,
FieldValues preInsertChanges)
Method to persist the passed object. |
void |
makeTransientInternal(java.lang.Object pc,
FetchPlanState state)
Method to make transient the passed object. |
void |
markDirty(StateManager sm)
Mark the specified StateManager as dirty |
void |
notifyLifecycleListenersForEvent(java.lang.Object obj,
int lifecycleEventType,
java.lang.Object otherObj)
Method to notify the listeners of an event happening |
void |
putObjectIntoCache(StateManager sm,
boolean level1,
boolean level2)
Method to put a PersistenceCapable object associated to the StateManager into the respective cache(s). |
void |
releaseConnection(java.sql.Connection conn)
Method to release the connection |
void |
removeObjectFromCache(javax.jdo.spi.PersistenceCapable pc,
java.lang.Object id,
boolean level1,
boolean level2)
Method to remove an object from the respective cache(s). |
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. |
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 |
Methods inherited from interface javax.jdo.PersistenceManager |
addInstanceLifecycleListener, checkConsistency, close, currentTransaction, deletePersistent, deletePersistentAll, deletePersistentAll, detachCopy, detachCopyAll, detachCopyAll, evict, evictAll, evictAll, evictAll, flush, getDataStoreConnection, getDetachAllOnCommit, getExtent, getExtent, getFetchPlan, getIgnoreCache, getMultithreaded, getObjectById, getObjectById, getObjectById, getObjectId, getObjectIdClass, getObjectsById, getObjectsById, getObjectsById, getObjectsById, getPersistenceManagerFactory, getSequence, getTransactionalObjectId, getUserObject, getUserObject, isClosed, makeNontransactional, makeNontransactionalAll, makeNontransactionalAll, makePersistent, makePersistentAll, makePersistentAll, makeTransactional, makeTransactionalAll, makeTransactionalAll, makeTransient, makeTransient, makeTransientAll, makeTransientAll, makeTransientAll, makeTransientAll, newInstance, newNamedQuery, newObjectIdInstance, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, newQuery, putUserObject, refresh, refreshAll, refreshAll, refreshAll, refreshAll, removeInstanceLifecycleListener, removeUserObject, retrieve, retrieve, retrieveAll, retrieveAll, retrieveAll, retrieveAll, setDetachAllOnCommit, setIgnoreCache, setMultithreaded, setUserObject |
Method Detail |
public StoreManager getStoreManager()
public MetaDataManager getMetaDataManager()
public PMFContext getPMFContext()
public PersistenceManager getPMHandle()
public ClassLoaderResolver getClassLoaderResolver()
public java.sql.Connection getConnection(boolean forWriting, boolean forQuery) throws java.sql.SQLException
forWriting
- Whether the connection is read-only or read-write.forQuery
- Whether the connection is to be used by a query (i.e.JDOQUERY).
java.sql.SQLException
public java.sql.Connection getConnection(boolean forWriting, boolean forQuery, boolean useOpenedConnection) throws java.sql.SQLException
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()
public void releaseConnection(java.sql.Connection conn) throws java.sql.SQLException
conn
- The connection
java.sql.SQLException
- Thrown if an error occurs on releasepublic java.lang.Object getObjectById(java.lang.Object id, FieldValues fv)
id
- Id of the object.fv
- the FieldValues
public java.lang.Object getObjectById(java.lang.Object id, boolean validate, boolean checkInheritance)
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 getObjectById(java.lang.Object id, FieldValues fv, java.lang.Class pcClass, boolean ignoreCache)
id
- Id of the object.fv
- the FieldValuespcClass
- the type which the object is. This type will be used to instanciat the objectignoreCache
- true if the cache is ignored
public java.lang.Object getObjectByAID(java.lang.Class pcClass, FieldValues fv, boolean ignoreCache, boolean checkInheritance)
fv
- the FieldValues containing at minimum the primary key fieldspcClass
- the type which the object isignoreCache
- true if the cache is ignoredcheckInheritance
- true if the cache is ignored
public java.lang.Object makePersistentInternal(java.lang.Object pc, FieldValues preInsertChanges)
pc
- The objectpreInsertChanges
- Changes to be made before inserting
public void makeTransientInternal(java.lang.Object pc, FetchPlanState state)
pc
- The objectstate
- Object containing the state of the fetchplan processingpublic void detachInternal(java.lang.Object pc, FetchPlanState state)
pc
- The object to detachstate
- State for the detachment process.public java.lang.Object attachCopy(java.lang.Object pc, boolean embedded)
pc
- The objectembedded
- Whether it is embedded
public java.lang.Object detachCopyInternal(java.lang.Object pc, FetchPlanState state)
pc
- The objectstate
- State for the detachment process
public void enlistInTransaction(StateManager sm)
sm
- The StateManagerpublic void evictFromTransaction(StateManager sm)
sm
- The StateManagerpublic StateManager findStateManager(javax.jdo.spi.PersistenceCapable pc)
pc
- The PersistenceCapable object
public void hereIsStateManager(StateManager sm, javax.jdo.spi.PersistenceCapable pc)
sm
- The StateManagerpc
- The object managed by the StateManagerpublic void addStateManager(StateManager sm)
sm
- The StateManagerpublic void removeStateManager(StateManager sm)
sm
- The StateManagerpublic StateManager getStateManagerById(java.lang.Object myID)
myID
- Id of the object.
public void markDirty(StateManager sm)
sm
- The StateManagerpublic void clearDirty(StateManager sm)
sm
- The StateManagerpublic boolean isInserting(javax.jdo.spi.PersistenceCapable pc)
pc
- the object to verify the status
public boolean isDelayDatastoreOperationsEnabled()
public void notifyLifecycleListenersForEvent(java.lang.Object obj, int lifecycleEventType, java.lang.Object otherObj)
obj
- The object on which the event happenslifecycleEventType
- The event typeotherObj
- Other object involved in the event (if any)public void addQueryResult(QueryResult queryResult)
queryResult
- The result to addpublic void removeQueryResult(QueryResult queryResult)
queryResult
- The result to removepublic void addQueryRun(java.lang.String singleStringQuery)
singleStringQuery
- public void removeQueryRun(java.lang.String singleStringQuery)
singleStringQuery
- public boolean hasQueryRun(java.lang.String singleStringQuery)
singleStringQuery
-
public void replaceObjectId(javax.jdo.spi.PersistenceCapable pc, java.lang.Object oldID, java.lang.Object newID)
pc
- The Persistence Capable objectoldID
- the old idnewID
- the new idpublic void putObjectIntoCache(StateManager sm, boolean level1, boolean level2)
sm
- The State Managerlevel1
- Whether to put in the L1 cachelevel2
- Whether to put in the L2 cachepublic void removeObjectFromCache(javax.jdo.spi.PersistenceCapable pc, java.lang.Object id, boolean level1, boolean level2)
pc
- The objectid
- The id of the objectlevel1
- Whether to remove from the L1 cachelevel2
- Whether to remove from the L2 cachepublic void dump(java.lang.Object obj, java.io.PrintWriter out)
obj
- The PersistenceCapable objectout
- The PrintWriter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |