org.springframework.orm.jdo
Interface JdoOperations

Interface that specifies a basic set of JDO operations,
implemented by JdoTemplate. Not often used, but a useful
option to enhance testability, as it can easily be mocked or stubbed.

Defines JdoTemplate's data access methods that mirror
various JDO PersistenceManager methods. Users are
strongly encouraged to read the JDO PersistenceManager
javadocs for details on the semantics of those methods.

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.

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.

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.

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.

execute

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.

attachCopy

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

Returns:

the corresponding persistent instance

attachCopyAll

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

Returns:

the corresponding persistent instances

flush

Only invoke this for selective eager flushing, for example when JDBC code
needs to see certain changes within the same transaction. Else, it's preferable
to rely on auto-flushing at transaction completion.