Java Doc for SimpleJdbcOperations.java in  » J2EE » spring-framework-2.5 » org » springframework » jdbc » core » simple » 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.5 » org.springframework.jdbc.core.simple 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.jdbc.core.simple.SimpleJdbcOperations

All known Subclasses:   org.springframework.jdbc.core.simple.SimpleJdbcTemplate,
SimpleJdbcOperations
public interface SimpleJdbcOperations (Code)
JDBC operations interface usable on Java 5 and above, exposing a set of common JDBC operations, whose interface is simplified through the use of varargs and autoboxing.
author:
   Rod Johnson
author:
   Rob Harrop
author:
   Thomas Risberg
since:
   2.0
See Also:   org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
See Also:   SimpleJdbcTemplate
See Also:   org.springframework.jdbc.core.JdbcOperations




Method Summary
public  int[]batchUpdate(String sql, Map[] batchValues)
     Executes a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the named parameter support.
Parameters:
  sql - the SQL statement to execute.
Parameters:
  batchValues - the array of Maps containing the batch of arguments for the query.
public  int[]batchUpdate(String sql, SqlParameterSource[] batchArgs)
     Executes a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the named parameter support.
Parameters:
  sql - the SQL statement to execute.
Parameters:
  batchArgs - the array of SqlParameterSource containing the batch of arguments for the query.
public  int[]batchUpdate(String sql, List<Object[]> batchArgs)
     Executes a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL statement to execute.
Parameters:
  batchArgs - the List of Object arrays containing the batch of arguments for the query.
public  int[]batchUpdate(String sql, List<Object[]> batchArgs, int[] argTypes)
     Executes a batch using the supplied SQL statement with the batch of supplied arguments.
 JdbcOperationsgetJdbcOperations()
     Expose the classic Spring JdbcTemplate to allow invocation of less commonly used methods.
 NamedParameterJdbcOperationsgetNamedParameterJdbcOperations()
     Expose the Spring NamedParameterJdbcTemplate to allow invocation of less commonly used methods.
 List<T>query(String sql, ParameterizedRowMapper<T> rm, Map args)
     Query for a List of Objects of type T using the supplied ParameterizedRowMapper to the query results to the object.
 List<T>query(String sql, ParameterizedRowMapper<T> rm, SqlParameterSource args)
     Query for a List of Objects of type T using the supplied ParameterizedRowMapper to the query results to the object.
 List<T>query(String sql, ParameterizedRowMapper<T> rm, Object... args)
     Query for a List of Objects of type T using the supplied ParameterizedRowMapper to the query results to the object.
 intqueryForInt(String sql, Map args)
     Query for an int passing in a SQL query using the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate and a map containing the arguments.
 intqueryForInt(String sql, SqlParameterSource args)
     Query for an int passing in a SQL query using the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.
 intqueryForInt(String sql, Object... args)
     Query for an int passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.
 List<Map<String, Object>>queryForList(String sql, Map args)
     Execute the supplied query with the supplied arguments.
 List<Map<String, Object>>queryForList(String sql, SqlParameterSource args)
     Execute the supplied query with the supplied arguments.
 List<Map<String, Object>>queryForList(String sql, Object... args)
     Execute the supplied query with the (optional) supplied arguments.
 longqueryForLong(String sql, Map args)
     Query for an long passing in a SQL query using the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate and a map containing the arguments.
 longqueryForLong(String sql, SqlParameterSource args)
     Query for an long passing in a SQL query using the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.
 longqueryForLong(String sql, Object... args)
     Query for an long passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.
 Map<String, Object>queryForMap(String sql, Map args)
     Execute the supplied query with the supplied arguments.
 Map<String, Object>queryForMap(String sql, SqlParameterSource args)
     Execute the supplied query with the supplied arguments.
 Map<String, Object>queryForMap(String sql, Object... args)
     Execute the supplied query with the (optional) supplied arguments.
 TqueryForObject(String sql, Class<T> requiredType, Map args)
     Query for an object of type T identified by the supplied @ Class .
 TqueryForObject(String sql, Class<T> requiredType, SqlParameterSource args)
     Query for an object of type T identified by the supplied @ Class .
 TqueryForObject(String sql, Class<T> requiredType, Object... args)
     Query for an object of type T identified by the supplied @ Class .
 TqueryForObject(String sql, ParameterizedRowMapper<T> rm, Map args)
     Query for an object of type T using the supplied ParameterizedRowMapper to the query results to the object.
 TqueryForObject(String sql, ParameterizedRowMapper<T> rm, SqlParameterSource args)
     Query for an object of type T using the supplied ParameterizedRowMapper to the query results to the object.
 TqueryForObject(String sql, ParameterizedRowMapper<T> rm, Object... args)
     Query for an object of type T using the supplied ParameterizedRowMapper to the query results to the object.
 intupdate(String sql, Map args)
     Executes the supplied SQL statement with (optional) supplied arguments. Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL statement to execute.
Parameters:
  args - the map containing the arguments for the query.
 intupdate(String sql, SqlParameterSource args)
     Executes the supplied SQL statement with supplied arguments. Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL statement to execute.
Parameters:
  args - the SqlParameterSource containing the arguments for the statement.
 intupdate(String sql, Object... args)
     Executes the supplied SQL statement with supplied arguments. Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL statement to execute.
Parameters:
  args - the variable number of arguments for the query.



Method Detail
batchUpdate
public int[] batchUpdate(String sql, Map[] batchValues)(Code)
Executes a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the named parameter support.
Parameters:
  sql - the SQL statement to execute.
Parameters:
  batchValues - the array of Maps containing the batch of arguments for the query. an array containing the numbers of rows affected by each update in the batch.



batchUpdate
public int[] batchUpdate(String sql, SqlParameterSource[] batchArgs)(Code)
Executes a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the named parameter support.
Parameters:
  sql - the SQL statement to execute.
Parameters:
  batchArgs - the array of SqlParameterSource containing the batch of arguments for the query. an array containing the numbers of rows affected by each update in the batch.



batchUpdate
public int[] batchUpdate(String sql, List<Object[]> batchArgs)(Code)
Executes a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL statement to execute.
Parameters:
  batchArgs - the List of Object arrays containing the batch of arguments for the query. an array containing the numbers of rows affected by each update in the batch.



batchUpdate
public int[] batchUpdate(String sql, List<Object[]> batchArgs, int[] argTypes)(Code)
Executes a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL statement to execute.
Parameters:
  batchArgs - the List of Object arrays containing the batch of arguments for the query.
Parameters:
  argTypes - SQL types of the arguments(constants from java.sql.Types) an array containing the numbers of rows affected by each update in the batch.



getJdbcOperations
JdbcOperations getJdbcOperations()(Code)
Expose the classic Spring JdbcTemplate to allow invocation of less commonly used methods.



getNamedParameterJdbcOperations
NamedParameterJdbcOperations getNamedParameterJdbcOperations()(Code)
Expose the Spring NamedParameterJdbcTemplate to allow invocation of less commonly used methods.



query
List<T> query(String sql, ParameterizedRowMapper<T> rm, Map args) throws DataAccessException(Code)
Query for a List of Objects of type T using the supplied ParameterizedRowMapper to the query results to the object. Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  rm - the @ParameterizedRowMapper to use for result mapping
Parameters:
  args - the map containing the arguments for the query.
See Also:   JdbcOperations.queryForObject(Stringorg.springframework.jdbc.core.RowMapper)
See Also:   JdbcOperations.queryForObject(StringObject[]org.springframework.jdbc.core.RowMapper)



query
List<T> query(String sql, ParameterizedRowMapper<T> rm, SqlParameterSource args) throws DataAccessException(Code)
Query for a List of Objects of type T using the supplied ParameterizedRowMapper to the query results to the object. Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  rm - the @ParameterizedRowMapper to use for result mapping
Parameters:
  args - the SqlParameterSource containing the arguments for the query.
See Also:   JdbcOperations.queryForObject(Stringorg.springframework.jdbc.core.RowMapper)
See Also:   JdbcOperations.queryForObject(StringObject[]org.springframework.jdbc.core.RowMapper)



query
List<T> query(String sql, ParameterizedRowMapper<T> rm, Object... args) throws DataAccessException(Code)
Query for a List of Objects of type T using the supplied ParameterizedRowMapper to the query results to the object. Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL query to run.
Parameters:
  rm - the @ParameterizedRowMapper to use for result mapping
Parameters:
  args - the variable number of arguments for the query.
See Also:   JdbcOperations.queryForObject(Stringorg.springframework.jdbc.core.RowMapper)
See Also:   JdbcOperations.queryForObject(StringObject[]org.springframework.jdbc.core.RowMapper)



queryForInt
int queryForInt(String sql, Map args) throws DataAccessException(Code)
Query for an int passing in a SQL query using the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate and a map containing the arguments.
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the map containing the arguments for the query.



queryForInt
int queryForInt(String sql, SqlParameterSource args) throws DataAccessException(Code)
Query for an int passing in a SQL query using the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the SqlParameterSource containing the arguments for the query.



queryForInt
int queryForInt(String sql, Object... args) throws DataAccessException(Code)
Query for an int passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the variable number of arguments for the query.



queryForList
List<Map<String, Object>> queryForList(String sql, Map args) throws DataAccessException(Code)
Execute the supplied query with the supplied arguments.

Each element in the returned List is constructed as a Map as described in SimpleJdbcOperations.queryForMap Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the map containing the arguments for the query.
See Also:   JdbcOperations.queryForList(String)
See Also:   JdbcOperations.queryForList(StringObject[])




queryForList
List<Map<String, Object>> queryForList(String sql, SqlParameterSource args) throws DataAccessException(Code)
Execute the supplied query with the supplied arguments.

Each element in the returned List is constructed as a Map as described in SimpleJdbcOperations.queryForMap Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the SqlParameterSource containing the arguments for the query.
See Also:   JdbcOperations.queryForList(String)
See Also:   JdbcOperations.queryForList(StringObject[])




queryForList
List<Map<String, Object>> queryForList(String sql, Object... args) throws DataAccessException(Code)
Execute the supplied query with the (optional) supplied arguments.

Each element in the returned List is constructed as a Map as described in SimpleJdbcOperations.queryForMap Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the variable number of arguments for the query.
See Also:   JdbcOperations.queryForList(String)
See Also:   JdbcOperations.queryForList(StringObject[])




queryForLong
long queryForLong(String sql, Map args) throws DataAccessException(Code)
Query for an long passing in a SQL query using the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate and a map containing the arguments.
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the map containing the arguments for the query.



queryForLong
long queryForLong(String sql, SqlParameterSource args) throws DataAccessException(Code)
Query for an long passing in a SQL query using the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the SqlParameterSource containing the arguments for the query.



queryForLong
long queryForLong(String sql, Object... args) throws DataAccessException(Code)
Query for an long passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the variable number of arguments for the query.



queryForMap
Map<String, Object> queryForMap(String sql, Map args) throws DataAccessException(Code)
Execute the supplied query with the supplied arguments.

The query is expected to be a single row query; the result row will be mapped to a Map (one entry for each column, using the column name as the key). Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the map containing the arguments for the query.
See Also:   JdbcOperations.queryForMap(String)
See Also:   JdbcOperations.queryForMap(StringObject[])




queryForMap
Map<String, Object> queryForMap(String sql, SqlParameterSource args) throws DataAccessException(Code)
Execute the supplied query with the supplied arguments.

The query is expected to be a single row query; the result row will be mapped to a Map (one entry for each column, using the column name as the key). Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the SqlParameterSource containing the arguments for the query.
See Also:   JdbcOperations.queryForMap(String)
See Also:   JdbcOperations.queryForMap(StringObject[])




queryForMap
Map<String, Object> queryForMap(String sql, Object... args) throws DataAccessException(Code)
Execute the supplied query with the (optional) supplied arguments.

The query is expected to be a single row query; the result row will be mapped to a Map (one entry for each column, using the column name as the key). Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL query to run.
Parameters:
  args - the variable number of arguments for the query.
See Also:   JdbcOperations.queryForMap(String)
See Also:   JdbcOperations.queryForMap(StringObject[])




queryForObject
T queryForObject(String sql, Class<T> requiredType, Map args) throws DataAccessException(Code)
Query for an object of type T identified by the supplied @ Class . Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  requiredType - the required type of the return value.
Parameters:
  args - the map containing the arguments for the query.
See Also:   JdbcOperations.queryForObject(StringClass)
See Also:   JdbcOperations.queryForObject(StringObject[]Class)



queryForObject
T queryForObject(String sql, Class<T> requiredType, SqlParameterSource args) throws DataAccessException(Code)
Query for an object of type T identified by the supplied @ Class . Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  requiredType - the required type of the return value.
Parameters:
  args - the SqlParameterSource containing the arguments for the query.
See Also:   JdbcOperations.queryForObject(StringClass)
See Also:   JdbcOperations.queryForObject(StringObject[]Class)



queryForObject
T queryForObject(String sql, Class<T> requiredType, Object... args) throws DataAccessException(Code)
Query for an object of type T identified by the supplied @ Class . Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL query to run.
Parameters:
  requiredType - the required type of the return value.
Parameters:
  args - the variable number of arguments for the query.
See Also:   JdbcOperations.queryForObject(StringClass)
See Also:   JdbcOperations.queryForObject(StringObject[]Class)



queryForObject
T queryForObject(String sql, ParameterizedRowMapper<T> rm, Map args) throws DataAccessException(Code)
Query for an object of type T using the supplied ParameterizedRowMapper to the query results to the object. Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  rm - the @ParameterizedRowMapper to use for result mapping
Parameters:
  args - the map containing the arguments for the query.
See Also:   JdbcOperations.queryForObject(Stringorg.springframework.jdbc.core.RowMapper)
See Also:   JdbcOperations.queryForObject(StringObject[]org.springframework.jdbc.core.RowMapper)



queryForObject
T queryForObject(String sql, ParameterizedRowMapper<T> rm, SqlParameterSource args) throws DataAccessException(Code)
Query for an object of type T using the supplied ParameterizedRowMapper to the query results to the object. Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL query to run.
Parameters:
  rm - the @ParameterizedRowMapper to use for result mapping
Parameters:
  args - the SqlParameterSource containing the arguments for the query.
See Also:   JdbcOperations.queryForObject(Stringorg.springframework.jdbc.core.RowMapper)
See Also:   JdbcOperations.queryForObject(StringObject[]org.springframework.jdbc.core.RowMapper)



queryForObject
T queryForObject(String sql, ParameterizedRowMapper<T> rm, Object... args) throws DataAccessException(Code)
Query for an object of type T using the supplied ParameterizedRowMapper to the query results to the object. Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL query to run.
Parameters:
  rm - the @ParameterizedRowMapper to use for result mapping
Parameters:
  args - the variable number of arguments for the query.
See Also:   JdbcOperations.queryForObject(Stringorg.springframework.jdbc.core.RowMapper)
See Also:   JdbcOperations.queryForObject(StringObject[]org.springframework.jdbc.core.RowMapper)



update
int update(String sql, Map args) throws DataAccessException(Code)
Executes the supplied SQL statement with (optional) supplied arguments. Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL statement to execute.
Parameters:
  args - the map containing the arguments for the query. the numbers of rows affected by the update.
See Also:   NamedParameterJdbcOperations.update(StringMap)



update
int update(String sql, SqlParameterSource args) throws DataAccessException(Code)
Executes the supplied SQL statement with supplied arguments. Uses sql with the named parameter support provided by the org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
Parameters:
  sql - the SQL statement to execute.
Parameters:
  args - the SqlParameterSource containing the arguments for the statement. the numbers of rows affected by the update.
See Also:   NamedParameterJdbcOperations.update(StringSqlParameterSource)



update
int update(String sql, Object... args) throws DataAccessException(Code)
Executes the supplied SQL statement with supplied arguments. Uses sql with the standard '?' placeholders for parameters
Parameters:
  sql - the SQL statement to execute.
Parameters:
  args - the variable number of arguments for the query. the numbers of rows affected by the update.
See Also:   JdbcOperations.update(String)
See Also:   JdbcOperations.update(StringObject[])



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