|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.objectweb.speedo.runtime.SpeedoPersistenceManager
Field Summary | |
static java.lang.String |
CACHE_BINDING
|
static java.lang.String |
COMPONENT_IDENTITY_BINDING
|
static java.lang.String |
CONTAINER_NAMING_MANGER_BINDING
|
static java.lang.String |
JORM_FACTORY_BINDING
|
static java.lang.String |
LOGGER_FACTORY_BINDING
|
static java.lang.String |
LOGGER_NAME
|
static java.lang.String |
MAPPER_BINDING
|
static java.lang.String |
PERSISTENCE_MANAGER_FACTORY_BINDING
|
static java.lang.String |
PM_POOL_BINDING
|
static java.lang.String |
PROXY_MANAGER_SWITCH_BINDING
|
static java.lang.String |
QUERIES_POOL_BINDING
|
static java.lang.String |
QUERY_MANAGER_BINDING
|
static java.lang.String |
REPLACEMENT_BINDING
|
static java.lang.String |
TRANSACTION_BINDING
|
static java.lang.String |
TRANSACTIONAL_PERSISTENCE_MANAGER_BINDING
|
static java.lang.String |
USER_NAMING_MANGER_BINDING
|
Constructor Summary | |
SpeedoPersistenceManager()
|
Method Summary | |
void |
addFcBinding(java.lang.String s,
java.lang.Object o)
|
void |
close()
This method closes the PersistenceManager. |
org.objectweb.jorm.naming.api.PName |
createFieldOfProxy(SpeedoProxy sp,
SpeedoProxy father,
java.lang.String name)
Sets the reference between two JDO instances |
org.objectweb.perseus.pool.api.PoolResource |
createResource(java.lang.Object hints)
|
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 |
destroy()
destroy is called when this resource is removed from a Pool. |
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()
|
javax.jdo.Extent |
getExtent(java.lang.Class persistenceCapableClass,
boolean subclasses)
Not implemented. |
java.lang.Object |
getFcBindings(java.lang.String s)
|
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)
|
javax.jdo.PersistenceManagerFactory |
getPersistenceManagerFactory()
|
java.lang.Object |
getTransactionalObjectId(java.lang.Object o)
Not implemented. |
org.objectweb.perseus.persistence.api.TransactionalPersistenceManager |
getTransactionalPersistenceManager()
Removes the proxy infrastructure of a JDO instance |
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. |
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. |
boolean |
matchResource(org.objectweb.perseus.pool.api.PoolResource pr,
java.lang.Object hints)
|
java.lang.Object |
newObjectIdInstance(java.lang.Class aClass,
java.lang.String s)
|
javax.jdo.Query |
newQuery()
Create a new Query with no elements. |
javax.jdo.Query |
newQuery(java.lang.Class cls)
Create a new Query specifying the Class of the candidate instances. |
javax.jdo.Query |
newQuery(java.lang.Class cls,
java.util.Collection cln)
Create a new Query with the Class of the candidate instances and candidate Set. |
javax.jdo.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. |
javax.jdo.Query |
newQuery(java.lang.Class cls,
java.lang.String filter)
Create a new Query with the Class of the candidate instances and filter. |
javax.jdo.Query |
newQuery(javax.jdo.Extent extent)
|
javax.jdo.Query |
newQuery(javax.jdo.Extent extent,
java.lang.String s)
|
javax.jdo.Query |
newQuery(java.lang.Object compiled)
Create a new Query using elements from another Query. |
javax.jdo.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 |
removeFcBinding(java.lang.String s,
java.lang.Object serverItf)
|
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)
|
Field Detail |
public static final java.lang.String PERSISTENCE_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 CACHE_BINDING
public static final java.lang.String REPLACEMENT_BINDING
public static final java.lang.String CONTAINER_NAMING_MANGER_BINDING
public static final java.lang.String USER_NAMING_MANGER_BINDING
public static final java.lang.String TRANSACTION_BINDING
public static final java.lang.String PROXY_MANAGER_SWITCH_BINDING
public static final java.lang.String MAPPER_BINDING
public static final java.lang.String QUERIES_POOL_BINDING
public static final java.lang.String PM_POOL_BINDING
public static final java.lang.String JORM_FACTORY_BINDING
public static final java.lang.String COMPONENT_IDENTITY_BINDING
public static final java.lang.String LOGGER_FACTORY_BINDING
public static final java.lang.String LOGGER_NAME
Constructor Detail |
public SpeedoPersistenceManager()
Method Detail |
public java.lang.Object getFcBindings(java.lang.String s)
public void addFcBinding(java.lang.String s, java.lang.Object o)
public void removeFcBinding(java.lang.String s, java.lang.Object serverItf)
public void destroy() throws java.lang.Exception
public org.objectweb.perseus.pool.api.PoolResource createResource(java.lang.Object hints) throws java.lang.Exception
public boolean matchResource(org.objectweb.perseus.pool.api.PoolResource pr, java.lang.Object hints)
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.JDOUserException
- if some instances cannot be removed.evict(Object pc)
public void evictAll(java.util.Collection pcs)
pcs
- the Set of instance to evict from the cache.evict(Object pc)
public void evictAll()
evict(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(Object pc)
public void refreshAll(java.util.Collection pcs)
pcs
- the Set of instances to refresh.refresh(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(Object pc)
public javax.jdo.Query newQuery()
public javax.jdo.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 implementationpublic javax.jdo.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 languagepublic javax.jdo.Query newQuery(java.lang.Class cls)
cls
- the Class of the candidate instancespublic javax.jdo.Query newQuery(javax.jdo.Extent extent)
public javax.jdo.Query newQuery(javax.jdo.Extent extent, java.lang.String s)
public javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln)
cls
- the Class of resultscln
- the Set of candidate instancespublic javax.jdo.Query newQuery(java.lang.Class cls, java.lang.String filter)
cls
- the Class of resultsfilter
- the filter for candidate instancespublic javax.jdo.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 instancespublic javax.jdo.Extent getExtent(java.lang.Class persistenceCapableClass, boolean subclasses)
persistenceCapableClass
- Class of instancessubclasses
- whether to include instances of subclassespublic 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(Object pc)
,
getTransactionalObjectId(Object pc)
public java.lang.Object getObjectId(java.lang.Object pc)
pc
- the PersistenceCapable instancegetTransactionalObjectId(Object pc)
,
getObjectById(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 instancegetObjectId(Object pc)
,
getObjectById(Object oid, boolean validate)
public void makePersistent(java.lang.Object o)
o
- a transient instance of a Class that implements
PersistenceCapablepublic void makePersistentAll(java.lang.Object[] pcs)
pcs
- an array of transient instancesJDOUserException
- if an object cannot be made persistent.makePersistent(Object pc)
public void makePersistentAll(java.util.Collection pcs)
pcs
- a Set of transient instancesmakePersistent(Object pc)
public void deletePersistent(java.lang.Object o)
o
- a persistent instanceJDOUserException
- if the instance is transient or managed by
another PersistenceManager.public void deletePersistentAll(java.lang.Object[] pcs)
pcs
- a Set of persistent instancesdeletePersistent(Object pc)
public void deletePersistentAll(java.util.Collection pcs)
pcs
- a Set of persistent instancesdeletePersistent(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.JDOUserException
- if the instance is dirty.public void makeTransientAll(java.lang.Object[] pcs)
pcs
- the instances to make transient.makeTransient(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.javax.jdo.PersistenceManager#makeTransactional
public void makeTransactionalAll(java.lang.Object[] pcs)
pcs
- the array of instances to make transactional.makeTransactional(Object pc)
public void makeTransactionalAll(java.util.Collection pcs)
pcs
- the Set of instances to make transactional.makeTransactional(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 javax.jdo.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 org.objectweb.perseus.persistence.api.TransactionalPersistenceManager getTransactionalPersistenceManager()
ProxyManager
getTransactionalPersistenceManager
in interface ProxyManager
org.objectweb.speedo.api.ProxyManager
pc
- the object requiring architecture deletion or its oidretainValues
- true if fields have to be restored into the JDO instancepublic org.objectweb.jorm.naming.api.PName createFieldOfProxy(SpeedoProxy sp, SpeedoProxy father, java.lang.String name) throws java.lang.Exception
createFieldOfProxy
in interface ProxyManager
sp
- the reference object whose proxy infrastructure will be buildfather
- the ownername
- is the name of the fieldpublic void open(java.lang.Object connectionspec)
ProxyManager
open
in interface ProxyManager
org.objectweb.speedo.api.ProxyManager
connectionSpec
- is the information to access to the datastore
(user, passwor, ...)public java.lang.Object getConnectionSpec()
getConnectionSpec
in interface ProxyManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |