| org.springframework.orm.toplink.TopLinkOperations
All known Subclasses: org.springframework.orm.toplink.TopLinkTemplate,
TopLinkOperations | public interface TopLinkOperations (Code) | | Interface that specifies a basic set of TopLink operations,
implemented by
TopLinkTemplate . Not often used, but a useful
option to enhance testability, as it can easily be mocked or stubbed.
Defines TopLinkTemplate 's data access methods that
mirror various TopLink
oracle.toplink.sessions.Session /
oracle.toplink.sessions.UnitOfWork methods. Users are
strongly encouraged to read the TopLink javadocs for details
on the semantics of those methods.
author: Juergen Hoeller since: 1.2 |
Method Summary | |
Object | copy(Object entity) Create a detached copy of the given entity object,
using TopLink's default ObjectCopyingPolicy. | Object | copy(Object entity, ObjectCopyingPolicy copyingPolicy) Create a detached copy of the given entity object. | List | copyAll(Collection entities) Create detached copies of all given entity objects,
using TopLink's default ObjectCopyingPolicy. | List | copyAll(Collection entities, ObjectCopyingPolicy copyingPolicy) Create detached copies of all given entity objects. | Object | deepMerge(Object entity) Reassociate the given entity copy with the current UnitOfWork,
using deep merging of all contained entities. | void | delete(Object entity) Delete the given entity. | void | deleteAll(Collection entities) Delete all given entities. | Object | execute(TopLinkCallback action) Execute the action specified by the given action object within a
TopLink Session. | List | executeFind(TopLinkCallback action) Execute the specified action assuming that the result object is a
Collection. | Object | executeNamedQuery(Class entityClass, String queryName) Execute a given named query with the given arguments. | Object | executeNamedQuery(Class entityClass, String queryName, boolean enforceReadOnly) Execute a given named query with the given arguments. | Object | executeNamedQuery(Class entityClass, String queryName, Object[] args) Execute a given named query with the given arguments. | Object | executeNamedQuery(Class entityClass, String queryName, Object[] args, boolean enforceReadOnly) Execute a given named query with the given arguments. | Object | executeQuery(DatabaseQuery query) Execute the given query object with the given arguments. | Object | executeQuery(DatabaseQuery query, boolean enforceReadOnly) Execute the given query object with the given arguments. | Object | executeQuery(DatabaseQuery query, Object[] args) Execute the given query object with the given arguments. | Object | executeQuery(DatabaseQuery query, Object[] args, boolean enforceReadOnly) Execute the given query object with the given arguments. | Object | merge(Object entity) Reassociate the given entity copy with the current UnitOfWork,
using simple merging. | Object | mergeWithReferences(Object entity) Reassociate the given entity copy with the current UnitOfWork,
using merging with all references from this clone. | Object | read(Class entityClass, Expression expression) Read an entity instance of the given class that matches the given expression. | Object | read(Class entityClass, Expression expression, boolean enforceReadOnly) Read an entity instance of the given class that matches the given expression. | Object | read(Class entityClass, Call call) Read an entity instance of the given class, as returned by the given call. | Object | read(Class entityClass, Call call, boolean enforceReadOnly) Read an entity instance of the given class, as returned by the given call. | List | readAll(Class entityClass) Read all entity instances of the given class. | List | readAll(Class entityClass, boolean enforceReadOnly) Read all entity instances of the given class. | List | readAll(Class entityClass, Expression expression) Read all entity instances of the given class that match the given expression. | List | readAll(Class entityClass, Expression expression, boolean enforceReadOnly) Read all entity instances of the given class that match the given expression. | List | readAll(Class entityClass, Call call) Read all entity instances of the given class, as returned by the given call. | List | readAll(Class entityClass, Call call, boolean enforceReadOnly) Read all entity instances of the given class, as returned by the given call. | Object | readAndCopy(Class entityClass, Object id) Read the entity instance of the given class with the given id,
throwing an exception if not found. | Object | readAndCopy(Class entityClass, Object id, boolean enforceReadOnly) Read the entity instance of the given class with the given id,
throwing an exception if not found. | Object | readAndCopy(Class entityClass, Object[] keys) Read the entity instance of the given class with the given composite id,
throwing an exception if not found. | Object | readAndCopy(Class entityClass, Object[] keys, boolean enforceReadOnly) Read the entity instance of the given class with the given composite id,
throwing an exception if not found. | Object | readById(Class entityClass, Object id) Read the entity instance of the given class with the given id,
throwing an exception if not found. | Object | readById(Class entityClass, Object id, boolean enforceReadOnly) Read the entity instance of the given class with the given id,
throwing an exception if not found. | Object | readById(Class entityClass, Object[] keys) Read the entity instance of the given class with the given composite id,
throwing an exception if not found. | Object | readById(Class entityClass, Object[] keys, boolean enforceReadOnly) Read the entity instance of the given class with the given composite id,
throwing an exception if not found. | Object | refresh(Object entity) Refresh the given entity object, returning the refreshed object. | Object | refresh(Object entity, boolean enforceReadOnly) Refresh the given entity object, returning the refreshed object. | List | refreshAll(Collection entities) Refresh the given entity objects, returning the corresponding refreshed objects. | List | refreshAll(Collection entities, boolean enforceReadOnly) Refresh the given entity objects, returning the corresponding refreshed objects. | Object | register(Object entity) Register the given (new or existing) entity with the current UnitOfWork.
The entity will be checked for existence, according to TopLink's
configured existence checking policy. | List | registerAll(Collection entities) Register all given entities with the current UnitOfWork. | Object | registerExisting(Object entity) Register the given existing entity with the current UnitOfWork. | void | registerNew(Object entity) Register the given new entity with the current UnitOfWork. | Object | shallowMerge(Object entity) Reassociate the given entity copy with the current UnitOfWork,
using shallow merging of the entity instance. |
copy | Object copy(Object entity, ObjectCopyingPolicy copyingPolicy) throws DataAccessException(Code) | | Create a detached copy of the given entity object.
Parameters: entity - the entity object to copy Parameters: copyingPolicy - the TopLink ObjectCopyingPolicy to apply the copy of the entity object throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.copyObject(Objectoracle.toplink.sessions.ObjectCopyingPolicy) |
copyAll | List copyAll(Collection entities, ObjectCopyingPolicy copyingPolicy) throws DataAccessException(Code) | | Create detached copies of all given entity objects.
Parameters: entities - the entity objects to copy Parameters: copyingPolicy - the TopLink ObjectCopyingPolicy to apply the copies of the entity objects throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.copyObject(Object) |
deepMerge | Object deepMerge(Object entity) throws DataAccessException(Code) | | Reassociate the given entity copy with the current UnitOfWork,
using deep merging of all contained entities.
The given object will not be reassociated itself: instead, the state
will be copied onto the persistent object with the same identifier.
In case of a new entity, merge will register a copy as well,
but will also update the identifier of the passed-in object.
Parameters: entity - the updated copy to merge the updated, registered persistent instance throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.UnitOfWork.deepMergeClone(Object) |
execute | Object execute(TopLinkCallback action) throws DataAccessException(Code) | | Execute the action specified by the given action object within a
TopLink Session. Application exceptions thrown by the action object
get propagated to the caller (can only be unchecked). TopLink 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 TopLinkTransactionManager.
Parameters: action - callback object that specifies the TopLink action a result object returned by the action, or null throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: TopLinkTransactionManager See Also: org.springframework.dao See Also: org.springframework.transaction See Also: oracle.toplink.sessions.Session |
executeFind | List executeFind(TopLinkCallback action) throws DataAccessException(Code) | | Execute the specified action assuming that the result object is a
Collection. This is a convenience method for executing TopLink queries
within an action.
Parameters: action - callback object that specifies the TopLink action a Collection result returned by the action, or null throws: org.springframework.dao.DataAccessException - in case of TopLink errors |
executeNamedQuery | Object executeNamedQuery(Class entityClass, String queryName) throws DataAccessException(Code) | | Execute a given named query with the given arguments.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class that has the named query descriptor Parameters: queryName - the name of the query the result object or list of result objects for the query(can be cast to the entity class or Collection/List, respectively) throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.executeQuery(StringClass) |
executeNamedQuery | Object executeNamedQuery(Class entityClass, String queryName, boolean enforceReadOnly) throws DataAccessException(Code) | | Execute a given named query with the given arguments.
Parameters: entityClass - the entity class that has the named query descriptor Parameters: queryName - the name of the query Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the result object or list of result objects for the query(can be cast to the entity class or Collection/List, respectively) throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.executeQuery(StringClass) |
executeNamedQuery | Object executeNamedQuery(Class entityClass, String queryName, Object[] args) throws DataAccessException(Code) | | Execute a given named query with the given arguments.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class that has the named query descriptor Parameters: queryName - the name of the query Parameters: args - the arguments for the query (can be null ) the result object or list of result objects for the query(can be cast to the entity class or Collection/List, respectively) throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.executeQuery(StringClassjava.util.Vector) |
executeNamedQuery | Object executeNamedQuery(Class entityClass, String queryName, Object[] args, boolean enforceReadOnly) throws DataAccessException(Code) | | Execute a given named query with the given arguments.
Parameters: entityClass - the entity class that has the named query descriptor Parameters: queryName - the name of the query Parameters: args - the arguments for the query (can be null ) Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the result object or list of result objects for the query(can be cast to the entity class or Collection/List, respectively) throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.executeQuery(StringClassjava.util.Vector) |
executeQuery | Object executeQuery(DatabaseQuery query) throws DataAccessException(Code) | | Execute the given query object with the given arguments.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: query - the query object to execute (for example,a ReadObjectQuery or ReadAllQuery instance) the result object or list of result objects for the query(can be cast to the entity class or Collection/List, respectively) throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.executeQuery(oracle.toplink.queryframework.DatabaseQuery) |
executeQuery | Object executeQuery(DatabaseQuery query, boolean enforceReadOnly) throws DataAccessException(Code) | | Execute the given query object with the given arguments.
Parameters: query - the query object to execute (for example,a ReadObjectQuery or ReadAllQuery instance) Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the result object or list of result objects for the query(can be cast to the entity class or Collection/List, respectively) throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.executeQuery(oracle.toplink.queryframework.DatabaseQuery) |
executeQuery | Object executeQuery(DatabaseQuery query, Object[] args) throws DataAccessException(Code) | | Execute the given query object with the given arguments.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: query - the query object to execute (for example,a ReadObjectQuery or ReadAllQuery instance) Parameters: args - the arguments for the query (can be null ) the result object or list of result objects for the query(can be cast to the entity class or Collection/List, respectively) throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.executeQuery(oracle.toplink.queryframework.DatabaseQueryjava.util.Vector) |
executeQuery | Object executeQuery(DatabaseQuery query, Object[] args, boolean enforceReadOnly) throws DataAccessException(Code) | | Execute the given query object with the given arguments.
Parameters: query - the query object to execute (for example,a ReadObjectQuery or ReadAllQuery instance) Parameters: args - the arguments for the query (can be null ) Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the result object or list of result objects for the query(can be cast to the entity class or Collection/List, respectively) throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.executeQuery(oracle.toplink.queryframework.DatabaseQueryjava.util.Vector) |
merge | Object merge(Object entity) throws DataAccessException(Code) | | Reassociate the given entity copy with the current UnitOfWork,
using simple merging.
The given object will not be reassociated itself: instead, the state
will be copied onto the persistent object with the same identifier.
In case of a new entity, merge will copy to a registered object as well,
but will also update the identifier of the passed-in object.
Parameters: entity - the updated copy to merge the updated, registered persistent instance throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.UnitOfWork.mergeClone(Object) |
mergeWithReferences | Object mergeWithReferences(Object entity) throws DataAccessException(Code) | | Reassociate the given entity copy with the current UnitOfWork,
using merging with all references from this clone.
The given object will not be reassociated itself: instead, the state
will be copied onto the persistent object with the same identifier.
In case of a new entity, merge will register a copy as well,
but will also update the identifier of the passed-in object.
Parameters: entity - the updated copy to merge the updated, registered persistent instance throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.UnitOfWork.mergeCloneWithReferences(Object) |
read | Object read(Class entityClass, Expression expression) throws DataAccessException(Code) | | Read an entity instance of the given class that matches the given expression.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class Parameters: expression - the TopLink expression to match,usually built through the TopLink ExpressionBuilder the matching entity instance, or null if none found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Classoracle.toplink.expressions.Expression) See Also: oracle.toplink.expressions.ExpressionBuilder |
read | Object read(Class entityClass, Expression expression, boolean enforceReadOnly) throws DataAccessException(Code) | | Read an entity instance of the given class that matches the given expression.
Parameters: entityClass - the entity class Parameters: expression - the TopLink expression to match,usually built through the TopLink ExpressionBuilder Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) a matching entity instance, or null if none found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Classoracle.toplink.expressions.Expression) See Also: oracle.toplink.expressions.ExpressionBuilder |
read | Object read(Class entityClass, Call call) throws DataAccessException(Code) | | Read an entity instance of the given class, as returned by the given call.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class Parameters: call - the TopLink Call object to apply (either a SQLCall or an EJBQLCall) a matching entity instance, or null if none found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Classoracle.toplink.queryframework.Call) See Also: oracle.toplink.queryframework.SQLCall See Also: oracle.toplink.queryframework.EJBQLCall |
read | Object read(Class entityClass, Call call, boolean enforceReadOnly) throws DataAccessException(Code) | | Read an entity instance of the given class, as returned by the given call.
Parameters: entityClass - the entity class Parameters: call - the TopLink Call object to apply (either a SQLCall or an EJBQLCall) Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) a matching entity instance, or null if none found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Classoracle.toplink.expressions.Expression) See Also: oracle.toplink.queryframework.SQLCall See Also: oracle.toplink.queryframework.EJBQLCall |
readAll | List readAll(Class entityClass) throws DataAccessException(Code) | | Read all entity instances of the given class.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class the list of entity instances throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Class) |
readAll | List readAll(Class entityClass, boolean enforceReadOnly) throws DataAccessException(Code) | | Read all entity instances of the given class.
Parameters: entityClass - the entity class Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the list of entity instances throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Class) |
readAll | List readAll(Class entityClass, Expression expression) throws DataAccessException(Code) | | Read all entity instances of the given class that match the given expression.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class Parameters: expression - the TopLink expression to match,usually built through the TopLink ExpressionBuilder the list of matching entity instances throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Classoracle.toplink.expressions.Expression) See Also: oracle.toplink.expressions.ExpressionBuilder |
readAll | List readAll(Class entityClass, Expression expression, boolean enforceReadOnly) throws DataAccessException(Code) | | Read all entity instances of the given class that match the given expression.
Parameters: entityClass - the entity class Parameters: expression - the TopLink expression to match,usually built through the TopLink ExpressionBuilder Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the list of matching entity instances throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Classoracle.toplink.expressions.Expression) See Also: oracle.toplink.expressions.ExpressionBuilder |
readAll | List readAll(Class entityClass, Call call) throws DataAccessException(Code) | | Read all entity instances of the given class, as returned by the given call.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class Parameters: call - the TopLink Call object to apply (either a SQLCall or an EJBQLCall) the list of matching entity instances throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Classoracle.toplink.queryframework.Call) See Also: oracle.toplink.queryframework.SQLCall See Also: oracle.toplink.queryframework.EJBQLCall |
readAll | List readAll(Class entityClass, Call call, boolean enforceReadOnly) throws DataAccessException(Code) | | Read all entity instances of the given class, as returned by the given call.
Parameters: entityClass - the entity class Parameters: call - the TopLink Call object to apply (either a SQLCall or an EJBQLCall) Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the list of matching entity instances throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.readAllObjects(Classoracle.toplink.expressions.Expression) See Also: oracle.toplink.queryframework.SQLCall See Also: oracle.toplink.queryframework.EJBQLCall |
readAndCopy | Object readAndCopy(Class entityClass, Object id) throws DataAccessException(Code) | | Read the entity instance of the given class with the given id,
throwing an exception if not found. A detached copy of the entity object
will be returned, allowing for modifications outside the current transaction,
with the changes to be merged into a later transaction.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class Parameters: id - the id of the desired object a copy of the entity instance throws: org.springframework.orm.ObjectRetrievalFailureException - if not found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.queryframework.ReadObjectQuery.setSelectionKey(java.util.Vector) See Also: oracle.toplink.sessions.Session.copyObject(Object) |
readAndCopy | Object readAndCopy(Class entityClass, Object id, boolean enforceReadOnly) throws DataAccessException(Code) | | Read the entity instance of the given class with the given id,
throwing an exception if not found. A detached copy of the entity object
will be returned, allowing for modifications outside the current transaction,
with the changes to be merged into a later transaction.
Parameters: entityClass - the entity class Parameters: id - the id of the desired object Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) a copy of the entity instance throws: org.springframework.orm.ObjectRetrievalFailureException - if not found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.queryframework.ReadObjectQuery.setSelectionKey(java.util.Vector) See Also: oracle.toplink.sessions.Session.copyObject(Object) |
readAndCopy | Object readAndCopy(Class entityClass, Object[] keys) throws DataAccessException(Code) | | Read the entity instance of the given class with the given composite id,
throwing an exception if not found. A detached copy of the entity object
will be returned, allowing for modifications outside the current transaction,
with the changes to be merged into a later transaction.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class Parameters: keys - the composite id elements of the desired object a copy of the entity instance throws: org.springframework.orm.ObjectRetrievalFailureException - if not found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.queryframework.ReadObjectQuery.setSelectionKey(java.util.Vector) See Also: oracle.toplink.sessions.Session.copyObject(Object) |
readAndCopy | Object readAndCopy(Class entityClass, Object[] keys, boolean enforceReadOnly) throws DataAccessException(Code) | | Read the entity instance of the given class with the given composite id,
throwing an exception if not found. A detached copy of the entity object
will be returned, allowing for modifications outside the current transaction,
with the changes to be merged into a later transaction.
Parameters: entityClass - the entity class Parameters: keys - the composite id elements of the desired object Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) a copy of the entity instance throws: org.springframework.orm.ObjectRetrievalFailureException - if not found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.queryframework.ReadObjectQuery.setSelectionKey(java.util.Vector) See Also: oracle.toplink.sessions.Session.copyObject(Object) |
readById | Object readById(Class entityClass, Object id, boolean enforceReadOnly) throws DataAccessException(Code) | | Read the entity instance of the given class with the given id,
throwing an exception if not found.
Parameters: entityClass - the entity class Parameters: id - the id of the desired object the entity instance Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) throws: org.springframework.orm.ObjectRetrievalFailureException - if not found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.queryframework.ReadObjectQuery.setSelectionKey(java.util.Vector) |
readById | Object readById(Class entityClass, Object[] keys) throws DataAccessException(Code) | | Read the entity instance of the given class with the given composite id,
throwing an exception if not found.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entityClass - the entity class Parameters: keys - the composite id elements of the desired object the entity instance throws: org.springframework.orm.ObjectRetrievalFailureException - if not found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.queryframework.ReadObjectQuery.setSelectionKey(java.util.Vector) |
readById | Object readById(Class entityClass, Object[] keys, boolean enforceReadOnly) throws DataAccessException(Code) | | Read the entity instance of the given class with the given composite id,
throwing an exception if not found.
Parameters: entityClass - the entity class Parameters: keys - the composite id elements of the desired object Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the entity instance throws: org.springframework.orm.ObjectRetrievalFailureException - if not found throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.queryframework.ReadObjectQuery.setSelectionKey(java.util.Vector) |
refresh | Object refresh(Object entity) throws DataAccessException(Code) | | Refresh the given entity object, returning the refreshed object.
The returned object will only be different from the passed-in object
if the passed-in object is not the currently registered version of
the corresponding entity.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entity - the entity object to refresh the refreshed version of the entity object throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.refreshObject(Object) |
refresh | Object refresh(Object entity, boolean enforceReadOnly) throws DataAccessException(Code) | | Refresh the given entity object, returning the refreshed object.
The returned object will only be different from the passed-in object
if the passed-in object is not the currently registered version of
the corresponding entity.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entity - the entity object to refresh Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the refreshed version of the entity object throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.refreshObject(Object) |
refreshAll | List refreshAll(Collection entities) throws DataAccessException(Code) | | Refresh the given entity objects, returning the corresponding refreshed objects.
A returned object will only be different from the corresponding passed-in
object if the passed-in object is not the currently registered version of
the corresponding entity.
Retrieves read-write objects from the TopLink UnitOfWork in case of a
non-read-only transaction, and read-only objects else.
Parameters: entities - the entity objects to refresh the refreshed versions of the entity objects throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.refreshObject(Object) |
refreshAll | List refreshAll(Collection entities, boolean enforceReadOnly) throws DataAccessException(Code) | | Refresh the given entity objects, returning the corresponding refreshed objects.
A returned object will only be different from the corresponding passed-in
object if the passed-in object is not the currently registered version of
the corresponding entity.
Parameters: entities - the entity objects to refresh Parameters: enforceReadOnly - whether to always retrieve read-only objects fromthe plain TopLink Session (else, read-write objects will be retrievedfrom the TopLink UnitOfWork in case of a non-read-only transaction) the refreshed versions of the entity objects throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.Session.refreshObject(Object) |
register | Object register(Object entity)(Code) | | Register the given (new or existing) entity with the current UnitOfWork.
The entity will be checked for existence, according to TopLink's
configured existence checking policy. To avoid the (potentially costly)
existence check, consider using the specific registerNew
or registerExisting method.
Do not edit the passed-in object any further afterwards.
Parameters: entity - the entity to register the registered clone of the original object,which needs to be used for further editing throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.UnitOfWork.registerObject(Object) See Also: TopLinkOperations.registerNew(Object) See Also: TopLinkOperations.registerExisting(Object) |
registerAll | List registerAll(Collection entities)(Code) | | Register all given entities with the current UnitOfWork.
Do not edit the passed-in objects any further afterwards.
Parameters: entities - the entities to register the registered clones of the original objects,which need to be used for further editing throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.UnitOfWork.registerAllObjects(java.util.Collection) |
registerExisting | Object registerExisting(Object entity)(Code) | | Register the given existing entity with the current UnitOfWork.
Do not edit the passed-in object any further afterwards.
Parameters: entity - the existing entity to register the registered clone of the original object,which needs to be used for further editing throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.UnitOfWork.registerExistingObject(Object) |
registerNew | void registerNew(Object entity)(Code) | | Register the given new entity with the current UnitOfWork.
The passed-in object can be edited further afterwards.
Parameters: entity - the new entity to register throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.UnitOfWork.registerNewObject(Object) |
shallowMerge | Object shallowMerge(Object entity) throws DataAccessException(Code) | | Reassociate the given entity copy with the current UnitOfWork,
using shallow merging of the entity instance.
The given object will not be reassociated itself: instead, the state
will be copied onto the persistent object with the same identifier.
In case of a new entity, merge will register a copy as well,
but will also update the identifier of the passed-in object.
Parameters: entity - the updated copy to merge the updated, registered persistent instance throws: org.springframework.dao.DataAccessException - in case of TopLink errors See Also: oracle.toplink.sessions.UnitOfWork.shallowMergeClone(Object) |
|
|