|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.pm.lib.SpeedoProxyManager
Field Summary | |
static java.lang.String |
COMPONENT_BINDING
|
static java.lang.String |
JORM_FACTORY_BINDING
|
static java.lang.String |
LOGGER_NAME
|
static java.lang.String |
PNAME_CODER_BINDING
|
static java.lang.String |
PROXY_MANAGER_FACTORY_BINDING
|
static java.lang.String |
QUERY_MANAGER_BINDING
|
static java.lang.String |
TRANSACTION_BINDING
|
static java.lang.String |
TRANSACTIONAL_PERSISTENCE_MANAGER_BINDING
|
Constructor Summary | |
SpeedoProxyManager()
|
Method Summary | |
void |
addUse()
Signal to the persistence maneger that it is used |
void |
afterCompletion(int i)
|
void |
beforeCompletion()
|
void |
bindFc(java.lang.String s,
java.lang.Object o)
|
void |
close()
This method closes the PersistenceManager. |
Query |
createQuery(java.lang.Object o)
|
javax.jdo.Transaction |
currentTransaction()
Return the Transaction instance associated with a PersistenceManager. |
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. |
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. |
java.lang.Object |
getConnectionSpec()
|
Extent |
getExtent(java.lang.Class persistenceCapableClass,
boolean subclasses)
Not implemented. |
boolean |
getIgnoreCache()
Get the ignoreCache setting for queries. |
boolean |
getMultithreaded()
Get the current Multithreaded flag for this PersistenceManager. |
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 |
PersistenceManagerFactory |
getPersistenceManagerFactory()
|
Semaphore |
getSemaphore()
|
java.lang.Object |
getTransactionalObjectId(java.lang.Object o)
Not implemented. |
TransactionalPersistenceManager |
getTransactionalPersistenceManager()
|
java.lang.Object |
getUserObject()
The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance. |
boolean |
isClosed()
A PersistenceManager instance can be used until it is closed. |
java.lang.String[] |
listFc()
|
java.lang.Object |
lookupFc(java.lang.String s)
|
void |
makeNontransactional(java.lang.Object o)
|
void |
makeNontransactionalAll(java.util.Collection pcs)
|
void |
makeNontransactionalAll(java.lang.Object[] pcs)
|
void |
makePersistent(java.lang.Object o)
Make the transient instance persistent in this PersistenceManager. |
void |
makePersistentAll(java.util.Collection pcs)
Make a Set of instances persistent. |
void |
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 |
makeTransientAll(java.util.Collection pcs)
Make a Set of instances transient, removing them from management by this PersistenceManager. |
void |
makeTransientAll(java.lang.Object[] pcs)
Make an array of instances transient, removing them from management by this PersistenceManager. |
java.lang.Object |
newObjectIdInstance(java.lang.Class aClass,
java.lang.String 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(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 language,
java.lang.Object query)
Create a new Query using the specified language. |
void |
open(java.lang.Object connectionspec)
Opens the persistent manager. |
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(java.lang.Object[] pcs)
Refresh the state of an array of instances from the data store. |
void |
retrieve(java.lang.Object o)
|
void |
retrieveAll(java.util.Collection pcs)
|
void |
retrieveAll(java.lang.Object[] pcs)
|
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)
|
void |
speedoDeletePersistent(java.lang.Object o)
Delete persistent a SpeedoProxy. |
java.lang.Object |
speedoGetObjectById(java.lang.Object oid,
boolean validate)
|
void |
speedoMakePersistent(SpeedoProxy sp)
Make persistent a SpeedoProxy. |
void |
unbindFc(java.lang.String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROXY_MANAGER_FACTORY_BINDING
public static final java.lang.String TRANSACTIONAL_PERSISTENCE_MANAGER_BINDING
public static final java.lang.String QUERY_MANAGER_BINDING
public static final java.lang.String TRANSACTION_BINDING
public static final java.lang.String JORM_FACTORY_BINDING
public static final java.lang.String PNAME_CODER_BINDING
public static final java.lang.String COMPONENT_BINDING
public static final java.lang.String LOGGER_NAME
Constructor Detail |
public SpeedoProxyManager()
Method Detail |
public Query createQuery(java.lang.Object o)
public java.lang.String[] listFc()
public java.lang.Object lookupFc(java.lang.String s)
public void bindFc(java.lang.String s, java.lang.Object o)
public void unbindFc(java.lang.String s)
public java.lang.Class getObjectIdClass(java.lang.Class cls)
public boolean isClosed()
close()
public void close()
javax.jdo.JDOUserException
- if the transaction associated to
the persistence manager is active.
javax.jdo.JDOFatalDataStoreException
- if there is a problem while
releasing the persistence manager.public javax.jdo.Transaction currentTransaction()
public void evict(java.lang.Object o)
o
- the instance to evict from the cache.public void evictAll(java.lang.Object[] pcs)
pcs
- the array of instances to evict from the cache.
javax.jdo.JDOUserException
- if some instances cannot be removed.evict(java.lang.Object pc)
public void evictAll(java.util.Collection pcs)
pcs
- the Set of instance to evict from the cache.evict(java.lang.Object pc)
public void evictAll()
evict(java.lang.Object pc)
public void refresh(java.lang.Object o)
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.
o
- the instance to refresh.public void refreshAll(java.lang.Object[] pcs)
pcs
- the array of instances to refresh.
object.refresh(java.lang.Object pc)
public void refreshAll(java.util.Collection pcs)
pcs
- the Set of instances to refresh.refresh(java.lang.Object pc)
public void refreshAll()
If called with an active transaction, all transactional instances will be refreshed. If called outside an active transaction, all nontransactional instances will be refreshed.
refresh(java.lang.Object pc)
public Query newQuery()
public Query newQuery(java.lang.Object compiled)
All of the settings of the other Query are copied to this Query, except for the candidate Set or Extent.
compiled
- another Query from the same JDO implementation
public Query newQuery(java.lang.String language, java.lang.Object query)
language
- the language of the query parameterquery
- the query, which is of a form determined by the language
public Query newQuery(java.lang.Class cls)
cls
- the Class of the candidate instances
public Query newQuery(Extent extent, java.lang.String filter)
public Query newQuery(java.lang.Class cls, java.util.Collection cln)
cls
- the Class of resultscln
- the Set of candidate instances
public Query newQuery(java.lang.Class cls, java.util.Collection cln, java.lang.String filter)
cls
- the Class of candidate instancescln
- the Set of candidate instancesfilter
- the filter for candidate instances
public Extent getExtent(java.lang.Class persistenceCapableClass, boolean subclasses)
persistenceCapableClass
- Class of instancessubclasses
- whether to include instances of subclasses
public java.lang.Object getObjectById(java.lang.Object oid, boolean validate)
oid
- an ObjectIdvalidate
- if the existence of the instance is to be validated. The
flag is ignored in this implementation.
getObjectId(java.lang.Object pc)
,
getTransactionalObjectId(java.lang.Object pc)
public java.lang.Object speedoGetObjectById(java.lang.Object oid, boolean validate)
speedoGetObjectById
in interface ProxyManager
public java.lang.Object getObjectId(java.lang.Object pc)
pc
- the PersistenceCapable instance
getTransactionalObjectId(java.lang.Object pc)
,
getObjectById(java.lang.Object oid, boolean validate)
public java.lang.Object getTransactionalObjectId(java.lang.Object o)
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.
o
- a PersistenceCapable instance
getObjectId(java.lang.Object pc)
,
getObjectById(java.lang.Object oid, boolean validate)
public void makePersistent(java.lang.Object o)
o
- a transient instance of a Class that implements
PersistenceCapablepublic void speedoMakePersistent(SpeedoProxy sp)
ProxyManager
speedoMakePersistent
in interface ProxyManager
sp
- is the instance to make persistent.public void makePersistentAll(java.lang.Object[] pcs)
pcs
- an array of transient instances
javax.jdo.JDOUserException
- if an object cannot be made persistent.makePersistent(java.lang.Object pc)
public void makePersistentAll(java.util.Collection pcs)
pcs
- a Set of transient instancesmakePersistent(java.lang.Object pc)
public void deletePersistent(java.lang.Object o)
o
- a persistent instance
javax.jdo.JDOUserException
- if the instance is transient or managed by
another PersistenceManager.public void speedoDeletePersistent(java.lang.Object o)
ProxyManager
speedoDeletePersistent
in interface ProxyManager
o
- is the instance to make persistent.public void deletePersistentAll(java.lang.Object[] pcs)
pcs
- a Set of persistent instancesdeletePersistent(java.lang.Object pc)
public void deletePersistentAll(java.util.Collection pcs)
pcs
- a Set of persistent instancesdeletePersistent(java.lang.Object pc)
public void makeTransient(java.lang.Object o)
The instance loses its JDO identity and it is no longer associated with any PersistenceManager. The state of fields is preserved unchanged.
o
- the instance to make transient.
javax.jdo.JDOUserException
- if the instance is dirty.public void makeTransientAll(java.lang.Object[] pcs)
pcs
- the instances to make transient.makeTransient(java.lang.Object pc)
public void makeTransientAll(java.util.Collection pcs)
The instances lose their JDO identity and they are no longer associated with any PersistenceManager. The state of fields is preserved unchanged.
pcs
- the instances to make transient.public void makeTransactional(java.lang.Object o)
o
- the instance to make transactional.PersistenceManager
public void makeTransactionalAll(java.lang.Object[] pcs)
pcs
- the array of instances to make transactional.makeTransactional(java.lang.Object pc)
public void makeTransactionalAll(java.util.Collection pcs)
pcs
- the Set of instances to make transactional.makeTransactional(java.lang.Object pc)
public void makeNontransactional(java.lang.Object o)
public void makeNontransactionalAll(java.lang.Object[] pcs)
public void makeNontransactionalAll(java.util.Collection pcs)
public void setUserObject(java.lang.Object o)
public java.lang.Object getUserObject()
setUserObject(java.lang.Object)
public PersistenceManagerFactory getPersistenceManagerFactory()
public void setMultithreaded(boolean flag)
flag
- the Multithreaded setting.public boolean getMultithreaded()
setMultithreaded(boolean)
public void setIgnoreCache(boolean flag)
flag
- the ignoreCache setting.public boolean getIgnoreCache()
setIgnoreCache(boolean)
public java.lang.Object newObjectIdInstance(java.lang.Class aClass, java.lang.String s)
public void retrieve(java.lang.Object o)
public void retrieveAll(java.util.Collection pcs)
public void retrieveAll(java.lang.Object[] pcs)
public TransactionalPersistenceManager getTransactionalPersistenceManager()
getTransactionalPersistenceManager
in interface ProxyManager
public void open(java.lang.Object connectionspec)
ProxyManager
open
in interface ProxyManager
connectionspec
- is the information to access to the datastore
(user, passwor, ...)public java.lang.Object getConnectionSpec()
getConnectionSpec
in interface ProxyManager
public void addUse()
ProxyManager
addUse
in interface ProxyManager
public void beforeCompletion()
public void afterCompletion(int i)
public Semaphore getSemaphore()
getSemaphore
in interface ProxyManager
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |