Package com.randomnoun.common.spring
Class JdbcTemplateWithArguments
java.lang.Object
org.springframework.jdbc.support.JdbcAccessor
org.springframework.jdbc.core.JdbcTemplate
com.randomnoun.common.spring.JdbcTemplateWithArguments
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,org.springframework.jdbc.core.JdbcOperations
A JdbcTemplate that can take SqlWithArguments objects as parameters.
This provides a bit of syntactic sugar so that you can write
jt.update(sqlWithArgs);instead of
jt.update(sqlWithArgs.getSql(), sqlWithArgs.getArgs(), sqlWithArgs.getArgTypes());
All JdbcTemplate methods that take String sql, Object[] args, int[] argTypes
parameters have an additional SqlWithArguments equivalent.
This class will also recognise SelectFromResultSetExtractors and SelectFromRowMappers and will add the appropriate SELECTs and FROMs to the SQL before it is executed.
- Author:
- knoxg
-
Field Summary
Fields inherited from class org.springframework.jdbc.support.JdbcAccessor
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
int[]
batchUpdate
(String... sql) <T> int[][]
batchUpdate
(String sql, Collection<T> batchArgs, int batchSize, org.springframework.jdbc.core.ParameterizedPreparedStatementSetter<T> pss) int[]
batchUpdate
(String sql, List<Object[]> batchArgs) int[]
batchUpdate
(String sql, List<Object[]> batchArgs, int[] argTypes) int[]
batchUpdate
(String sql, org.springframework.jdbc.core.BatchPreparedStatementSetter pss) call
(org.springframework.jdbc.core.CallableStatementCreator csc, List<org.springframework.jdbc.core.SqlParameter> declaredParameters) boolean
void
<T> T
<T> T
<T> T
execute
(org.springframework.jdbc.core.CallableStatementCreator csc, org.springframework.jdbc.core.CallableStatementCallback<T> action) <T> T
execute
(org.springframework.jdbc.core.ConnectionCallback<T> action) <T> T
execute
(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.PreparedStatementCallback<T> action) <T> T
execute
(org.springframework.jdbc.core.StatementCallback<T> action) org.springframework.jdbc.support.SQLExceptionTranslator
int
int
int
int
hashCode()
boolean
boolean
boolean
boolean
boolean
<T> T
query
(SqlWithArguments sqlWithArgs, org.springframework.jdbc.core.ResultSetExtractor<T> rse) CallsJdbcTemplate.query(String, Object[], ResultSetExtractor)
void
query
(SqlWithArguments sqlWithArgs, org.springframework.jdbc.core.RowCallbackHandler rch) CallsJdbcTemplate.query(String, Object[], int[], RowCallbackHandler)
<T> List
<T> query
(SqlWithArguments sqlWithArgs, org.springframework.jdbc.core.RowMapper<T> rowMapper) CallsJdbcTemplate.query(String, Object[], RowMapper)
<T> T
query
(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.ResultSetExtractor<T> rse) void
query
(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.RowCallbackHandler rch) <T> List
<T> query
(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.RowMapper<T> rowMapper) <T> T
void
<T> List
<T> <T> T
query
(String sql, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.ResultSetExtractor<T> rse) void
query
(String sql, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.RowCallbackHandler rch) <T> List
<T> query
(String sql, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.RowMapper<T> rowMapper) <T> T
<T> T
void
void
<T> List
<T> <T> List
<T> <T> T
query
(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.ResultSetExtractor<T> rse) <T> T
query
(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.ResultSetExtractor<T> rse) void
query
(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.RowCallbackHandler rch) <T> List
<T> query
(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.RowMapper<T> rowMapper) queryForList
(SqlWithArguments sqlWithArgs) CallsJdbcTemplate.queryForList(String, Object[], int[])
<T> List
<T> queryForList
(SqlWithArguments sqlWithArgs, Class<T> elementType) CallsJdbcTemplate.queryForList(String, Object[], int[], Class)
queryForList
(String sql) <T> List
<T> queryForList
(String sql, Class<T> elementType) <T> List
<T> queryForList
(String sql, Class<T> elementType, Object... args) queryForList
(String sql, Object... args) queryForList
(String sql, Object[] args, int[] argTypes) <T> List
<T> queryForList
(String sql, Object[] args, int[] argTypes, Class<T> elementType) <T> List
<T> queryForList
(String sql, Object[] args, Class<T> elementType) queryForMap
(SqlWithArguments sqlWithArgs) CallsJdbcTemplate.queryForMap(String, Object[], int[])
queryForMap
(String sql) queryForMap
(String sql, Object... args) queryForMap
(String sql, Object[] args, int[] argTypes) <T> T
queryForObject
(SqlWithArguments sqlWithArgs, Class<T> requiredType) CallsJdbcTemplate.queryForObject(String, Object[], int[], Class)
<T> T
queryForObject
(String sql, Class<T> requiredType) <T> T
queryForObject
(String sql, Class<T> requiredType, Object... args) <T> T
queryForObject
(String sql, Object[] args, int[] argTypes, Class<T> requiredType) <T> T
queryForObject
(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.RowMapper<T> rowMapper) <T> T
queryForObject
(String sql, Object[] args, Class<T> requiredType) <T> T
queryForObject
(String sql, Object[] args, org.springframework.jdbc.core.RowMapper<T> rowMapper) <T> T
queryForObject
(String sql, org.springframework.jdbc.core.RowMapper<T> rowMapper) <T> T
queryForObject
(String sql, org.springframework.jdbc.core.RowMapper<T> rowMapper, Object... args) org.springframework.jdbc.support.rowset.SqlRowSet
queryForRowSet
(SqlWithArguments sqlWithArgs) CallsJdbcTemplate.queryForRowSet(String, Object[], int[])
org.springframework.jdbc.support.rowset.SqlRowSet
queryForRowSet
(String sql) org.springframework.jdbc.support.rowset.SqlRowSet
queryForRowSet
(String sql, Object... args) org.springframework.jdbc.support.rowset.SqlRowSet
queryForRowSet
(String sql, Object[] args, int[] argTypes) void
setDatabaseProductName
(String dbName) void
setDataSource
(DataSource dataSource) void
setExceptionTranslator
(org.springframework.jdbc.support.SQLExceptionTranslator exceptionTranslator) void
setFetchSize
(int fetchSize) void
setIgnoreWarnings
(boolean ignoreWarnings) void
setLazyInit
(boolean lazyInit) void
setMaxRows
(int maxRows) void
setQueryTimeout
(int queryTimeout) void
setResultsMapCaseInsensitive
(boolean resultsMapCaseInsensitive) void
setSkipResultsProcessing
(boolean skipResultsProcessing) void
setSkipUndeclaredResults
(boolean skipUndeclaredResults) toString()
int
update
(SqlWithArguments sqlWithArgs) CallsJdbcTemplate.update(String, Object[], int[])
int
int
int
int
int
update
(org.springframework.jdbc.core.PreparedStatementCreator psc) int
update
(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.support.KeyHolder generatedKeyHolder) Methods inherited from class org.springframework.jdbc.core.JdbcTemplate
applyStatementSettings, batchUpdate, createConnectionProxy, createResultsMap, extractOutputParameters, extractReturnedResults, getColumnMapRowMapper, getSingleColumnRowMapper, handleWarnings, handleWarnings, handleWarnings, newArgPreparedStatementSetter, newArgTypePreparedStatementSetter, processResultSet, queryForStream, queryForStream, queryForStream, queryForStream, queryForStream, translateException, update
Methods inherited from class org.springframework.jdbc.support.JdbcAccessor
obtainDataSource
-
Constructor Details
-
JdbcTemplateWithArguments
-
-
Method Details
-
setDataSource
- Overrides:
setDataSource
in classorg.springframework.jdbc.support.JdbcAccessor
-
hashCode
-
getDataSource
- Overrides:
getDataSource
in classorg.springframework.jdbc.support.JdbcAccessor
-
setDatabaseProductName
- Overrides:
setDatabaseProductName
in classorg.springframework.jdbc.support.JdbcAccessor
-
setExceptionTranslator
public void setExceptionTranslator(org.springframework.jdbc.support.SQLExceptionTranslator exceptionTranslator) - Overrides:
setExceptionTranslator
in classorg.springframework.jdbc.support.JdbcAccessor
-
getExceptionTranslator
- Overrides:
getExceptionTranslator
in classorg.springframework.jdbc.support.JdbcAccessor
-
equals
-
setLazyInit
- Overrides:
setLazyInit
in classorg.springframework.jdbc.support.JdbcAccessor
-
isLazyInit
- Overrides:
isLazyInit
in classorg.springframework.jdbc.support.JdbcAccessor
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classorg.springframework.jdbc.support.JdbcAccessor
-
setIgnoreWarnings
- Overrides:
setIgnoreWarnings
in classorg.springframework.jdbc.core.JdbcTemplate
-
isIgnoreWarnings
- Overrides:
isIgnoreWarnings
in classorg.springframework.jdbc.core.JdbcTemplate
-
setFetchSize
- Overrides:
setFetchSize
in classorg.springframework.jdbc.core.JdbcTemplate
-
getFetchSize
- Overrides:
getFetchSize
in classorg.springframework.jdbc.core.JdbcTemplate
-
setMaxRows
- Overrides:
setMaxRows
in classorg.springframework.jdbc.core.JdbcTemplate
-
toString
-
getMaxRows
- Overrides:
getMaxRows
in classorg.springframework.jdbc.core.JdbcTemplate
-
setQueryTimeout
- Overrides:
setQueryTimeout
in classorg.springframework.jdbc.core.JdbcTemplate
-
getQueryTimeout
- Overrides:
getQueryTimeout
in classorg.springframework.jdbc.core.JdbcTemplate
-
setSkipResultsProcessing
- Overrides:
setSkipResultsProcessing
in classorg.springframework.jdbc.core.JdbcTemplate
-
isSkipResultsProcessing
- Overrides:
isSkipResultsProcessing
in classorg.springframework.jdbc.core.JdbcTemplate
-
setSkipUndeclaredResults
- Overrides:
setSkipUndeclaredResults
in classorg.springframework.jdbc.core.JdbcTemplate
-
isSkipUndeclaredResults
- Overrides:
isSkipUndeclaredResults
in classorg.springframework.jdbc.core.JdbcTemplate
-
setResultsMapCaseInsensitive
- Overrides:
setResultsMapCaseInsensitive
in classorg.springframework.jdbc.core.JdbcTemplate
-
isResultsMapCaseInsensitive
- Overrides:
isResultsMapCaseInsensitive
in classorg.springframework.jdbc.core.JdbcTemplate
-
execute
public <T> T execute(org.springframework.jdbc.core.ConnectionCallback<T> action) throws org.springframework.dao.DataAccessException - Specified by:
execute
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
execute
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
execute
public <T> T execute(org.springframework.jdbc.core.StatementCallback<T> action) throws org.springframework.dao.DataAccessException - Specified by:
execute
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
execute
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
execute
- Specified by:
execute
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
execute
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> T query(String sql, org.springframework.jdbc.core.ResultSetExtractor<T> rse) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public void query(String sql, org.springframework.jdbc.core.RowCallbackHandler rch) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> List<T> query(String sql, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForMap
public Map<String,Object> queryForMap(String sql) throws org.springframework.dao.DataAccessException - Specified by:
queryForMap
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForMap
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForObject
public <T> T queryForObject(String sql, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException - Specified by:
queryForObject
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForObject
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForObject
public <T> T queryForObject(String sql, Class<T> requiredType) throws org.springframework.dao.DataAccessException - Specified by:
queryForObject
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForObject
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForList
public <T> List<T> queryForList(String sql, Class<T> elementType) throws org.springframework.dao.DataAccessException - Specified by:
queryForList
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForList
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForList
public List<Map<String,Object>> queryForList(String sql) throws org.springframework.dao.DataAccessException - Specified by:
queryForList
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForList
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForRowSet
public org.springframework.jdbc.support.rowset.SqlRowSet queryForRowSet(String sql) throws org.springframework.dao.DataAccessException - Specified by:
queryForRowSet
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForRowSet
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
update
- Specified by:
update
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
update
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
batchUpdate
- Specified by:
batchUpdate
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
batchUpdate
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
execute
public <T> T execute(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.PreparedStatementCallback<T> action) throws org.springframework.dao.DataAccessException - Specified by:
execute
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
execute
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
execute
public <T> T execute(String sql, org.springframework.jdbc.core.PreparedStatementCallback<T> action) throws org.springframework.dao.DataAccessException - Specified by:
execute
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
execute
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> T query(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.ResultSetExtractor<T> rse) throws org.springframework.dao.DataAccessException - Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> T query(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.ResultSetExtractor<T> rse) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> T query(String sql, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.ResultSetExtractor<T> rse) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> T query(SqlWithArguments sqlWithArgs, org.springframework.jdbc.core.ResultSetExtractor<T> rse) throws org.springframework.dao.DataAccessException CallsJdbcTemplate.query(String, Object[], ResultSetExtractor)
- Throws:
org.springframework.dao.DataAccessException
- See Also:
-
query
public <T> T query(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.ResultSetExtractor<T> rse) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> T query(String sql, Object[] args, org.springframework.jdbc.core.ResultSetExtractor<T> rse) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> T query(String sql, org.springframework.jdbc.core.ResultSetExtractor<T> rse, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public void query(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.RowCallbackHandler rch) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public void query(String sql, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.RowCallbackHandler rch) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public void query(SqlWithArguments sqlWithArgs, org.springframework.jdbc.core.RowCallbackHandler rch) throws org.springframework.dao.DataAccessException CallsJdbcTemplate.query(String, Object[], int[], RowCallbackHandler)
- Throws:
org.springframework.dao.DataAccessException
- See Also:
-
query
public void query(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.RowCallbackHandler rch) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public void query(String sql, Object[] args, org.springframework.jdbc.core.RowCallbackHandler rch) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public void query(String sql, org.springframework.jdbc.core.RowCallbackHandler rch, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> List<T> query(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> List<T> query(String sql, org.springframework.jdbc.core.PreparedStatementSetter pss, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> List<T> query(SqlWithArguments sqlWithArgs, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException CallsJdbcTemplate.query(String, Object[], RowMapper)
- Throws:
org.springframework.dao.DataAccessException
- See Also:
-
query
public <T> List<T> query(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> List<T> query(String sql, Object[] args, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
query
public <T> List<T> query(String sql, org.springframework.jdbc.core.RowMapper<T> rowMapper, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
query
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
query
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForObject
public <T> T queryForObject(String sql, Object[] args, int[] argTypes, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException - Specified by:
queryForObject
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForObject
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForObject
public <T> T queryForObject(String sql, Object[] args, org.springframework.jdbc.core.RowMapper<T> rowMapper) throws org.springframework.dao.DataAccessException - Specified by:
queryForObject
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForObject
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForObject
public <T> T queryForObject(String sql, org.springframework.jdbc.core.RowMapper<T> rowMapper, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
queryForObject
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForObject
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForObject
public <T> T queryForObject(SqlWithArguments sqlWithArgs, Class<T> requiredType) throws org.springframework.dao.DataAccessException CallsJdbcTemplate.queryForObject(String, Object[], int[], Class)
- Throws:
org.springframework.dao.DataAccessException
- See Also:
-
queryForObject
public <T> T queryForObject(String sql, Object[] args, int[] argTypes, Class<T> requiredType) throws org.springframework.dao.DataAccessException - Specified by:
queryForObject
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForObject
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForObject
public <T> T queryForObject(String sql, Object[] args, Class<T> requiredType) throws org.springframework.dao.DataAccessException - Specified by:
queryForObject
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForObject
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForObject
public <T> T queryForObject(String sql, Class<T> requiredType, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
queryForObject
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForObject
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForMap
public Map<String,Object> queryForMap(SqlWithArguments sqlWithArgs) throws org.springframework.dao.DataAccessException CallsJdbcTemplate.queryForMap(String, Object[], int[])
- Throws:
org.springframework.dao.DataAccessException
- See Also:
-
queryForMap
public Map<String,Object> queryForMap(String sql, Object[] args, int[] argTypes) throws org.springframework.dao.DataAccessException - Specified by:
queryForMap
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForMap
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForMap
public Map<String,Object> queryForMap(String sql, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
queryForMap
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForMap
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForList
public <T> List<T> queryForList(SqlWithArguments sqlWithArgs, Class<T> elementType) throws org.springframework.dao.DataAccessException CallsJdbcTemplate.queryForList(String, Object[], int[], Class)
- Throws:
org.springframework.dao.DataAccessException
-
queryForList
public <T> List<T> queryForList(String sql, Object[] args, int[] argTypes, Class<T> elementType) throws org.springframework.dao.DataAccessException - Specified by:
queryForList
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForList
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForList
public <T> List<T> queryForList(String sql, Object[] args, Class<T> elementType) throws org.springframework.dao.DataAccessException - Specified by:
queryForList
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForList
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForList
public <T> List<T> queryForList(String sql, Class<T> elementType, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
queryForList
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForList
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForList
public List<Map<String,Object>> queryForList(SqlWithArguments sqlWithArgs) throws org.springframework.dao.DataAccessException CallsJdbcTemplate.queryForList(String, Object[], int[])
- Throws:
org.springframework.dao.DataAccessException
- See Also:
-
queryForList
public List<Map<String,Object>> queryForList(String sql, Object[] args, int[] argTypes) throws org.springframework.dao.DataAccessException - Specified by:
queryForList
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForList
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForList
public List<Map<String,Object>> queryForList(String sql, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
queryForList
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForList
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForRowSet
public org.springframework.jdbc.support.rowset.SqlRowSet queryForRowSet(SqlWithArguments sqlWithArgs) throws org.springframework.dao.DataAccessException CallsJdbcTemplate.queryForRowSet(String, Object[], int[])
- Throws:
org.springframework.dao.DataAccessException
- See Also:
-
queryForRowSet
public org.springframework.jdbc.support.rowset.SqlRowSet queryForRowSet(String sql, Object[] args, int[] argTypes) throws org.springframework.dao.DataAccessException - Specified by:
queryForRowSet
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForRowSet
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
queryForRowSet
public org.springframework.jdbc.support.rowset.SqlRowSet queryForRowSet(String sql, Object... args) throws org.springframework.dao.DataAccessException - Specified by:
queryForRowSet
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
queryForRowSet
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
update
public int update(org.springframework.jdbc.core.PreparedStatementCreator psc) throws org.springframework.dao.DataAccessException - Specified by:
update
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
update
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
update
public int update(org.springframework.jdbc.core.PreparedStatementCreator psc, org.springframework.jdbc.support.KeyHolder generatedKeyHolder) throws org.springframework.dao.DataAccessException - Specified by:
update
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
update
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
update
public int update(String sql, org.springframework.jdbc.core.PreparedStatementSetter pss) throws org.springframework.dao.DataAccessException - Specified by:
update
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
update
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
update
CallsJdbcTemplate.update(String, Object[], int[])
- Throws:
org.springframework.dao.DataAccessException
- See Also:
-
update
public int update(String sql, Object[] args, int[] argTypes) throws org.springframework.dao.DataAccessException - Specified by:
update
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
update
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
update
- Specified by:
update
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
update
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
batchUpdate
public int[] batchUpdate(String sql, org.springframework.jdbc.core.BatchPreparedStatementSetter pss) throws org.springframework.dao.DataAccessException - Specified by:
batchUpdate
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
batchUpdate
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
batchUpdate
public int[] batchUpdate(String sql, List<Object[]> batchArgs) throws org.springframework.dao.DataAccessException - Specified by:
batchUpdate
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
batchUpdate
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
batchUpdate
public int[] batchUpdate(String sql, List<Object[]> batchArgs, int[] argTypes) throws org.springframework.dao.DataAccessException - Specified by:
batchUpdate
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
batchUpdate
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
batchUpdate
public <T> int[][] batchUpdate(String sql, Collection<T> batchArgs, int batchSize, org.springframework.jdbc.core.ParameterizedPreparedStatementSetter<T> pss) throws org.springframework.dao.DataAccessException - Specified by:
batchUpdate
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
batchUpdate
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
execute
public <T> T execute(org.springframework.jdbc.core.CallableStatementCreator csc, org.springframework.jdbc.core.CallableStatementCallback<T> action) throws org.springframework.dao.DataAccessException - Specified by:
execute
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
execute
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
execute
public <T> T execute(String callString, org.springframework.jdbc.core.CallableStatementCallback<T> action) throws org.springframework.dao.DataAccessException - Specified by:
execute
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
execute
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-
call
public Map<String,Object> call(org.springframework.jdbc.core.CallableStatementCreator csc, List<org.springframework.jdbc.core.SqlParameter> declaredParameters) throws org.springframework.dao.DataAccessException - Specified by:
call
in interfaceorg.springframework.jdbc.core.JdbcOperations
- Overrides:
call
in classorg.springframework.jdbc.core.JdbcTemplate
- Throws:
org.springframework.dao.DataAccessException
-