|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.triactive.jdo.PersistenceManagerImpl
Implements the PersistenceManager interface.
Constructor Summary | |
PersistenceManagerImpl(PersistenceManagerFactoryImpl pmf,
java.lang.String userName,
java.lang.String password)
|
Method Summary | |
void |
close()
|
javax.jdo.Transaction |
currentTransaction()
|
int |
dataStoreModifyCount()
Returns the number of data store modifications made under this persistence manager. |
void |
deletePersistent(java.lang.Object obj)
|
void |
deletePersistentAll(java.util.Collection pcs)
|
void |
deletePersistentAll(java.lang.Object[] pcs)
|
void |
dump(java.lang.Object obj,
java.io.PrintWriter out)
Prints debugging info on an object to the specified output. |
void |
enlistInTransaction(StateManager sm)
Called by state managers to enlist in the transaction cache. |
void |
evict(java.lang.Object pc)
|
void |
evictAll()
|
void |
evictAll(java.util.Collection pcs)
|
void |
evictAll(java.lang.Object[] pcs)
|
void |
evictFromTransaction(StateManager sm)
Called by state managers to evict themselves from the transaction cache. |
void |
finalize()
|
StateManager |
findStateManager(java.lang.Object obj)
Returns the StateManager for a given object. |
java.util.List |
findStateManagers(java.util.Collection objs)
Finds the StateManagers for a collection of objects. |
void |
flushDirty()
Causes any dirty state manager to be updated in storage. |
java.sql.Connection |
getConnection(boolean forWriting)
Obtains a JDBC connection to the data store. |
javax.jdo.Extent |
getExtent(java.lang.Class cls,
boolean flag)
|
boolean |
getIgnoreCache()
|
boolean |
getMultithreaded()
|
java.lang.Object |
getObjectById(java.lang.Object id,
boolean validate)
|
java.lang.Object |
getObjectById(java.lang.Object id,
java.lang.Class contextClass,
boolean validate)
Locates a persistent instance in the cache of instances managed by this PersistenceManager. |
java.lang.Object |
getObjectById(java.lang.Object id,
java.lang.Class contextClass,
int[] fieldNumbers,
FieldManager fm)
Locates a persistent instance in the cache of instances managed by this PersistenceManager. |
java.lang.Object |
getObjectId(java.lang.Object pc)
|
java.lang.Class |
getObjectIdClass(java.lang.Class cls)
|
javax.jdo.PersistenceManagerFactory |
getPersistenceManagerFactory()
|
StoreManager |
getStoreManager()
Returns the store manager used for storage by this persistence manager. |
java.lang.Object |
getTransactionalObjectId(java.lang.Object pc)
|
java.lang.Object |
getUserObject()
|
void |
hereIsStateManager(StateManager sm,
java.lang.Object pc)
Called by state managers when their getPersistenceManager() method is called. |
boolean |
isClosed()
|
void |
makeNontransactional(java.lang.Object pc)
|
void |
makeNontransactionalAll(java.util.Collection pcs)
|
void |
makeNontransactionalAll(java.lang.Object[] pcs)
|
void |
makePersistent(java.lang.Object obj)
|
void |
makePersistentAll(java.util.Collection pcs)
|
void |
makePersistentAll(java.lang.Object[] pcs)
|
void |
makeTransactional(java.lang.Object pc)
|
void |
makeTransactionalAll(java.util.Collection pcs)
|
void |
makeTransactionalAll(java.lang.Object[] pcs)
|
void |
makeTransient(java.lang.Object pc)
|
void |
makeTransientAll(java.util.Collection pcs)
|
void |
makeTransientAll(java.lang.Object[] pcs)
|
void |
markDirty(StateManager sm)
Marks the specified state manager as dirty. |
java.lang.Object |
newObjectIdInstance(java.lang.Class clazz,
java.lang.String str)
|
javax.jdo.Query |
newQuery()
|
javax.jdo.Query |
newQuery(java.lang.Class cls)
|
javax.jdo.Query |
newQuery(java.lang.Class cls,
java.util.Collection cln)
|
javax.jdo.Query |
newQuery(java.lang.Class cls,
java.util.Collection cln,
java.lang.String filter)
|
javax.jdo.Query |
newQuery(java.lang.Class cls,
java.lang.String filter)
|
javax.jdo.Query |
newQuery(javax.jdo.Extent cln)
|
javax.jdo.Query |
newQuery(javax.jdo.Extent cln,
java.lang.String filter)
|
javax.jdo.Query |
newQuery(java.lang.Object obj)
|
javax.jdo.Query |
newQuery(java.lang.String language,
java.lang.Object query)
|
void |
refresh(java.lang.Object pc)
|
void |
refreshAll()
|
void |
refreshAll(java.util.Collection pcs)
|
void |
refreshAll(java.lang.Object[] pcs)
|
void |
releaseConnection(java.sql.Connection conn)
Release a previously-obtained data store connection. |
void |
removeStateManager(StateManager sm)
Called by state managers when disconnecting from the managed object. |
void |
retrieve(java.lang.Object pc)
|
void |
retrieveAll(java.util.Collection pcs)
|
void |
retrieveAll(java.util.Collection pcs,
boolean DFGOnly)
|
void |
retrieveAll(java.lang.Object[] pcs)
|
void |
retrieveAll(java.lang.Object[] pcs,
boolean DFGOnly)
|
void |
setIgnoreCache(boolean flag)
|
void |
setMultithreaded(boolean flag)
|
void |
setUserObject(java.lang.Object userObject)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PersistenceManagerImpl(PersistenceManagerFactoryImpl pmf, java.lang.String userName, java.lang.String password)
Method Detail |
public StoreManager getStoreManager()
PersistenceManager
getStoreManager
in interface PersistenceManager
public java.sql.Connection getConnection(boolean forWriting) throws java.sql.SQLException
PersistenceManager
getConnection
in interface PersistenceManager
forWriting
- true
if the connection will be used for updates.
java.sql.SQLException
public void releaseConnection(java.sql.Connection conn) throws java.sql.SQLException
PersistenceManager
PersistenceManager.getConnection(boolean)
(use try/finally).
releaseConnection
in interface PersistenceManager
java.sql.SQLException
public int dataStoreModifyCount()
PersistenceManager
dataStoreModifyCount
in interface PersistenceManager
public void enlistInTransaction(StateManager sm)
PersistenceManager
enlistInTransaction
in interface PersistenceManager
public void evictFromTransaction(StateManager sm)
PersistenceManager
evictFromTransaction
in interface PersistenceManager
public void removeStateManager(StateManager sm)
PersistenceManager
removeStateManager
in interface PersistenceManager
public boolean isClosed()
isClosed
in interface javax.jdo.PersistenceManager
public void close()
close
in interface javax.jdo.PersistenceManager
public void finalize()
public javax.jdo.Transaction currentTransaction()
currentTransaction
in interface javax.jdo.PersistenceManager
public void evict(java.lang.Object pc)
evict
in interface javax.jdo.PersistenceManager
public void evictAll(java.lang.Object[] pcs)
evictAll
in interface javax.jdo.PersistenceManager
public void evictAll(java.util.Collection pcs)
evictAll
in interface javax.jdo.PersistenceManager
public void evictAll()
evictAll
in interface javax.jdo.PersistenceManager
public void refresh(java.lang.Object pc)
refresh
in interface javax.jdo.PersistenceManager
public void refreshAll(java.lang.Object[] pcs)
refreshAll
in interface javax.jdo.PersistenceManager
public void refreshAll(java.util.Collection pcs)
refreshAll
in interface javax.jdo.PersistenceManager
public void refreshAll()
refreshAll
in interface javax.jdo.PersistenceManager
public void retrieve(java.lang.Object pc)
retrieve
in interface javax.jdo.PersistenceManager
public void retrieveAll(java.lang.Object[] pcs)
retrieveAll
in interface javax.jdo.PersistenceManager
public void retrieveAll(java.lang.Object[] pcs, boolean DFGOnly)
retrieveAll
in interface javax.jdo.PersistenceManager
public void retrieveAll(java.util.Collection pcs)
retrieveAll
in interface javax.jdo.PersistenceManager
public void retrieveAll(java.util.Collection pcs, boolean DFGOnly)
retrieveAll
in interface javax.jdo.PersistenceManager
public void makePersistent(java.lang.Object obj)
makePersistent
in interface javax.jdo.PersistenceManager
public void makePersistentAll(java.lang.Object[] pcs)
makePersistentAll
in interface javax.jdo.PersistenceManager
public void makePersistentAll(java.util.Collection pcs)
makePersistentAll
in interface javax.jdo.PersistenceManager
public void deletePersistent(java.lang.Object obj)
deletePersistent
in interface javax.jdo.PersistenceManager
public void deletePersistentAll(java.lang.Object[] pcs)
deletePersistentAll
in interface javax.jdo.PersistenceManager
public void deletePersistentAll(java.util.Collection pcs)
deletePersistentAll
in interface javax.jdo.PersistenceManager
public void makeTransient(java.lang.Object pc)
makeTransient
in interface javax.jdo.PersistenceManager
public void makeTransientAll(java.lang.Object[] pcs)
makeTransientAll
in interface javax.jdo.PersistenceManager
public void makeTransientAll(java.util.Collection pcs)
makeTransientAll
in interface javax.jdo.PersistenceManager
public void makeTransactional(java.lang.Object pc)
makeTransactional
in interface javax.jdo.PersistenceManager
public void makeTransactionalAll(java.lang.Object[] pcs)
makeTransactionalAll
in interface javax.jdo.PersistenceManager
public void makeTransactionalAll(java.util.Collection pcs)
makeTransactionalAll
in interface javax.jdo.PersistenceManager
public void makeNontransactional(java.lang.Object pc)
makeNontransactional
in interface javax.jdo.PersistenceManager
public void makeNontransactionalAll(java.lang.Object[] pcs)
makeNontransactionalAll
in interface javax.jdo.PersistenceManager
public void makeNontransactionalAll(java.util.Collection pcs)
makeNontransactionalAll
in interface javax.jdo.PersistenceManager
public java.lang.Object newObjectIdInstance(java.lang.Class clazz, java.lang.String str)
newObjectIdInstance
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
public javax.jdo.Query newQuery(java.lang.String language, java.lang.Object query)
newQuery
in interface javax.jdo.PersistenceManager
public javax.jdo.Query newQuery(java.lang.Class cls)
newQuery
in interface javax.jdo.PersistenceManager
public javax.jdo.Query newQuery(javax.jdo.Extent cln)
newQuery
in interface javax.jdo.PersistenceManager
public javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln)
newQuery
in interface javax.jdo.PersistenceManager
public javax.jdo.Query newQuery(java.lang.Class cls, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
public javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
public javax.jdo.Query newQuery(javax.jdo.Extent cln, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
public javax.jdo.Extent getExtent(java.lang.Class cls, boolean flag)
getExtent
in interface javax.jdo.PersistenceManager
public java.lang.Object getObjectById(java.lang.Object id, boolean validate)
getObjectById
in interface javax.jdo.PersistenceManager
public java.lang.Object getObjectById(java.lang.Object id, java.lang.Class contextClass, boolean validate)
PersistenceManager
getObjectById
in interface PersistenceManager
id
- An object ID.contextClass
- A class to use as a class-loading context, if necessary, or
null
to use just the default class loader(s).validate
- true
if the existence of the instance is to be
validated.
public java.lang.Object getObjectById(java.lang.Object id, java.lang.Class contextClass, int[] fieldNumbers, FieldManager fm)
PersistenceManager
PersistenceManager.getObjectById(Object,Class,boolean)
that
allows specific initial field values to be offered to the state manager.
Classes in the store package use this method to proactively offer field
values in cases where they are readily available.
If the instance is in a state that can benefit from newly available field
values, the fields are replaced in the instance and a state change occurs
as though the instance itself had read a field.
getObjectById
in interface PersistenceManager
id
- An object ID.contextClass
- A class to use as a class-loading context, if necessary, or
null
to use just the default class loader(s).fieldNumbers
- The field numbers being offered.fm
- A field manager from which to get the offered fields.
public java.lang.Object getObjectId(java.lang.Object pc)
getObjectId
in interface javax.jdo.PersistenceManager
public java.lang.Object getTransactionalObjectId(java.lang.Object pc)
getTransactionalObjectId
in interface javax.jdo.PersistenceManager
public void setUserObject(java.lang.Object userObject)
setUserObject
in interface javax.jdo.PersistenceManager
public 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 cls)
getObjectIdClass
in interface javax.jdo.PersistenceManager
public void setMultithreaded(boolean flag)
setMultithreaded
in interface javax.jdo.PersistenceManager
public boolean getMultithreaded()
getMultithreaded
in interface javax.jdo.PersistenceManager
public void setIgnoreCache(boolean flag)
setIgnoreCache
in interface javax.jdo.PersistenceManager
public boolean getIgnoreCache()
getIgnoreCache
in interface javax.jdo.PersistenceManager
public StateManager findStateManager(java.lang.Object obj)
findStateManager
in interface PersistenceManager
null
if obj is null or
has no state manager.
javax.jdo.JDOUserException
- If obj is not PersistenceCapable or is managed by a
different PersistenceManager.public java.util.List findStateManagers(java.util.Collection objs)
findStateManagers
in interface PersistenceManager
null
if the corresponding
object reference is null or the object has no state manager.
javax.jdo.JDOUserException
- If any object in objs is not PersistenceCapable or is
managed by a different PersistenceManager.public void hereIsStateManager(StateManager sm, java.lang.Object pc)
PersistenceManager
PersistenceManager.findStateManager(java.lang.Object)
to quickly locate an object's
state manager.
hereIsStateManager
in interface PersistenceManager
public void markDirty(StateManager sm)
PersistenceManager
In this case, "dirty" means having one or more fields modified that have not been updated in storage via the StoreManager. The persistence manager allows at most one state manager at a time to be considered dirty. The sole purpose of this delayed update is to coalesce multiple field changes on the same object into one SQL UPDATE.
markDirty
in interface PersistenceManager
public void flushDirty()
PersistenceManager
flushDirty
in interface PersistenceManager
public void dump(java.lang.Object obj, java.io.PrintWriter out)
PersistenceManager
dump
in interface PersistenceManager
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |