Spring Framework

org.springframework.jdbc.core.simple
Class SimpleJdbcTemplate

java.lang.Object
  extended by org.springframework.jdbc.core.simple.SimpleJdbcTemplate
All Implemented Interfaces:
SimpleJdbcOperations

Deprecated. since Spring 3.1 in favor of JdbcTemplate and NamedParameterJdbcTemplate. The JdbcTemplate and NamedParameterJdbcTemplate now provide all the functionality of the SimpleJdbcTemplate.

@Deprecated
public class SimpleJdbcTemplate
extends java.lang.Object
implements SimpleJdbcOperations

Java-5-based convenience wrapper for the classic Spring JdbcTemplate, taking advantage of varargs and autoboxing, and exposing only the most commonly required operations in order to simplify JdbcTemplate usage.

Use the getJdbcOperations() method (or a straight JdbcTemplate) if you need to invoke less commonly used template methods. This includes any methods specifying SQL types, methods using less commonly used callbacks such as RowCallbackHandler, updates with PreparedStatementSetters rather than argument arrays, and stored procedures as well as batch operations.

Since:
2.0
Author:
Rod Johnson, Rob Harrop, Juergen Hoeller, Thomas Risberg
See Also:
ParameterizedRowMapper, SimpleJdbcDaoSupport, JdbcTemplate

Constructor Summary
SimpleJdbcTemplate(javax.sql.DataSource dataSource)
          Deprecated. Create a new SimpleJdbcTemplate for the given DataSource.
SimpleJdbcTemplate(JdbcOperations classicJdbcTemplate)
          Deprecated. Create a new SimpleJdbcTemplate for the given classic Spring JdbcTemplate.
SimpleJdbcTemplate(NamedParameterJdbcOperations namedParameterJdbcTemplate)
          Deprecated. Create a new SimpleJdbcTemplate for the given Spring NamedParameterJdbcTemplate.
 
Method Summary
 int[] batchUpdate(java.lang.String sql, java.util.List<java.lang.Object[]> batchArgs)
          Deprecated. Execute a batch using the supplied SQL statement with the batch of supplied arguments.
 int[] batchUpdate(java.lang.String sql, java.util.List<java.lang.Object[]> batchArgs, int[] argTypes)
          Deprecated. Execute a batch using the supplied SQL statement with the batch of supplied arguments.
 int[] batchUpdate(java.lang.String sql, java.util.Map<java.lang.String,?>[] batchValues)
          Deprecated. Executes a batch using the supplied SQL statement with the batch of supplied arguments.
 int[] batchUpdate(java.lang.String sql, SqlParameterSource[] batchArgs)
          Deprecated. Execute a batch using the supplied SQL statement with the batch of supplied arguments.
 JdbcOperations getJdbcOperations()
          Deprecated. Expose the classic Spring JdbcTemplate to allow invocation of less commonly used methods.
 NamedParameterJdbcOperations getNamedParameterJdbcOperations()
          Deprecated. Expose the Spring NamedParameterJdbcTemplate to allow invocation of less commonly used methods.
<T> java.util.List<T>
query(java.lang.String sql, ParameterizedRowMapper<T> rm, java.util.Map<java.lang.String,?> args)
          Deprecated. 
<T> java.util.List<T>
query(java.lang.String sql, ParameterizedRowMapper<T> rm, java.lang.Object... args)
          Deprecated. 
<T> java.util.List<T>
query(java.lang.String sql, ParameterizedRowMapper<T> rm, SqlParameterSource args)
          Deprecated. 
<T> java.util.List<T>
query(java.lang.String sql, RowMapper<T> rm, java.util.Map<java.lang.String,?> args)
          Deprecated. Query for a List of Objects of type T using the supplied RowMapper to the query results to the object.
<T> java.util.List<T>
query(java.lang.String sql, RowMapper<T> rm, java.lang.Object... args)
          Deprecated. Query for a List of Objects of type T using the supplied RowMapper to the query results to the object.
<T> java.util.List<T>
query(java.lang.String sql, RowMapper<T> rm, SqlParameterSource args)
          Deprecated. Query for a List of Objects of type T using the supplied RowMapper to the query results to the object.
 int queryForInt(java.lang.String sql, java.util.Map<java.lang.String,?> args)
          Deprecated. Query for an int passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a map containing the arguments.
 int queryForInt(java.lang.String sql, java.lang.Object... args)
          Deprecated. Query for an int passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.
 int queryForInt(java.lang.String sql, SqlParameterSource args)
          Deprecated. Query for an int passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryForList(java.lang.String sql, java.util.Map<java.lang.String,?> args)
          Deprecated. Execute the supplied query with the supplied arguments.
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryForList(java.lang.String sql, java.lang.Object... args)
          Deprecated. Execute the supplied query with the (optional) supplied arguments.
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryForList(java.lang.String sql, SqlParameterSource args)
          Deprecated. Execute the supplied query with the supplied arguments.
 long queryForLong(java.lang.String sql, java.util.Map<java.lang.String,?> args)
          Deprecated. Query for an long passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a map containing the arguments.
 long queryForLong(java.lang.String sql, java.lang.Object... args)
          Deprecated. Query for an long passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.
 long queryForLong(java.lang.String sql, SqlParameterSource args)
          Deprecated. Query for an long passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.
 java.util.Map<java.lang.String,java.lang.Object> queryForMap(java.lang.String sql, java.util.Map<java.lang.String,?> args)
          Deprecated. Execute the supplied query with the supplied arguments.
 java.util.Map<java.lang.String,java.lang.Object> queryForMap(java.lang.String sql, java.lang.Object... args)
          Deprecated. Execute the supplied query with the (optional) supplied arguments.
 java.util.Map<java.lang.String,java.lang.Object> queryForMap(java.lang.String sql, SqlParameterSource args)
          Deprecated. Execute the supplied query with the supplied arguments.
<T> T
queryForObject(java.lang.String sql, java.lang.Class<T> requiredType, java.util.Map<java.lang.String,?> args)
          Deprecated. Query for an object of type T identified by the supplied @Class.
<T> T
queryForObject(java.lang.String sql, java.lang.Class<T> requiredType, java.lang.Object... args)
          Deprecated. Query for an object of type T identified by the supplied @Class.
<T> T
queryForObject(java.lang.String sql, java.lang.Class<T> requiredType, SqlParameterSource args)
          Deprecated. Query for an object of type T identified by the supplied @Class.
<T> T
queryForObject(java.lang.String sql, ParameterizedRowMapper<T> rm, java.util.Map<java.lang.String,?> args)
          Deprecated. 
<T> T
queryForObject(java.lang.String sql, ParameterizedRowMapper<T> rm, java.lang.Object... args)
          Deprecated. 
<T> T
queryForObject(java.lang.String sql, ParameterizedRowMapper<T> rm, SqlParameterSource args)
          Deprecated. 
<T> T
queryForObject(java.lang.String sql, RowMapper<T> rm, java.util.Map<java.lang.String,?> args)
          Deprecated. Query for an object of type T using the supplied RowMapper to the query results to the object.
<T> T
queryForObject(java.lang.String sql, RowMapper<T> rm, java.lang.Object... args)
          Deprecated. Query for an object of type T using the supplied RowMapper to the query results to the object.
<T> T
queryForObject(java.lang.String sql, RowMapper<T> rm, SqlParameterSource args)
          Deprecated. Query for an object of type T using the supplied RowMapper to the query results to the object.
 int update(java.lang.String sql, java.util.Map<java.lang.String,?> args)
          Deprecated. Execute the supplied SQL statement with (optional) supplied arguments.
 int update(java.lang.String sql, java.lang.Object... args)
          Deprecated. Execute the supplied SQL statement with supplied arguments.
 int update(java.lang.String sql, SqlParameterSource args)
          Deprecated. Execute the supplied SQL statement with supplied arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleJdbcTemplate

public SimpleJdbcTemplate(javax.sql.DataSource dataSource)
Deprecated. 
Create a new SimpleJdbcTemplate for the given DataSource.

Creates a classic Spring JdbcTemplate and wraps it.

Parameters:
dataSource - the JDBC DataSource to access

SimpleJdbcTemplate

public SimpleJdbcTemplate(JdbcOperations classicJdbcTemplate)
Deprecated. 
Create a new SimpleJdbcTemplate for the given classic Spring JdbcTemplate.

Parameters:
classicJdbcTemplate - the classic Spring JdbcTemplate to wrap

SimpleJdbcTemplate

public SimpleJdbcTemplate(NamedParameterJdbcOperations namedParameterJdbcTemplate)
Deprecated. 
Create a new SimpleJdbcTemplate for the given Spring NamedParameterJdbcTemplate.

Parameters:
namedParameterJdbcTemplate - the Spring NamedParameterJdbcTemplate to wrap
Method Detail

getJdbcOperations

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

Specified by:
getJdbcOperations in interface SimpleJdbcOperations

getNamedParameterJdbcOperations

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

Specified by:
getNamedParameterJdbcOperations in interface SimpleJdbcOperations

queryForInt

public int queryForInt(java.lang.String sql,
                       java.util.Map<java.lang.String,?> args)
                throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an int passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a map containing the arguments.

Specified by:
queryForInt in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run.
args - the map containing the arguments for the query
Throws:
DataAccessException

queryForInt

public int queryForInt(java.lang.String sql,
                       SqlParameterSource args)
                throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an int passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.

Specified by:
queryForInt in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run.
args - the SqlParameterSource containing the arguments for the query.
Throws:
DataAccessException

queryForInt

public int queryForInt(java.lang.String sql,
                       java.lang.Object... args)
                throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an int passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.

Specified by:
queryForInt in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run.
args - the variable number of arguments for the query
Throws:
DataAccessException

queryForLong

public long queryForLong(java.lang.String sql,
                         java.util.Map<java.lang.String,?> args)
                  throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an long passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a map containing the arguments.

Specified by:
queryForLong in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run.
args - the map containing the arguments for the query
Throws:
DataAccessException

queryForLong

public long queryForLong(java.lang.String sql,
                         SqlParameterSource args)
                  throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an long passing in a SQL query using the named parameter support provided by the NamedParameterJdbcTemplate and a SqlParameterSource containing the arguments.

Specified by:
queryForLong in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run.
args - the SqlParameterSource containing the arguments for the query
Throws:
DataAccessException

queryForLong

public long queryForLong(java.lang.String sql,
                         java.lang.Object... args)
                  throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an long passing in a SQL query using the standard '?' placeholders for parameters and a variable number of arguments.

Specified by:
queryForLong in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run.
args - the variable number of arguments for the query
Throws:
DataAccessException

queryForObject

public <T> T queryForObject(java.lang.String sql,
                            java.lang.Class<T> requiredType,
                            java.util.Map<java.lang.String,?> args)
                 throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an object of type T identified by the supplied @Class. Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
requiredType - the required type of the return value
args - the map containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, Class), JdbcOperations.queryForObject(String, Object[], Class)

queryForObject

public <T> T queryForObject(java.lang.String sql,
                            java.lang.Class<T> requiredType,
                            SqlParameterSource args)
                 throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an object of type T identified by the supplied @Class. Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
requiredType - the required type of the return value
args - the SqlParameterSource containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, Class), JdbcOperations.queryForObject(String, Object[], Class)

queryForObject

public <T> T queryForObject(java.lang.String sql,
                            java.lang.Class<T> requiredType,
                            java.lang.Object... args)
                 throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an object of type T identified by the supplied @Class. Uses sql with the standard '?' placeholders for parameters

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
requiredType - the required type of the return value
args - the variable number of arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, Class), JdbcOperations.queryForObject(String, Object[], Class)

queryForObject

public <T> T queryForObject(java.lang.String sql,
                            RowMapper<T> rm,
                            java.util.Map<java.lang.String,?> args)
                 throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an object of type T using the supplied RowMapper to the query results to the object. Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @RowMapper to use for result mapping
args - the map containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

queryForObject

@Deprecated
public <T> T queryForObject(java.lang.String sql,
                                       ParameterizedRowMapper<T> rm,
                                       java.util.Map<java.lang.String,?> args)
                 throws DataAccessException
Deprecated. 

Description copied from interface: SimpleJdbcOperations
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 NamedParameterJdbcTemplate

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @ParameterizedRowMapper to use for result mapping
args - the map containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

queryForObject

public <T> T queryForObject(java.lang.String sql,
                            RowMapper<T> rm,
                            SqlParameterSource args)
                 throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an object of type T using the supplied RowMapper to the query results to the object. Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @RowMapper to use for result mapping
args - the SqlParameterSource containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

queryForObject

@Deprecated
public <T> T queryForObject(java.lang.String sql,
                                       ParameterizedRowMapper<T> rm,
                                       SqlParameterSource args)
                 throws DataAccessException
Deprecated. 

Description copied from interface: SimpleJdbcOperations
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 NamedParameterJdbcTemplate

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @ParameterizedRowMapper to use for result mapping
args - the SqlParameterSource containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

queryForObject

public <T> T queryForObject(java.lang.String sql,
                            RowMapper<T> rm,
                            java.lang.Object... args)
                 throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for an object of type T using the supplied RowMapper to the query results to the object. Uses sql with the standard '?' placeholders for parameters

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @RowMapper to use for result mapping
args - the variable number of arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

queryForObject

@Deprecated
public <T> T queryForObject(java.lang.String sql,
                                       ParameterizedRowMapper<T> rm,
                                       java.lang.Object... args)
                 throws DataAccessException
Deprecated. 

Description copied from interface: SimpleJdbcOperations
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

Specified by:
queryForObject in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @ParameterizedRowMapper to use for result mapping
args - the variable number of arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

query

public <T> java.util.List<T> query(java.lang.String sql,
                                   RowMapper<T> rm,
                                   java.util.Map<java.lang.String,?> args)
                        throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for a List of Objects of type T using the supplied RowMapper to the query results to the object. Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
query in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @RowMapper to use for result mapping
args - the map containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

query

@Deprecated
public <T> java.util.List<T> query(java.lang.String sql,
                                              ParameterizedRowMapper<T> rm,
                                              java.util.Map<java.lang.String,?> args)
                        throws DataAccessException
Deprecated. 

Description copied from interface: SimpleJdbcOperations
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 NamedParameterJdbcTemplate

Specified by:
query in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @ParameterizedRowMapper to use for result mapping
args - the map containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

query

public <T> java.util.List<T> query(java.lang.String sql,
                                   RowMapper<T> rm,
                                   SqlParameterSource args)
                        throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for a List of Objects of type T using the supplied RowMapper to the query results to the object. Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
query in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @RowMapper to use for result mapping
args - the SqlParameterSource containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

query

@Deprecated
public <T> java.util.List<T> query(java.lang.String sql,
                                              ParameterizedRowMapper<T> rm,
                                              SqlParameterSource args)
                        throws DataAccessException
Deprecated. 

Description copied from interface: SimpleJdbcOperations
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 NamedParameterJdbcTemplate

Specified by:
query in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @ParameterizedRowMapper to use for result mapping
args - the SqlParameterSource containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

query

public <T> java.util.List<T> query(java.lang.String sql,
                                   RowMapper<T> rm,
                                   java.lang.Object... args)
                        throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Query for a List of Objects of type T using the supplied RowMapper to the query results to the object. Uses sql with the standard '?' placeholders for parameters

Specified by:
query in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @RowMapper to use for result mapping
args - the variable number of arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

query

@Deprecated
public <T> java.util.List<T> query(java.lang.String sql,
                                              ParameterizedRowMapper<T> rm,
                                              java.lang.Object... args)
                        throws DataAccessException
Deprecated. 

Description copied from interface: SimpleJdbcOperations
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

Specified by:
query in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
rm - the @ParameterizedRowMapper to use for result mapping
args - the variable number of arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForObject(String, org.springframework.jdbc.core.RowMapper), JdbcOperations.queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)

queryForMap

public java.util.Map<java.lang.String,java.lang.Object> queryForMap(java.lang.String sql,
                                                                    java.util.Map<java.lang.String,?> args)
                                                             throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
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 NamedParameterJdbcTemplate

Specified by:
queryForMap in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
args - the map containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForMap(String), JdbcOperations.queryForMap(String, Object[])

queryForMap

public java.util.Map<java.lang.String,java.lang.Object> queryForMap(java.lang.String sql,
                                                                    SqlParameterSource args)
                                                             throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
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 NamedParameterJdbcTemplate

Specified by:
queryForMap in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
args - the SqlParameterSource containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForMap(String), JdbcOperations.queryForMap(String, Object[])

queryForMap

public java.util.Map<java.lang.String,java.lang.Object> queryForMap(java.lang.String sql,
                                                                    java.lang.Object... args)
                                                             throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
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

Specified by:
queryForMap in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
args - the variable number of arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForMap(String), JdbcOperations.queryForMap(String, Object[])

queryForList

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryForList(java.lang.String sql,
                                                                                     java.util.Map<java.lang.String,?> args)
                                                                              throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Execute the supplied query with the supplied arguments.

Each element in the returned List is constructed as a Map as described in SimpleJdbcOperations.queryForMap(java.lang.String, java.util.Map) Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
queryForList in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
args - the map containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForList(String), JdbcOperations.queryForList(String, Object[])

queryForList

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryForList(java.lang.String sql,
                                                                                     SqlParameterSource args)
                                                                              throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Execute the supplied query with the supplied arguments.

Each element in the returned List is constructed as a Map as described in SimpleJdbcOperations.queryForMap(java.lang.String, java.util.Map) Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
queryForList in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
args - the SqlParameterSource containing the arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForList(String), JdbcOperations.queryForList(String, Object[])

queryForList

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryForList(java.lang.String sql,
                                                                                     java.lang.Object... args)
                                                                              throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
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(java.lang.String, java.util.Map) Uses sql with the standard '?' placeholders for parameters

Specified by:
queryForList in interface SimpleJdbcOperations
Parameters:
sql - the SQL query to run
args - the variable number of arguments for the query
Throws:
DataAccessException
See Also:
JdbcOperations.queryForList(String), JdbcOperations.queryForList(String, Object[])

update

public int update(java.lang.String sql,
                  java.util.Map<java.lang.String,?> args)
           throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Execute the supplied SQL statement with (optional) supplied arguments. Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
update in interface SimpleJdbcOperations
Parameters:
sql - the SQL statement to execute
args - the map containing the arguments for the query
Returns:
the numbers of rows affected by the update
Throws:
DataAccessException
See Also:
NamedParameterJdbcOperations.update(String, Map)

update

public int update(java.lang.String sql,
                  SqlParameterSource args)
           throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Execute the supplied SQL statement with supplied arguments. Uses sql with the named parameter support provided by the NamedParameterJdbcTemplate

Specified by:
update in interface SimpleJdbcOperations
Parameters:
sql - the SQL statement to execute
args - the SqlParameterSource containing the arguments for the statement
Returns:
the numbers of rows affected by the update
Throws:
DataAccessException
See Also:
NamedParameterJdbcOperations.update(String, SqlParameterSource)

update

public int update(java.lang.String sql,
                  java.lang.Object... args)
           throws DataAccessException
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Execute the supplied SQL statement with supplied arguments. Uses sql with the standard '?' placeholders for parameters

Specified by:
update in interface SimpleJdbcOperations
Parameters:
sql - the SQL statement to execute
args - the variable number of arguments for the query
Returns:
the numbers of rows affected by the update
Throws:
DataAccessException
See Also:
JdbcOperations.update(String), JdbcOperations.update(String, Object[])

batchUpdate

public int[] batchUpdate(java.lang.String sql,
                         java.util.List<java.lang.Object[]> batchArgs)
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Execute a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the standard '?' placeholders for parameters

Specified by:
batchUpdate in interface SimpleJdbcOperations
Parameters:
sql - the SQL statement to execute
batchArgs - the List of Object arrays containing the batch of arguments for the query
Returns:
an array containing the numbers of rows affected by each update in the batch

batchUpdate

public int[] batchUpdate(java.lang.String sql,
                         java.util.List<java.lang.Object[]> batchArgs,
                         int[] argTypes)
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Execute a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the standard '?' placeholders for parameters

Specified by:
batchUpdate in interface SimpleJdbcOperations
Parameters:
sql - the SQL statement to execute.
batchArgs - the List of Object arrays containing the batch of arguments for the query
argTypes - SQL types of the arguments (constants from java.sql.Types)
Returns:
an array containing the numbers of rows affected by each update in the batch

batchUpdate

public int[] batchUpdate(java.lang.String sql,
                         java.util.Map<java.lang.String,?>[] batchValues)
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Executes a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the named parameter support.

Specified by:
batchUpdate in interface SimpleJdbcOperations
Parameters:
sql - the SQL statement to execute
batchValues - the array of Maps containing the batch of arguments for the query
Returns:
an array containing the numbers of rows affected by each update in the batch

batchUpdate

public int[] batchUpdate(java.lang.String sql,
                         SqlParameterSource[] batchArgs)
Deprecated. 
Description copied from interface: SimpleJdbcOperations
Execute a batch using the supplied SQL statement with the batch of supplied arguments. Uses sql with the named parameter support.

Specified by:
batchUpdate in interface SimpleJdbcOperations
Parameters:
sql - the SQL statement to execute
batchArgs - the array of SqlParameterSource containing the batch of arguments for the query
Returns:
an array containing the numbers of rows affected by each update in the batch

Spring Framework