| org.springframework.orm.jdo.JdoOperations
All known Subclasses: org.springframework.orm.jdo.JdoTemplate,
Method Summary | |
Object | attachCopy(Object detachedEntity) Reattach the given detached instance (for example, a web form object) with
the current JDO transaction, merging its changes into the current persistence
instance that represents the corresponding entity. | Collection | attachCopyAll(Collection detachedEntities) Reattach the given detached instances (for example, web form objects) with
the current JDO transaction, merging their changes into the current persistence
instances that represent the corresponding entities. | void | deletePersistent(Object entity) Delete the given persistent instance. | void | deletePersistentAll(Collection entities) Delete all given persistent instances. | Object | detachCopy(Object entity) Detach a copy of the given persistent instance from the current JDO transaction,
for use outside a JDO transaction (for example, as web form object). | Collection | detachCopyAll(Collection entities) Detach copies of the given persistent instances from the current JDO transaction,
for use outside a JDO transaction (for example, as web form objects). | void | evict(Object entity) Remove the given object from the PersistenceManager cache. | void | evictAll(Collection entities) Remove all given objects from the PersistenceManager cache. | void | evictAll() Remove all objects from the PersistenceManager cache. | Object | execute(JdoCallback action) Execute the action specified by the given action object within a
PersistenceManager. | Collection | executeFind(JdoCallback action) Execute the specified action assuming that the result object is a
Collection. | Collection | find(Class entityClass) Find all persistent instances of the given class. | Collection | find(Class entityClass, String filter) Find all persistent instances of the given class that match the given
JDOQL filter. | Collection | find(Class entityClass, String filter, String ordering) Find all persistent instances of the given class that match the given
JDOQL filter, with the given result ordering. | Collection | find(Class entityClass, String filter, String parameters, Object[] values) Find all persistent instances of the given class that match the given
JDOQL filter, using the given parameter declarations and parameter values. | Collection | find(Class entityClass, String filter, String parameters, Object[] values, String ordering) Find all persistent instances of the given class that match the given
JDOQL filter, using the given parameter declarations and parameter values,
with the given result ordering. | Collection | find(Class entityClass, String filter, String parameters, Map values) Find all persistent instances of the given class that match the given
JDOQL filter, using the given parameter declarations and parameter values. | Collection | find(Class entityClass, String filter, String parameters, Map values, String ordering) Find all persistent instances of the given class that match the given
JDOQL filter, using the given parameter declarations and parameter values,
with the given result ordering. | Collection | find(String language, Object queryObject) Find persistent instances through the given query object
in the specified query language. | Collection | find(String queryString) Find persistent instances through the given single-string JDOQL query. | Collection | find(String queryString, Object[] values) Find persistent instances through the given single-string JDOQL query. | Collection | find(String queryString, Map values) Find persistent instances through the given single-string JDOQL query. | Collection | findByNamedQuery(Class entityClass, String queryName) Find persistent instances through the given named query. | Collection | findByNamedQuery(Class entityClass, String queryName, Object[] values) Find persistent instances through the given named query. | Collection | findByNamedQuery(Class entityClass, String queryName, Map values) Find persistent instances through the given named query. | void | flush() Flush all transactional modifications to the database.
Only invoke this for selective eager flushing, for example when JDBC code
needs to see certain changes within the same transaction. | Object | getObjectById(Object objectId) Return the persistent instance with the given JDO object id,
throwing an exception if not found. | Object | getObjectById(Class entityClass, Object idValue) Return the persistent instance of the given entity class
with the given id value, throwing an exception if not found.
The given id value is typically just unique within the namespace
of the persistent class. | Object | makePersistent(Object entity) Make the given transient instance persistent. | Collection | makePersistentAll(Collection entities) Make the given transient instances persistent. | void | refresh(Object entity) Re-read the state of the given persistent instance. | void | refreshAll(Collection entities) Re-read the state of all given persistent instances. | void | refreshAll() Re-read the state of all persistent instances. |
attachCopy | Object attachCopy(Object detachedEntity)(Code) | | Reattach the given detached instance (for example, a web form object) with
the current JDO transaction, merging its changes into the current persistence
instance that represents the corresponding entity.
Note that as of JDO 2.0 final, this operation is equivalent to a
makePersistent call, with the latter method returning the
persistence instance.
Parameters: detachedEntity - the detached instance to attach the corresponding persistent instanceJdoOperations.makePersistent(Object) |
attachCopyAll | Collection attachCopyAll(Collection detachedEntities)(Code) | | Reattach the given detached instances (for example, web form objects) with
the current JDO transaction, merging their changes into the current persistence
instances that represent the corresponding entities.
Note that as of JDO 2.0 final, this operation is equivalent to a
makePersistentAll call, with the latter method returning the
persistence instance.
Parameters: detachedEntities - the detached instances to reattach the corresponding persistent instancesJdoOperations.makePersistentAll(java.util.Collection) |
deletePersistentAll | void deletePersistentAll(Collection entities) throws DataAccessException(Code) | | Delete all given persistent instances.
This can be combined with any of the find methods to delete by query
in two lines of code.
Parameters: entities - the persistent instances to delete throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.deletePersistentAll(java.util.Collection) |
detachCopy | Object detachCopy(Object entity)(Code) | | Detach a copy of the given persistent instance from the current JDO transaction,
for use outside a JDO transaction (for example, as web form object).
Parameters: entity - the persistent instance to detach the corresponding detached instance See Also: javax.jdo.PersistenceManager.detachCopy(Object) |
detachCopyAll | Collection detachCopyAll(Collection entities)(Code) | | Detach copies of the given persistent instances from the current JDO transaction,
for use outside a JDO transaction (for example, as web form objects).
Parameters: entities - the persistent instances to detach the corresponding detached instances See Also: javax.jdo.PersistenceManager.detachCopyAll(Collection) |
execute | Object execute(JdoCallback action) throws DataAccessException(Code) | | Execute the action specified by the given action object within a
PersistenceManager. Application exceptions thrown by the action object
get propagated to the caller (can only be unchecked). JDO exceptions
are transformed into appropriate DAO ones. Allows for returning a
result object, i.e. a domain object or a collection of domain objects.
Note: Callback code is not supposed to handle transactions itself!
Use an appropriate transaction manager like JdoTransactionManager.
Parameters: action - callback object that specifies the JDO action a result object returned by the action, or null throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: JdoTransactionManager See Also: org.springframework.dao See Also: org.springframework.transaction See Also: javax.jdo.PersistenceManager |
find | Collection find(Class entityClass, String filter, String ordering) throws DataAccessException(Code) | | Find all persistent instances of the given class that match the given
JDOQL filter, with the given result ordering.
Parameters: entityClass - a persistent class Parameters: filter - the JDOQL filter to match (or null if none) Parameters: ordering - the ordering of the result (or null if none) the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newQuery(ClassString) See Also: javax.jdo.Query.setOrdering |
find | Collection find(Class entityClass, String filter, String parameters, Object[] values) throws DataAccessException(Code) | | Find all persistent instances of the given class that match the given
JDOQL filter, using the given parameter declarations and parameter values.
Parameters: entityClass - a persistent class Parameters: filter - the JDOQL filter to match Parameters: parameters - the JDOQL parameter declarations Parameters: values - the corresponding parameter values the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newQuery(ClassString) See Also: javax.jdo.Query.declareParameters See Also: javax.jdo.Query.executeWithArray |
find | Collection find(Class entityClass, String filter, String parameters, Object[] values, String ordering) throws DataAccessException(Code) | | Find all persistent instances of the given class that match the given
JDOQL filter, using the given parameter declarations and parameter values,
with the given result ordering.
Parameters: entityClass - a persistent class Parameters: filter - the JDOQL filter to match Parameters: parameters - the JDOQL parameter declarations Parameters: values - the corresponding parameter values Parameters: ordering - the ordering of the result (or null if none) the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newQuery(ClassString) See Also: javax.jdo.Query.declareParameters See Also: javax.jdo.Query.executeWithArray See Also: javax.jdo.Query.setOrdering |
find | Collection find(Class entityClass, String filter, String parameters, Map values) throws DataAccessException(Code) | | Find all persistent instances of the given class that match the given
JDOQL filter, using the given parameter declarations and parameter values.
Parameters: entityClass - a persistent class Parameters: filter - the JDOQL filter to match Parameters: parameters - the JDOQL parameter declarations Parameters: values - a Map with parameter names as keys and parameter values the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newQuery(ClassString) See Also: javax.jdo.Query.declareParameters See Also: javax.jdo.Query.executeWithMap |
find | Collection find(Class entityClass, String filter, String parameters, Map values, String ordering) throws DataAccessException(Code) | | Find all persistent instances of the given class that match the given
JDOQL filter, using the given parameter declarations and parameter values,
with the given result ordering.
Parameters: entityClass - a persistent class Parameters: filter - the JDOQL filter to match Parameters: parameters - the JDOQL parameter declarations Parameters: values - a Map with parameter names as keys and parameter values Parameters: ordering - the ordering of the result (or null if none) the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newQuery(ClassString) See Also: javax.jdo.Query.declareParameters See Also: javax.jdo.Query.executeWithMap See Also: javax.jdo.Query.setOrdering |
find | Collection find(String language, Object queryObject) throws DataAccessException(Code) | | Find persistent instances through the given query object
in the specified query language.
Parameters: language - the query language (javax.jdo.Query#JDOQL or javax.jdo.Query#SQL , for example) Parameters: queryObject - the query object for the specified language the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newQuery(StringObject) See Also: javax.jdo.Query.JDOQL See Also: javax.jdo.Query.SQL |
find | Collection find(String queryString, Map values) throws DataAccessException(Code) | | Find persistent instances through the given single-string JDOQL query.
Parameters: queryString - the single-string JDOQL query Parameters: values - a Map with parameter names as keys and parameter values the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newQuery(String) |
findByNamedQuery | Collection findByNamedQuery(Class entityClass, String queryName, Object[] values) throws DataAccessException(Code) | | Find persistent instances through the given named query.
Parameters: entityClass - a persistent class Parameters: queryName - the name of the query Parameters: values - the corresponding parameter values the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newNamedQuery(ClassString) |
findByNamedQuery | Collection findByNamedQuery(Class entityClass, String queryName, Map values) throws DataAccessException(Code) | | Find persistent instances through the given named query.
Parameters: entityClass - a persistent class Parameters: queryName - the name of the query Parameters: values - a Map with parameter names as keys and parameter values the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.newNamedQuery(ClassString) |
getObjectById | Object getObjectById(Class entityClass, Object idValue) throws DataAccessException(Code) | | Return the persistent instance of the given entity class
with the given id value, throwing an exception if not found.
The given id value is typically just unique within the namespace
of the persistent class. Its toString value must correspond to the
toString value of the corresponding JDO object id.
Usually, the passed-in value will have originated from the primary
key field of a persistent object that uses JDO's application identity.
Parameters: entityClass - a persistent class Parameters: idValue - an id value of the persistent instance the persistent instance throws: org.springframework.orm.ObjectRetrievalFailureException - if not found throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.getObjectById(Objectboolean) See Also: javax.jdo.PersistenceManager.getObjectById(ClassObject) |
makePersistent | Object makePersistent(Object entity) throws DataAccessException(Code) | | Make the given transient instance persistent.
Attach the given entity if the instance is detached.
Parameters: entity - the transient instance to make persistent the persistent instance throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.makePersistent(Object) |
makePersistentAll | Collection makePersistentAll(Collection entities) throws DataAccessException(Code) | | Make the given transient instances persistent.
Attach the given entities if the instances are detached.
Parameters: entities - the transient instances to make persistent the persistent instances throws: org.springframework.dao.DataAccessException - in case of JDO errors See Also: javax.jdo.PersistenceManager.makePersistentAll(java.util.Collection) |
|
|