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


java.lang.Object
   org.springframework.jdbc.support.JdbcAccessor
      org.springframework.jdbc.core.JdbcTemplate

JdbcTemplate
public class JdbcTemplate extends JdbcAccessor implements JdbcOperations(Code)
This is the central class in the JDBC core package. It simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and extract results. This class executes SQL queries or updates, initiating iteration over ResultSets and catching JDBC exceptions and translating them to the generic, more informative exception hierarchy defined in the org.springframework.dao package.

Code using this class need only implement callback interfaces, giving them a clearly defined contract. The PreparedStatementCreator callback interface creates a prepared statement given a Connection, providing SQL and any necessary parameters. The ResultSetExtractor interface extracts values from a ResultSet. See also PreparedStatementSetter and RowMapper for two popular alternative callback interfaces.

Can be used within a service implementation via direct instantiation with a DataSource reference, or get prepared in an application context and given to services as bean reference. Note: The DataSource should always be configured as a bean in the application context, in the first case given to the service directly, in the second case to the prepared template.

Because this class is parameterizable by the callback interfaces and the org.springframework.jdbc.support.SQLExceptionTranslator interface, there should be no need to subclass it.

All SQL operations performed by this class are logged at debug level, using "org.springframework.jdbc.core.JdbcTemplate" as log category.
author:
   Rod Johnson
author:
   Juergen Hoeller
author:
   Thomas Risberg
since:
   May 3, 2001
See Also:   PreparedStatementCreator
See Also:   PreparedStatementSetter
See Also:   CallableStatementCreator
See Also:   PreparedStatementCallback
See Also:   CallableStatementCallback
See Also:   ResultSetExtractor
See Also:   RowCallbackHandler
See Also:   RowMapper
See Also:   org.springframework.jdbc.support.SQLExceptionTranslator




Constructor Summary
public  JdbcTemplate()
     Construct a new JdbcTemplate for bean usage.
public  JdbcTemplate(DataSource dataSource)
     Construct a new JdbcTemplate, given a DataSource to obtain connections from.
public  JdbcTemplate(DataSource dataSource, boolean lazyInit)
     Construct a new JdbcTemplate, given a DataSource to obtain connections from.

Method Summary
protected  voidapplyStatementSettings(Statement stmt)
     Prepare the given JDBC Statement (or PreparedStatement or CallableStatement), applying statement settings such as fetch size, max rows, and query timeout.
public  int[]batchUpdate(String[] sql)
    
public  int[]batchUpdate(String sql, BatchPreparedStatementSetter pss)
    
public  Mapcall(CallableStatementCreator csc, List declaredParameters)
    
protected  ConnectioncreateConnectionProxy(Connection con)
     Create a close-suppressing proxy for the given JDBC Connection.
protected  MapcreateResultsMap()
     Create a Map instance to be used as results map.
public  Objectexecute(ConnectionCallback action)
    
public  Objectexecute(StatementCallback action)
    
public  voidexecute(String sql)
    
public  Objectexecute(PreparedStatementCreator psc, PreparedStatementCallback action)
    
public  Objectexecute(String sql, PreparedStatementCallback action)
    
public  Objectexecute(CallableStatementCreator csc, CallableStatementCallback action)
    
public  Objectexecute(String callString, CallableStatementCallback action)
    
protected  MapextractOutputParameters(CallableStatement cs, List parameters)
     Extract output parameters from the completed stored procedure.
protected  MapextractReturnedResults(CallableStatement cs, List updateCountParameters, List resultSetParameters, int updateCount)
     Extract returned ResultSets from the completed stored procedure.
protected  RowMappergetColumnMapRowMapper()
     Create a new RowMapper for reading columns as key-value pairs.
public  intgetFetchSize()
     Return the fetch size specified for this JdbcTemplate.
public  intgetMaxRows()
     Return the maximum number of rows specified for this JdbcTemplate.
public  NativeJdbcExtractorgetNativeJdbcExtractor()
     Return the current NativeJdbcExtractor implementation.
public  intgetQueryTimeout()
     Return the query timeout for statements that this JdbcTemplate executes.
protected  RowMappergetSingleColumnRowMapper(Class requiredType)
     Create a new RowMapper for reading result objects from a single column.
protected  voidhandleWarnings(SQLWarning warning)
     Throw an SQLWarningException if we're not ignoring warnings, else log the warnings (at debug level).
public  booleanisIgnoreWarnings()
     Return whether or not we ignore SQLWarnings.
public  booleanisResultsMapCaseInsensitive()
     Return whether execution of a CallableStatement will return the results in a Map that uses case insensitive names for the parameters.
public  booleanisSkipResultsProcessing()
     Return whether results processing should be skipped.
protected  MapprocessResultSet(ResultSet rs, ResultSetSupportingSqlParameter param)
     Process the given ResultSet from a stored procedure.
public  Objectquery(String sql, ResultSetExtractor rse)
    
public  voidquery(String sql, RowCallbackHandler rch)
    
public  Listquery(String sql, RowMapper rowMapper)
    
public  Objectquery(PreparedStatementCreator psc, PreparedStatementSetter pss, ResultSetExtractor rse)
     Query using a prepared statement, allowing for a PreparedStatementCreator and a PreparedStatementSetter.
public  Objectquery(PreparedStatementCreator psc, ResultSetExtractor rse)
    
public  Objectquery(String sql, PreparedStatementSetter pss, ResultSetExtractor rse)
    
public  Objectquery(String sql, Object[] args, int[] argTypes, ResultSetExtractor rse)
    
public  Objectquery(String sql, Object[] args, ResultSetExtractor rse)
    
public  voidquery(PreparedStatementCreator psc, RowCallbackHandler rch)
    
public  voidquery(String sql, PreparedStatementSetter pss, RowCallbackHandler rch)
    
public  voidquery(String sql, Object[] args, int[] argTypes, RowCallbackHandler rch)
    
public  voidquery(String sql, Object[] args, RowCallbackHandler rch)
    
public  Listquery(PreparedStatementCreator psc, RowMapper rowMapper)
    
public  Listquery(String sql, PreparedStatementSetter pss, RowMapper rowMapper)
    
public  Listquery(String sql, Object[] args, int[] argTypes, RowMapper rowMapper)
    
public  Listquery(String sql, Object[] args, RowMapper rowMapper)
    
public  intqueryForInt(String sql)
    
public  intqueryForInt(String sql, Object[] args, int[] argTypes)
    
public  intqueryForInt(String sql, Object[] args)
    
public  ListqueryForList(String sql, Class elementType)
    
public  ListqueryForList(String sql)
    
public  ListqueryForList(String sql, Object[] args, int[] argTypes, Class elementType)
    
public  ListqueryForList(String sql, Object[] args, Class elementType)
    
public  ListqueryForList(String sql, Object[] args, int[] argTypes)
    
public  ListqueryForList(String sql, Object[] args)
    
public  longqueryForLong(String sql)
    
public  longqueryForLong(String sql, Object[] args, int[] argTypes)
    
public  longqueryForLong(String sql, Object[] args)
    
public  MapqueryForMap(String sql)
    
public  MapqueryForMap(String sql, Object[] args, int[] argTypes)
    
public  MapqueryForMap(String sql, Object[] args)
    
public  ObjectqueryForObject(String sql, RowMapper rowMapper)
    
public  ObjectqueryForObject(String sql, Class requiredType)
    
public  ObjectqueryForObject(String sql, Object[] args, int[] argTypes, RowMapper rowMapper)
    
public  ObjectqueryForObject(String sql, Object[] args, RowMapper rowMapper)
    
public  ObjectqueryForObject(String sql, Object[] args, int[] argTypes, Class requiredType)
    
public  ObjectqueryForObject(String sql, Object[] args, Class requiredType)
    
public  SqlRowSetqueryForRowSet(String sql)
    
public  SqlRowSetqueryForRowSet(String sql, Object[] args, int[] argTypes)
    
public  SqlRowSetqueryForRowSet(String sql, Object[] args)
    
public  voidsetFetchSize(int fetchSize)
     Set the fetch size for this JdbcTemplate.
public  voidsetIgnoreWarnings(boolean ignoreWarnings)
     Set whether or not we want to ignore SQLWarnings.

Default is "true", swallowing and logging all warnings.

public  voidsetMaxRows(int maxRows)
     Set the maximum number of rows for this JdbcTemplate.
public  voidsetNativeJdbcExtractor(NativeJdbcExtractor extractor)
     Set a NativeJdbcExtractor to extract native JDBC objects from wrapped handles.
public  voidsetQueryTimeout(int queryTimeout)
     Set the query timeout for statements that this JdbcTemplate executes.
public  voidsetResultsMapCaseInsensitive(boolean resultsMapCaseInsensitive)
    
public  voidsetSkipResultsProcessing(boolean skipResultsProcessing)
     Set whether results processing should be skipped.
public  intupdate(String sql)
    
protected  intupdate(PreparedStatementCreator psc, PreparedStatementSetter pss)
    
public  intupdate(PreparedStatementCreator psc)
    
public  intupdate(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)
    
public  intupdate(String sql, PreparedStatementSetter pss)
    
public  intupdate(String sql, Object[] args, int[] argTypes)
    
public  intupdate(String sql, Object[] args)
    


Constructor Detail
JdbcTemplate
public JdbcTemplate()(Code)
Construct a new JdbcTemplate for bean usage.

Note: The DataSource has to be set before using the instance.
See Also:   JdbcTemplate.setDataSource




JdbcTemplate
public JdbcTemplate(DataSource dataSource)(Code)
Construct a new JdbcTemplate, given a DataSource to obtain connections from.

Note: This will not trigger initialization of the exception translator.
Parameters:
  dataSource - the JDBC DataSource to obtain connections from




JdbcTemplate
public JdbcTemplate(DataSource dataSource, boolean lazyInit)(Code)
Construct a new JdbcTemplate, given a DataSource to obtain connections from.

Note: Depending on the "lazyInit" flag, initialization of the exception translator will be triggered.
Parameters:
  dataSource - the JDBC DataSource to obtain connections from
Parameters:
  lazyInit - whether to lazily initialize the SQLExceptionTranslator





Method Detail
applyStatementSettings
protected void applyStatementSettings(Statement stmt) throws SQLException(Code)
Prepare the given JDBC Statement (or PreparedStatement or CallableStatement), applying statement settings such as fetch size, max rows, and query timeout.
Parameters:
  stmt - the JDBC Statement to prepare
throws:
  SQLException - if thrown by JDBC API
See Also:   JdbcTemplate.setFetchSize
See Also:   JdbcTemplate.setMaxRows
See Also:   JdbcTemplate.setQueryTimeout
See Also:   org.springframework.jdbc.datasource.DataSourceUtils.applyTransactionTimeout



batchUpdate
public int[] batchUpdate(String[] sql) throws DataAccessException(Code)



batchUpdate
public int[] batchUpdate(String sql, BatchPreparedStatementSetter pss) throws DataAccessException(Code)



call
public Map call(CallableStatementCreator csc, List declaredParameters) throws DataAccessException(Code)



createConnectionProxy
protected Connection createConnectionProxy(Connection con)(Code)
Create a close-suppressing proxy for the given JDBC Connection. Called by the execute method.

The proxy also prepares returned JDBC Statements, applying statement settings such as fetch size, max rows, and query timeout.
Parameters:
  con - the JDBC Connection to create a proxy for the Connection proxy
See Also:   java.sql.Connection.close
See Also:   JdbcTemplate.execute(ConnectionCallback)
See Also:   JdbcTemplate.applyStatementSettings




createResultsMap
protected Map createResultsMap()(Code)
Create a Map instance to be used as results map.

If "isResultsMapCaseInsensitive" has been set to true, a linked case-insensitive Map will be created if possible, else a plain HashMap (see Spring's CollectionFactory). the new Map instance
See Also:   org.springframework.core.CollectionFactory.createLinkedCaseInsensitiveMapIfPossible




execute
public Object execute(ConnectionCallback action) throws DataAccessException(Code)



execute
public Object execute(StatementCallback action) throws DataAccessException(Code)



execute
public void execute(String sql) throws DataAccessException(Code)



execute
public Object execute(PreparedStatementCreator psc, PreparedStatementCallback action) throws DataAccessException(Code)



execute
public Object execute(String sql, PreparedStatementCallback action) throws DataAccessException(Code)



execute
public Object execute(CallableStatementCreator csc, CallableStatementCallback action) throws DataAccessException(Code)



execute
public Object execute(String callString, CallableStatementCallback action) throws DataAccessException(Code)



extractOutputParameters
protected Map extractOutputParameters(CallableStatement cs, List parameters) throws SQLException(Code)
Extract output parameters from the completed stored procedure.
Parameters:
  cs - JDBC wrapper for the stored procedure
Parameters:
  parameters - parameter list for the stored procedure parameters to the stored procedure Map that contains returned results



extractReturnedResults
protected Map extractReturnedResults(CallableStatement cs, List updateCountParameters, List resultSetParameters, int updateCount) throws SQLException(Code)
Extract returned ResultSets from the completed stored procedure.
Parameters:
  cs - JDBC wrapper for the stored procedure
Parameters:
  updateCountParameters - Parameter list of declared update count parameters for the stored procedure
Parameters:
  resultSetParameters - Parameter list of declared resturn resultSet parameters for the stored procedure Map that contains returned results



getColumnMapRowMapper
protected RowMapper getColumnMapRowMapper()(Code)
Create a new RowMapper for reading columns as key-value pairs. the RowMapper to use
See Also:   ColumnMapRowMapper



getFetchSize
public int getFetchSize()(Code)
Return the fetch size specified for this JdbcTemplate.



getMaxRows
public int getMaxRows()(Code)
Return the maximum number of rows specified for this JdbcTemplate.



getNativeJdbcExtractor
public NativeJdbcExtractor getNativeJdbcExtractor()(Code)
Return the current NativeJdbcExtractor implementation.



getQueryTimeout
public int getQueryTimeout()(Code)
Return the query timeout for statements that this JdbcTemplate executes.



getSingleColumnRowMapper
protected RowMapper getSingleColumnRowMapper(Class requiredType)(Code)
Create a new RowMapper for reading result objects from a single column.
Parameters:
  requiredType - the type that each result object is expected to match the RowMapper to use
See Also:   SingleColumnRowMapper



handleWarnings
protected void handleWarnings(SQLWarning warning) throws SQLWarningException(Code)
Throw an SQLWarningException if we're not ignoring warnings, else log the warnings (at debug level).
Parameters:
  warning - the warnings object from the current statement.May be null, in which case this method does nothing.
throws:
  SQLWarningException - if not ignoring warnings
See Also:   org.springframework.jdbc.SQLWarningException



isIgnoreWarnings
public boolean isIgnoreWarnings()(Code)
Return whether or not we ignore SQLWarnings.



isResultsMapCaseInsensitive
public boolean isResultsMapCaseInsensitive()(Code)
Return whether execution of a CallableStatement will return the results in a Map that uses case insensitive names for the parameters.



isSkipResultsProcessing
public boolean isSkipResultsProcessing()(Code)
Return whether results processing should be skipped.



processResultSet
protected Map processResultSet(ResultSet rs, ResultSetSupportingSqlParameter param) throws SQLException(Code)
Process the given ResultSet from a stored procedure.
Parameters:
  rs - the ResultSet to process
Parameters:
  param - the corresponding stored procedure parameter Map that contains returned results



query
public Object query(String sql, ResultSetExtractor rse) throws DataAccessException(Code)



query
public void query(String sql, RowCallbackHandler rch) throws DataAccessException(Code)



query
public List query(String sql, RowMapper rowMapper) throws DataAccessException(Code)



query
public Object query(PreparedStatementCreator psc, PreparedStatementSetter pss, ResultSetExtractor rse) throws DataAccessException(Code)
Query using a prepared statement, allowing for a PreparedStatementCreator and a PreparedStatementSetter. Most other query methods use this method, but application code will always work with either a creator or a setter.
Parameters:
  psc - Callback handler that can create a PreparedStatement given aConnection
Parameters:
  pss - object that knows how to set values on the prepared statement.If this is null, the SQL will be assumed to contain no bind parameters.
Parameters:
  rse - object that will extract results. an arbitrary result object, as returned by the ResultSetExtractor
throws:
  DataAccessException - if there is any problem



query
public Object query(PreparedStatementCreator psc, ResultSetExtractor rse) throws DataAccessException(Code)



query
public Object query(String sql, PreparedStatementSetter pss, ResultSetExtractor rse) throws DataAccessException(Code)



query
public Object query(String sql, Object[] args, int[] argTypes, ResultSetExtractor rse) throws DataAccessException(Code)



query
public Object query(String sql, Object[] args, ResultSetExtractor rse) throws DataAccessException(Code)



query
public void query(PreparedStatementCreator psc, RowCallbackHandler rch) throws DataAccessException(Code)



query
public void query(String sql, PreparedStatementSetter pss, RowCallbackHandler rch) throws DataAccessException(Code)



query
public void query(String sql, Object[] args, int[] argTypes, RowCallbackHandler rch) throws DataAccessException(Code)



query
public void query(String sql, Object[] args, RowCallbackHandler rch) throws DataAccessException(Code)



query
public List query(PreparedStatementCreator psc, RowMapper rowMapper) throws DataAccessException(Code)



query
public List query(String sql, PreparedStatementSetter pss, RowMapper rowMapper) throws DataAccessException(Code)



query
public List query(String sql, Object[] args, int[] argTypes, RowMapper rowMapper) throws DataAccessException(Code)



query
public List query(String sql, Object[] args, RowMapper rowMapper) throws DataAccessException(Code)



queryForInt
public int queryForInt(String sql) throws DataAccessException(Code)



queryForInt
public int queryForInt(String sql, Object[] args, int[] argTypes) throws DataAccessException(Code)



queryForInt
public int queryForInt(String sql, Object[] args) throws DataAccessException(Code)



queryForList
public List queryForList(String sql, Class elementType) throws DataAccessException(Code)



queryForList
public List queryForList(String sql) throws DataAccessException(Code)



queryForList
public List queryForList(String sql, Object[] args, int[] argTypes, Class elementType) throws DataAccessException(Code)



queryForList
public List queryForList(String sql, Object[] args, Class elementType) throws DataAccessException(Code)



queryForList
public List queryForList(String sql, Object[] args, int[] argTypes) throws DataAccessException(Code)



queryForList
public List queryForList(String sql, Object[] args) throws DataAccessException(Code)



queryForLong
public long queryForLong(String sql) throws DataAccessException(Code)



queryForLong
public long queryForLong(String sql, Object[] args, int[] argTypes) throws DataAccessException(Code)



queryForLong
public long queryForLong(String sql, Object[] args) throws DataAccessException(Code)



queryForMap
public Map queryForMap(String sql) throws DataAccessException(Code)



queryForMap
public Map queryForMap(String sql, Object[] args, int[] argTypes) throws DataAccessException(Code)



queryForMap
public Map queryForMap(String sql, Object[] args) throws DataAccessException(Code)



queryForObject
public Object queryForObject(String sql, RowMapper rowMapper) throws DataAccessException(Code)



queryForObject
public Object queryForObject(String sql, Class requiredType) throws DataAccessException(Code)



queryForObject
public Object queryForObject(String sql, Object[] args, int[] argTypes, RowMapper rowMapper) throws DataAccessException(Code)



queryForObject
public Object queryForObject(String sql, Object[] args, RowMapper rowMapper) throws DataAccessException(Code)



queryForObject
public Object queryForObject(String sql, Object[] args, int[] argTypes, Class requiredType) throws DataAccessException(Code)



queryForObject
public Object queryForObject(String sql, Object[] args, Class requiredType) throws DataAccessException(Code)



queryForRowSet
public SqlRowSet queryForRowSet(String sql) throws DataAccessException(Code)



queryForRowSet
public SqlRowSet queryForRowSet(String sql, Object[] args, int[] argTypes) throws DataAccessException(Code)



queryForRowSet
public SqlRowSet queryForRowSet(String sql, Object[] args) throws DataAccessException(Code)



setFetchSize
public void setFetchSize(int fetchSize)(Code)
Set the fetch size for this JdbcTemplate. This is important for processing large result sets: Setting this higher than the default value will increase processing speed at the cost of memory consumption; setting this lower can avoid transferring row data that will never be read by the application.

Default is 0, indicating to use the JDBC driver's default.
See Also:   java.sql.Statement.setFetchSize




setIgnoreWarnings
public void setIgnoreWarnings(boolean ignoreWarnings)(Code)
Set whether or not we want to ignore SQLWarnings.

Default is "true", swallowing and logging all warnings. Switch this flag to "false" to make the JdbcTemplate throw a SQLWarningException instead.
See Also:   java.sql.SQLWarning
See Also:   org.springframework.jdbc.SQLWarningException
See Also:   JdbcTemplate.handleWarnings




setMaxRows
public void setMaxRows(int maxRows)(Code)
Set the maximum number of rows for this JdbcTemplate. This is important for processing subsets of large result sets, avoiding to read and hold the entire result set in the database or in the JDBC driver if we're never interested in the entire result in the first place (for example, when performing searches that might return a large number of matches).

Default is 0, indicating to use the JDBC driver's default.
See Also:   java.sql.Statement.setMaxRows




setNativeJdbcExtractor
public void setNativeJdbcExtractor(NativeJdbcExtractor extractor)(Code)
Set a NativeJdbcExtractor to extract native JDBC objects from wrapped handles. Useful if native Statement and/or ResultSet handles are expected for casting to database-specific implementation classes, but a connection pool that wraps JDBC objects is used (note: any pool will return wrapped Connections).



setQueryTimeout
public void setQueryTimeout(int queryTimeout)(Code)
Set the query timeout for statements that this JdbcTemplate executes.

Default is 0, indicating to use the JDBC driver's default.

Note: Any timeout specified here will be overridden by the remaining transaction timeout when executing within a transaction that has a timeout specified at the transaction level.
See Also:   java.sql.Statement.setQueryTimeout




setResultsMapCaseInsensitive
public void setResultsMapCaseInsensitive(boolean resultsMapCaseInsensitive)(Code)



setSkipResultsProcessing
public void setSkipResultsProcessing(boolean skipResultsProcessing)(Code)
Set whether results processing should be skipped. Can be used to optimize callable statement processing when we know that no results are being passed back - the processing of out parameter will still take place. This can be used to avoid a bug in some older Oracle JDBC drivers like 10.1.0.2.



update
public int update(String sql) throws DataAccessException(Code)



update
protected int update(PreparedStatementCreator psc, PreparedStatementSetter pss) throws DataAccessException(Code)



update
public int update(PreparedStatementCreator psc) throws DataAccessException(Code)



update
public int update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder) throws DataAccessException(Code)



update
public int update(String sql, PreparedStatementSetter pss) throws DataAccessException(Code)



update
public int update(String sql, Object[] args, int[] argTypes) throws DataAccessException(Code)



update
public int update(String sql, Object[] args) throws DataAccessException(Code)



Fields inherited from org.springframework.jdbc.support.JdbcAccessor
final protected Log logger(Code)(Java Doc)

Methods inherited from org.springframework.jdbc.support.JdbcAccessor
public void afterPropertiesSet()(Code)(Java Doc)
public DataSource getDataSource()(Code)(Java Doc)
public synchronized SQLExceptionTranslator getExceptionTranslator()(Code)(Java Doc)
public boolean isLazyInit()(Code)(Java Doc)
public void setDataSource(DataSource dataSource)(Code)(Java Doc)
public void setDatabaseProductName(String dbName)(Code)(Java Doc)
public void setExceptionTranslator(SQLExceptionTranslator exceptionTranslator)(Code)(Java Doc)
public void setLazyInit(boolean lazyInit)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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