Top Deprecated
Spring JDBC 6.1.4

Deprecated API


No API in this release is deprecated for removal.

Deprecated Item Summary

SinceDeprecated Item and Description
5.3.29

Returns:

an arbitrary result object, as returned by the ResultSetExtractor
org.springframework.jdbc.core.JdbcOperations.query
(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
ResultSetExtractor<T>
a callback that will extract results
rse
)

as of 5.3, in favor of query(String, ResultSetExtractor, Object...)

org.springframework.jdbc.core.JdbcOperations.query(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
RowCallbackHandler
a callback that will extract results, one row at a time
rch
)

as of 5.3, in favor of query(String, RowCallbackHandler, Object...)

Returns:

the result List, containing mapped objects
org.springframework.jdbc.core.JdbcOperations.query
(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
RowMapper<T>
a callback that will map one object per row
rowMapper
)

as of 5.3, in favor of query(String, RowMapper, Object...)

Returns:

a List of objects that match the specified element type
org.springframework.jdbc.core.JdbcOperations.queryForList
(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
Class<T>
the required type of element in the result list (for example, Integer.class)
elementType
)

as of 5.3, in favor of queryForList(String, Class, Object...)

Returns:

the single mapped object (may be null if the given RowMapper returned null)
org.springframework.jdbc.core.JdbcOperations.queryForObject
(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
RowMapper<T>
a callback that will map one object per row
rowMapper
)

as of 5.3, in favor of queryForObject(String, RowMapper, Object...)

Returns:

the result object of the required type, or null in case of SQL NULL
org.springframework.jdbc.core.JdbcOperations.queryForObject
(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
Class<T>
the type that the result object is expected to match
requiredType
)

as of 5.3, in favor of queryForObject(String, Class, Object...)

org.springframework.jdbc.core.JdbcTemplate.query(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
ResultSetExtractor<T>
a callback that will extract results
rse
)

org.springframework.jdbc.core.JdbcTemplate.query(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
RowCallbackHandler
a callback that will extract results, one row at a time
rch
)

org.springframework.jdbc.core.JdbcTemplate.query(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
RowMapper<T>
a callback that will map one object per row
rowMapper
)

org.springframework.jdbc.core.JdbcTemplate.queryForList(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
Class<T>
the required type of element in the result list (for example, Integer.class)
elementType
)

org.springframework.jdbc.core.JdbcTemplate.queryForObject(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
RowMapper<T>
a callback that will map one object per row
rowMapper
)

org.springframework.jdbc.core.JdbcTemplate.queryForObject(String
the SQL query to execute
sql
,
Object[]
arguments to bind to the query (leaving it to the PreparedStatement to guess the corresponding SQL type); may also contain SqlParameterValue objects which indicate not only the argument value but also the SQL type and optionally the scale
args
,
Class<T>
the type that the result object is expected to match
requiredType
)

org.springframework.jdbc.core.support.JdbcBeanDefinitionReader

as of 5.3, in favor of Spring's common bean definition formats and/or custom reader implementations

org.springframework.jdbc.core.support.JdbcBeanDefinitionReader.JdbcBeanDefinitionReader(PropertiesBeanDefinitionReader reader)

Deprecated as a consequence of PropertiesBeanDefinitionReader being deprecated. See corresponding docs for further information.

org.springframework.jdbc.core.support.JdbcBeanDefinitionReader.propReader

Deprecated as a consequence of PropertiesBeanDefinitionReader being deprecated. See corresponding docs for further information.

org.springframework.jdbc.datasource.DataSourceUtils.resetConnectionAfterTransaction(Connection
the Connection to reset
con
,
Integer
the isolation level to restore, if any
previousIsolationLevel
)

as of 5.1.11, in favor of resetConnectionAfterTransaction(Connection, Integer, boolean)

org.springframework.jdbc.support.DatabaseStartupValidator.setValidationQuery(String validationQuery)

as of 5.3, in favor of the JDBC 4.0 connection validation

Returns:

the object returned by the specified DatabaseMetaData method
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData
(DataSource
the DataSource to extract meta-data for
dataSource
,
final String
the name of the DatabaseMetaData method to call
metaDataMethodName
)

as of 5.2.9, in favor of extractDatabaseMetaData(DataSource, DatabaseMetaDataCallback) with a lambda expression or method reference and a generically typed result

6.1

Returns:

null if no custom translation applies, otherwise a DataAccessException resulting from custom translation. This exception should include the sqlEx parameter as a nested root cause. This implementation always returns null, meaning that the translator always falls back to the default error codes.
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.customTranslate
(String
readable text describing the task being attempted
task
,
String
the SQL query or update that caused the problem (may be null)
sql
,
SQLException
the offending SQLException
sqlEx
)

as of 6.1, in favor of setCustomTranslator