| org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations
All known Subclasses: org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate,
Method Summary | |
Object | execute(String sql, SqlParameterSource paramSource, PreparedStatementCallback action) Execute a JDBC data access operation, implemented as callback action
working on a JDBC PreparedStatement. | Object | execute(String sql, Map paramMap, PreparedStatementCallback action) Execute a JDBC data access operation, implemented as callback action
working on a JDBC PreparedStatement. | JdbcOperations | getJdbcOperations() Expose the classic Spring JdbcTemplate to allow invocation of
classic JDBC operations. | Object | query(String sql, SqlParameterSource paramSource, ResultSetExtractor rse) Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, reading the ResultSet with a
ResultSetExtractor. | Object | query(String sql, Map paramMap, ResultSetExtractor rse) Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, reading the ResultSet with a
ResultSetExtractor. | void | query(String sql, SqlParameterSource paramSource, RowCallbackHandler rch) Query given SQL to create a prepared statement from SQL and a list of
arguments to bind to the query, reading the ResultSet on a per-row basis
with a RowCallbackHandler. | void | query(String sql, Map paramMap, RowCallbackHandler rch) Query given SQL to create a prepared statement from SQL and a list of
arguments to bind to the query, reading the ResultSet on a per-row basis
with a RowCallbackHandler. | List | query(String sql, SqlParameterSource paramSource, RowMapper rowMapper) Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, mapping each row to a Java object
via a RowMapper. | List | query(String sql, Map paramMap, RowMapper rowMapper) Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, mapping each row to a Java object
via a RowMapper. | int | queryForInt(String sql, SqlParameterSource paramSource) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, resulting in an int value. | int | queryForInt(String sql, Map paramMap) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, resulting in an int value. | List | queryForList(String sql, SqlParameterSource paramSource, Class elementType) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result list. | List | queryForList(String sql, Map paramMap, Class elementType) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result list. | List | queryForList(String sql, SqlParameterSource paramSource) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result list. | List | queryForList(String sql, Map paramMap) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result list. | long | queryForLong(String sql, SqlParameterSource paramSource) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, resulting in a long value. | long | queryForLong(String sql, Map paramMap) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, resulting in a long value. | Map | queryForMap(String sql, SqlParameterSource paramSource) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result Map. | Map | queryForMap(String sql, Map paramMap) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result Map.
The queryForMap() methods defined by this interface are appropriate
when you don't have a domain model. | Object | queryForObject(String sql, SqlParameterSource paramSource, RowMapper rowMapper) Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, mapping a single result row to a
Java object via a RowMapper. | Object | queryForObject(String sql, Map paramMap, RowMapper rowMapper) Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, mapping a single result row to a
Java object via a RowMapper. | Object | queryForObject(String sql, SqlParameterSource paramSource, Class requiredType) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result object. | Object | queryForObject(String sql, Map paramMap, Class requiredType) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result object. | SqlRowSet | queryForRowSet(String sql, SqlParameterSource paramSource) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a SqlRowSet.
The results will be mapped to an SqlRowSet which holds the data in a
disconnected fashion. | SqlRowSet | queryForRowSet(String sql, Map paramMap) Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a SqlRowSet.
The results will be mapped to an SqlRowSet which holds the data in a
disconnected fashion. | int | update(String sql, SqlParameterSource paramSource) Issue an update via a prepared statement, binding the given arguments. | int | update(String sql, Map paramMap) Issue an update via a prepared statement, binding the given arguments. | int | update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder) Issue an update via a prepared statement, binding the given arguments,
returning generated keys. | int | update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder, String[] keyColumnNames) Issue an update via a prepared statement, binding the given arguments,
returning generated keys. |
execute | Object execute(String sql, SqlParameterSource paramSource, PreparedStatementCallback action) throws DataAccessException(Code) | | Execute a JDBC data access operation, implemented as callback action
working on a JDBC PreparedStatement. This allows for implementing arbitrary
data access operations on a single Statement, within Spring's managed
JDBC environment: that is, participating in Spring-managed transactions
and converting JDBC SQLExceptions into Spring's DataAccessException hierarchy.
The callback action can return a result object, for example a
domain object or a collection of domain objects.
Parameters: sql - SQL to execute Parameters: paramSource - container of arguments to bind to the query Parameters: action - callback object that specifies the action a result object returned by the action, or null throws: DataAccessException - if there is any problem |
execute | Object execute(String sql, Map paramMap, PreparedStatementCallback action) throws DataAccessException(Code) | | Execute a JDBC data access operation, implemented as callback action
working on a JDBC PreparedStatement. This allows for implementing arbitrary
data access operations on a single Statement, within Spring's managed
JDBC environment: that is, participating in Spring-managed transactions
and converting JDBC SQLExceptions into Spring's DataAccessException hierarchy.
The callback action can return a result object, for example a
domain object or a collection of domain objects.
Parameters: sql - SQL to execute Parameters: paramMap - map of parameters to bind to the query(leaving it to the PreparedStatement to guess the corresponding SQL type) Parameters: action - callback object that specifies the action a result object returned by the action, or null throws: DataAccessException - if there is any problem |
getJdbcOperations | JdbcOperations getJdbcOperations()(Code) | | Expose the classic Spring JdbcTemplate to allow invocation of
classic JDBC operations.
|
query | Object query(String sql, SqlParameterSource paramSource, ResultSetExtractor rse) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, reading the ResultSet with a
ResultSetExtractor.
Parameters: sql - SQL query to execute Parameters: paramSource - container of arguments to bind to the query Parameters: rse - object that will extract results an arbitrary result object, as returned by the ResultSetExtractor throws: DataAccessException - if the query fails |
query | Object query(String sql, Map paramMap, ResultSetExtractor rse) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, reading the ResultSet with a
ResultSetExtractor.
Parameters: sql - SQL query to execute Parameters: paramMap - map of parameters to bind to the query(leaving it to the PreparedStatement to guess the corresponding SQL type) Parameters: rse - object that will extract results an arbitrary result object, as returned by the ResultSetExtractor throws: org.springframework.dao.DataAccessException - if the query fails |
query | void query(String sql, SqlParameterSource paramSource, RowCallbackHandler rch) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a list of
arguments to bind to the query, reading the ResultSet on a per-row basis
with a RowCallbackHandler.
Parameters: sql - SQL query to execute Parameters: paramSource - container of arguments to bind to the query Parameters: rch - object that will extract results, one row at a time throws: DataAccessException - if the query fails |
query | void query(String sql, Map paramMap, RowCallbackHandler rch) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a list of
arguments to bind to the query, reading the ResultSet on a per-row basis
with a RowCallbackHandler.
Parameters: sql - SQL query to execute Parameters: paramMap - map of parameters to bind to the query(leaving it to the PreparedStatement to guess the corresponding SQL type) Parameters: rch - object that will extract results, one row at a time throws: org.springframework.dao.DataAccessException - if the query fails |
query | List query(String sql, SqlParameterSource paramSource, RowMapper rowMapper) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, mapping each row to a Java object
via a RowMapper.
Parameters: sql - SQL query to execute Parameters: paramSource - container of arguments to bind to the query Parameters: rowMapper - object that will map one object per row the result List, containing mapped objects throws: org.springframework.dao.DataAccessException - if the query fails |
query | List query(String sql, Map paramMap, RowMapper rowMapper) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, mapping each row to a Java object
via a RowMapper.
Parameters: sql - SQL query to execute Parameters: paramMap - map of parameters to bind to the query(leaving it to the PreparedStatement to guess the corresponding SQL type) Parameters: rowMapper - object that will map one object per row the result List, containing mapped objects throws: org.springframework.dao.DataAccessException - if the query fails |
queryForList | List queryForList(String sql, Map paramMap) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a result list.
The results will be mapped to a List (one entry for each row) of
Maps (one entry for each column, using the column name as the key).
Each element in the list will be of the form returned by this interface's
queryForMap() methods.
Parameters: sql - SQL query to execute Parameters: paramMap - map of parameters to bind to the query(leaving it to the PreparedStatement to guess the corresponding SQL type) a List that contains a Map per row throws: org.springframework.dao.DataAccessException - if the query fails See Also: org.springframework.jdbc.core.JdbcTemplate.queryForList(String) |
queryForObject | Object queryForObject(String sql, Map paramMap, RowMapper rowMapper) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a list
of arguments to bind to the query, mapping a single result row to a
Java object via a RowMapper.
Parameters: sql - SQL query to execute Parameters: paramMap - map of parameters to bind to the query(leaving it to the PreparedStatement to guess the corresponding SQL type) Parameters: rowMapper - object that will map one object per row the single mapped object throws: org.springframework.dao.IncorrectResultSizeDataAccessException - if the query does not return exactly one row, or does not return exactlyone column in that row throws: org.springframework.dao.DataAccessException - if the query fails |
queryForRowSet | SqlRowSet queryForRowSet(String sql, Map paramMap) throws DataAccessException(Code) | | Query given SQL to create a prepared statement from SQL and a
list of arguments to bind to the query, expecting a SqlRowSet.
The results will be mapped to an SqlRowSet which holds the data in a
disconnected fashion. This wrapper will translate any SQLExceptions thrown.
Note that that, for the default implementation, JDBC RowSet support needs to
be available at runtime: by default, Sun's com.sun.rowset.CachedRowSetImpl
class is used, which is part of JDK 1.5+ and also available separately as part of
Sun's JDBC RowSet Implementations download (rowset.jar).
Parameters: sql - SQL query to execute Parameters: paramMap - map of parameters to bind to the query(leaving it to the PreparedStatement to guess the corresponding SQL type) a SqlRowSet representation (possibly a wrapper around ajavax.sql.rowset.CachedRowSet ) throws: org.springframework.dao.DataAccessException - if there is any problem executing the query See Also: org.springframework.jdbc.core.JdbcTemplate.queryForRowSet(String) See Also: org.springframework.jdbc.core.SqlRowSetResultSetExtractor See Also: javax.sql.rowset.CachedRowSet |
update | int update(String sql, Map paramMap) throws DataAccessException(Code) | | Issue an update via a prepared statement, binding the given arguments.
Parameters: sql - SQL containing named parameters Parameters: paramMap - map of parameters to bind to the query(leaving it to the PreparedStatement to guess the corresponding SQL type) the number of rows affected throws: org.springframework.dao.DataAccessException - if there is any problem issuing the update |
|
|