Java Doc for SqlMapExecutor.java in  » Database-ORM » iBATIS » com » ibatis » sqlmap » client » 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 » Database ORM » iBATIS » com.ibatis.sqlmap.client 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.ibatis.sqlmap.client.SqlMapExecutor

SqlMapExecutor
public interface SqlMapExecutor (Code)
This interface declares all methods involved with executing statements and batches for an SQL Map.
See Also:   SqlMapSession
See Also:   SqlMapClient




Method Summary
 intdelete(String id, Object parameterObject)
     Executes a mapped SQL DELETE statement. Delete returns the number of rows effected.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the DELETE statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g.

 intdelete(String id)
     Executes a mapped SQL DELETE statement. Delete returns the number of rows effected.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute.

 intexecuteBatch()
     Executes (flushes) all statements currently batched.
 ListexecuteBatchDetailed()
     Executes (flushes) all statements currently batched. a List of BatchResult objects.
 Objectinsert(String id, Object parameterObject)
     Executes a mapped SQL INSERT statement. Insert is a bit different from other update methods, as it provides facilities for returning the primary key of the newly inserted row (rather than the effected rows).
 Objectinsert(String id)
     Executes a mapped SQL INSERT statement. Insert is a bit different from other update methods, as it provides facilities for returning the primary key of the newly inserted row (rather than the effected rows).
 ListqueryForList(String id, Object parameterObject)
     Executes a mapped SQL SELECT statement that returns data to populate a number of result objects.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g.

 ListqueryForList(String id)
     Executes a mapped SQL SELECT statement that returns data to populate a number of result objects.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute.

 ListqueryForList(String id, Object parameterObject, int skip, int max)
     Executes a mapped SQL SELECT statement that returns data to populate a number of result objects within a certain range.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g.

 ListqueryForList(String id, int skip, int max)
     Executes a mapped SQL SELECT statement that returns data to populate a number of result objects within a certain range.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute.
Parameters:
  skip - The number of results to ignore.
Parameters:
  max - The maximum number of results to return.

 MapqueryForMap(String id, Object parameterObject, String keyProp)
     Executes a mapped SQL SELECT statement that returns data to populate a number of result objects that will be keyed into a Map.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g.

 MapqueryForMap(String id, Object parameterObject, String keyProp, String valueProp)
     Executes a mapped SQL SELECT statement that returns data to populate a number of result objects from which one property will be keyed into a Map.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g.

 ObjectqueryForObject(String id, Object parameterObject)
     Executes a mapped SQL SELECT statement that returns data to populate a single object instance.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g.

 ObjectqueryForObject(String id)
     Executes a mapped SQL SELECT statement that returns data to populate a single object instance.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute.

 ObjectqueryForObject(String id, Object parameterObject, Object resultObject)
     Executes a mapped SQL SELECT statement that returns data to populate the supplied result object.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g.

 PaginatedListqueryForPaginatedList(String id, Object parameterObject, int pageSize)
     Executes a mapped SQL SELECT statement that returns data to populate a number of result objects a page at a time.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g.

 PaginatedListqueryForPaginatedList(String id, int pageSize)
     Executes a mapped SQL SELECT statement that returns data to populate a number of result objects a page at a time.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute.
Parameters:
  pageSize - The maximum number of result objects each page can hold.

 voidqueryWithRowHandler(String id, Object parameterObject, RowHandler rowHandler)
     Executes a mapped SQL SELECT statement that returns a number of result objects that will be handled one at a time by a RowHandler.

This is generally a good approach to take when dealing with large sets of records (i.e.

 voidqueryWithRowHandler(String id, RowHandler rowHandler)
     Executes a mapped SQL SELECT statement that returns a number of result objects that will be handled one at a time by a RowHandler.

This is generally a good approach to take when dealing with large sets of records (i.e.

 voidstartBatch()
     Starts a batch in which update statements will be cached before being sent to the database all at once.
 intupdate(String id, Object parameterObject)
     Executes a mapped SQL UPDATE statement. Update can also be used for any other update statement type, such as inserts and deletes.
 intupdate(String id)
     Executes a mapped SQL UPDATE statement. Update can also be used for any other update statement type, such as inserts and deletes.



Method Detail
delete
int delete(String id, Object parameterObject) throws SQLException(Code)
Executes a mapped SQL DELETE statement. Delete returns the number of rows effected.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the DELETE statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.). The number of rows effected.
throws:
  java.sql.SQLException - If an error occurs.




delete
int delete(String id) throws SQLException(Code)
Executes a mapped SQL DELETE statement. Delete returns the number of rows effected.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute. The number of rows effected.
throws:
  java.sql.SQLException - If an error occurs.




executeBatch
int executeBatch() throws SQLException(Code)
Executes (flushes) all statements currently batched. the number of rows updated in the batch
throws:
  java.sql.SQLException - If the batch could not be executed or if any of the statementsfails.



executeBatchDetailed
List executeBatchDetailed() throws SQLException, BatchException(Code)
Executes (flushes) all statements currently batched. a List of BatchResult objects. There will be one element in thelist for each sub-batch executed. A sub-batch is created by adding a statementto the batch that does not equal the prior statement.
throws:
  SQLException - if a database access error occurs, or the drivedoes not support batch statements
throws:
  BatchException - if the driver throws BatchUpdateException
See Also:   com.ibatis.sqlmap.engine.execution.BatchException



insert
Object insert(String id, Object parameterObject) throws SQLException(Code)
Executes a mapped SQL INSERT statement. Insert is a bit different from other update methods, as it provides facilities for returning the primary key of the newly inserted row (rather than the effected rows). This functionality is of course optional.

The parameter object is generally used to supply the input data for the INSERT values.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.). The primary key of the newly inserted row. This might be automaticallygenerated by the RDBMS, or selected from a sequence table or other source.
throws:
  java.sql.SQLException - If an error occurs.




insert
Object insert(String id) throws SQLException(Code)
Executes a mapped SQL INSERT statement. Insert is a bit different from other update methods, as it provides facilities for returning the primary key of the newly inserted row (rather than the effected rows). This functionality is of course optional.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute. The primary key of the newly inserted row. This might be automaticallygenerated by the RDBMS, or selected from a sequence table or other source.
throws:
  java.sql.SQLException - If an error occurs.




queryForList
List queryForList(String id, Object parameterObject) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.). A List of result objects.
throws:
  java.sql.SQLException - If an error occurs.




queryForList
List queryForList(String id) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute. A List of result objects.
throws:
  java.sql.SQLException - If an error occurs.




queryForList
List queryForList(String id, Object parameterObject, int skip, int max) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects within a certain range.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.).
Parameters:
  skip - The number of results to ignore.
Parameters:
  max - The maximum number of results to return. A List of result objects.
throws:
  java.sql.SQLException - If an error occurs.




queryForList
List queryForList(String id, int skip, int max) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects within a certain range.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute.
Parameters:
  skip - The number of results to ignore.
Parameters:
  max - The maximum number of results to return. A List of result objects.
throws:
  java.sql.SQLException - If an error occurs.




queryForMap
Map queryForMap(String id, Object parameterObject, String keyProp) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects that will be keyed into a Map.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.).
Parameters:
  keyProp - The property to be used as the key in the Map. A Map keyed by keyProp with values being the result object instance.
throws:
  java.sql.SQLException - If an error occurs.




queryForMap
Map queryForMap(String id, Object parameterObject, String keyProp, String valueProp) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects from which one property will be keyed into a Map.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.).
Parameters:
  keyProp - The property to be used as the key in the Map.
Parameters:
  valueProp - The property to be used as the value in the Map. A Map keyed by keyProp with values of valueProp.
throws:
  java.sql.SQLException - If an error occurs.




queryForObject
Object queryForObject(String id, Object parameterObject) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a single object instance.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.). The single result object populated with the result set data,or null if no result was found
throws:
  java.sql.SQLException - If more than one result was found, or if any other error occurs.




queryForObject
Object queryForObject(String id) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a single object instance.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute. The single result object populated with the result set data,or null if no result was found
throws:
  java.sql.SQLException - If more than one result was found, or if any other error occurs.




queryForObject
Object queryForObject(String id, Object parameterObject, Object resultObject) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate the supplied result object.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.).
Parameters:
  resultObject - The result object instance that should be populated with result data. The single result object as supplied by the resultObject parameter, populated with the result set data,or null if no result was found
throws:
  java.sql.SQLException - If more than one result was found, or if any other error occurs.




queryForPaginatedList
PaginatedList queryForPaginatedList(String id, Object parameterObject, int pageSize) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects a page at a time.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.).
Parameters:
  pageSize - The maximum number of result objects each page can hold. A PaginatedList of result objects.
throws:
  java.sql.SQLException - If an error occurs.




queryForPaginatedList
PaginatedList queryForPaginatedList(String id, int pageSize) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns data to populate a number of result objects a page at a time.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute.
Parameters:
  pageSize - The maximum number of result objects each page can hold. A PaginatedList of result objects.
throws:
  java.sql.SQLException - If an error occurs.




queryWithRowHandler
void queryWithRowHandler(String id, Object parameterObject, RowHandler rowHandler) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns a number of result objects that will be handled one at a time by a RowHandler.

This is generally a good approach to take when dealing with large sets of records (i.e. hundreds, thousands...) that need to be processed without eating up all of the system resources.

The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement.
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.).
Parameters:
  rowHandler - A RowHandler instance
throws:
  java.sql.SQLException - If an error occurs.




queryWithRowHandler
void queryWithRowHandler(String id, RowHandler rowHandler) throws SQLException(Code)
Executes a mapped SQL SELECT statement that returns a number of result objects that will be handled one at a time by a RowHandler.

This is generally a good approach to take when dealing with large sets of records (i.e. hundreds, thousands...) that need to be processed without eating up all of the system resources.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute.
Parameters:
  rowHandler - A RowHandler instance
throws:
  java.sql.SQLException - If an error occurs.




startBatch
void startBatch() throws SQLException(Code)
Starts a batch in which update statements will be cached before being sent to the database all at once. This can improve overall performance of updates update when dealing with numerous updates (e.g. inserting 1:M related data).
throws:
  java.sql.SQLException - If the batch could not be started.



update
int update(String id, Object parameterObject) throws SQLException(Code)
Executes a mapped SQL UPDATE statement. Update can also be used for any other update statement type, such as inserts and deletes. Update returns the number of rows effected.

The parameter object is generally used to supply the input data for the UPDATE values as well as the WHERE clause parameter(s).
Parameters:
  id - The name of the statement to execute.
Parameters:
  parameterObject - The parameter object (e.g. JavaBean, Map, XML etc.). The number of rows effected.
throws:
  java.sql.SQLException - If an error occurs.




update
int update(String id) throws SQLException(Code)
Executes a mapped SQL UPDATE statement. Update can also be used for any other update statement type, such as inserts and deletes. Update returns the number of rows effected.

This overload assumes no parameter is needed.
Parameters:
  id - The name of the statement to execute. The number of rows effected.
throws:
  java.sql.SQLException - If an error occurs.




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