Java Doc for TopLinkOperations.java in  » J2EE » spring-framework-2.0.6 » org » springframework » orm » toplink » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.0.6 » org.springframework.orm.toplink 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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
 Objectcopy(Object entity)
     Create a detached copy of the given entity object, using TopLink's default ObjectCopyingPolicy.
 Objectcopy(Object entity, ObjectCopyingPolicy copyingPolicy)
     Create a detached copy of the given entity object.
 ListcopyAll(Collection entities)
     Create detached copies of all given entity objects, using TopLink's default ObjectCopyingPolicy.
 ListcopyAll(Collection entities, ObjectCopyingPolicy copyingPolicy)
     Create detached copies of all given entity objects.
 ObjectdeepMerge(Object entity)
     Reassociate the given entity copy with the current UnitOfWork, using deep merging of all contained entities.
 voiddelete(Object entity)
     Delete the given entity.
 voiddeleteAll(Collection entities)
     Delete all given entities.
 Objectexecute(TopLinkCallback action)
     Execute the action specified by the given action object within a TopLink Session.
 ListexecuteFind(TopLinkCallback action)
     Execute the specified action assuming that the result object is a Collection.
 ObjectexecuteNamedQuery(Class entityClass, String queryName)
     Execute a given named query with the given arguments.
 ObjectexecuteNamedQuery(Class entityClass, String queryName, boolean enforceReadOnly)
     Execute a given named query with the given arguments.
 ObjectexecuteNamedQuery(Class entityClass, String queryName, Object[] args)
     Execute a given named query with the given arguments.
 ObjectexecuteNamedQuery(Class entityClass, String queryName, Object[] args, boolean enforceReadOnly)
     Execute a given named query with the given arguments.
 ObjectexecuteQuery(DatabaseQuery query)
     Execute the given query object with the given arguments.
 ObjectexecuteQuery(DatabaseQuery query, boolean enforceReadOnly)
     Execute the given query object with the given arguments.
 ObjectexecuteQuery(DatabaseQuery query, Object[] args)
     Execute the given query object with the given arguments.
 ObjectexecuteQuery(DatabaseQuery query, Object[] args, boolean enforceReadOnly)
     Execute the given query object with the given arguments.
 Objectmerge(Object entity)
     Reassociate the given entity copy with the current UnitOfWork, using simple merging.
 ObjectmergeWithReferences(Object entity)
     Reassociate the given entity copy with the current UnitOfWork, using merging with all references from this clone.
 Objectread(Class entityClass, Expression expression)
     Read an entity instance of the given class that matches the given expression.
 Objectread(Class entityClass, Expression expression, boolean enforceReadOnly)
     Read an entity instance of the given class that matches the given expression.
 Objectread(Class entityClass, Call call)
     Read an entity instance of the given class, as returned by the given call.
 Objectread(Class entityClass, Call call, boolean enforceReadOnly)
     Read an entity instance of the given class, as returned by the given call.
 ListreadAll(Class entityClass)
     Read all entity instances of the given class.
 ListreadAll(Class entityClass, boolean enforceReadOnly)
     Read all entity instances of the given class.
 ListreadAll(Class entityClass, Expression expression)
     Read all entity instances of the given class that match the given expression.
 ListreadAll(Class entityClass, Expression expression, boolean enforceReadOnly)
     Read all entity instances of the given class that match the given expression.
 ListreadAll(Class entityClass, Call call)
     Read all entity instances of the given class, as returned by the given call.
 ListreadAll(Class entityClass, Call call, boolean enforceReadOnly)
     Read all entity instances of the given class, as returned by the given call.
 ObjectreadAndCopy(Class entityClass, Object id)
     Read the entity instance of the given class with the given id, throwing an exception if not found.
 ObjectreadAndCopy(Class entityClass, Object id, boolean enforceReadOnly)
     Read the entity instance of the given class with the given id, throwing an exception if not found.
 ObjectreadAndCopy(Class entityClass, Object[] keys)
     Read the entity instance of the given class with the given composite id, throwing an exception if not found.
 ObjectreadAndCopy(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.
 ObjectreadById(Class entityClass, Object id)
     Read the entity instance of the given class with the given id, throwing an exception if not found.
 ObjectreadById(Class entityClass, Object id, boolean enforceReadOnly)
     Read the entity instance of the given class with the given id, throwing an exception if not found.
 ObjectreadById(Class entityClass, Object[] keys)
     Read the entity instance of the given class with the given composite id, throwing an exception if not found.
 ObjectreadById(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.
 Objectrefresh(Object entity)
     Refresh the given entity object, returning the refreshed object.
 Objectrefresh(Object entity, boolean enforceReadOnly)
     Refresh the given entity object, returning the refreshed object.
 ListrefreshAll(Collection entities)
     Refresh the given entity objects, returning the corresponding refreshed objects.
 ListrefreshAll(Collection entities, boolean enforceReadOnly)
     Refresh the given entity objects, returning the corresponding refreshed objects.
 Objectregister(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.

 ListregisterAll(Collection entities)
     Register all given entities with the current UnitOfWork.
 ObjectregisterExisting(Object entity)
     Register the given existing entity with the current UnitOfWork.
 voidregisterNew(Object entity)
     Register the given new entity with the current UnitOfWork.
 ObjectshallowMerge(Object entity)
     Reassociate the given entity copy with the current UnitOfWork, using shallow merging of the entity instance.



Method Detail
copy
Object copy(Object entity) throws DataAccessException(Code)
Create a detached copy of the given entity object, using TopLink's default ObjectCopyingPolicy.
Parameters:
  entity - the entity object to copy the copy of the entity object
throws:
  org.springframework.dao.DataAccessException - in case of TopLink errors
See Also:   oracle.toplink.sessions.Session.copyObject(Object)



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) throws DataAccessException(Code)
Create detached copies of all given entity objects, using TopLink's default ObjectCopyingPolicy.
Parameters:
  entities - the entity objects to copy the copies of the entity objects
throws:
  org.springframework.dao.DataAccessException - in case of TopLink errors
See Also:   oracle.toplink.sessions.Session.copyObject(Object)



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)




delete
void delete(Object entity) throws DataAccessException(Code)
Delete the given entity.
Parameters:
  entity - the entity to delete
throws:
  org.springframework.dao.DataAccessException - in case of TopLink errors
See Also:   oracle.toplink.sessions.UnitOfWork.deleteObject(Object)



deleteAll
void deleteAll(Collection entities) throws DataAccessException(Code)
Delete all given entities.
Parameters:
  entities - the entities to delete
throws:
  org.springframework.dao.DataAccessException - in case of TopLink errors
See Also:   oracle.toplink.sessions.UnitOfWork.deleteAllObjects(java.util.Collection)



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) throws DataAccessException(Code)
Read the entity instance of the given class with the given 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:
  id - the id 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 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)




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.