Uses of Class
org.springframework.dao.DataAccessException
Packages that use DataAccessException
Package
Description
Exception hierarchy enabling sophisticated error handling independent
of the data access approach in use.
Support classes for DAO implementations,
providing miscellaneous utility methods.
The classes in this package make JDBC easier to use and
reduce the likelihood of common errors.
Provides the core JDBC framework, based on JdbcTemplate
and its associated callback interfaces and helper objects.
JdbcTemplate variant with named parameter support.
Classes supporting the
org.springframework.jdbc.core package.Provides extensible support for initializing databases through scripts.
Provides a strategy for looking up JDBC DataSources by name.
The classes in this package represent RDBMS queries, updates, and stored
procedures as threadsafe, reusable objects.
Support classes for the JDBC framework, used by the classes in the
jdbc.core and jdbc.object packages.
Provides a support framework for incrementing database table values
via sequences, with implementations for various databases.
Abstraction for handling fields of SQLXML data type.
Root package for Spring's O/R Mapping integration classes.
Package providing integration of JPA (Java Persistence API) with Spring concepts.
Hibernate-specific support classes, integrated with JPA.
Classes supporting the
org.springframework.orm.jpa package.Support classes for adapting to specific JPA vendors.
The classes in this package make R2DBC easier to use and
reduce the likelihood of common errors.
Provides a utility class for easy ConnectionFactory access,
a ReactiveTransactionManager for a single ConnectionFactory,
and various simple ConnectionFactory implementations.
Provides extensible support for initializing databases through scripts.
Provides a strategy for looking up R2DBC ConnectionFactories by name.
Classes providing an abstraction over SQL bind markers.
Support classes for integrating the Spring TestContext Framework
with JUnit 4.12 or higher.
Support classes for integrating the Spring TestContext Framework
with TestNG.
-
Uses of DataAccessException in org.springframework.dao
Subclasses of DataAccessException in org.springframework.daoModifier and TypeClassDescriptionclassException thrown on failure to acquire a lock during an update, for example during a "select for update" statement.classDeprecated.classDeprecated.as of 6.0.3 since it is not in use within core JDBC/ORM supportclassException thrown on various data access concurrency failures.classData access exception thrown when a resource fails completely: for example, if we can't connect to a database using JDBC.classException thrown when an attempt to execute an SQL statement fails to map the given data, typically but no limited to an insert or update data results in violation of an integrity constraint.classException thrown if certain expected data could not be retrieved, for example, when looking up specific data via a known identifier.classDeprecated.as of 6.0.3, in favor ofPessimisticLockingFailureException/CannotAcquireLockExceptionclassException thrown when an attempt to insert or update data results in violation of a primary key or unique constraint.classData access exception thrown when a result was expected to have at least one row (or element) but zero rows (or elements) were actually returned.classData access exception thrown when a result was not of the expected size, for example when expecting a single row but getting 0 or more than 1 rows.classData access exception thrown when something unintended appears to have happened with an update, but the transaction hasn't already been rolled back.classException thrown on incorrect usage of the API, such as failing to "compile" a query object that needed compilation before execution.classRoot for exceptions thrown when we use a data access resource incorrectly.classRoot of the hierarchy of data access exceptions that are considered non-transient - where a retry of the same operation would fail unless the cause of the Exception is corrected.classData access exception thrown when a resource fails completely and the failure is permanent.classException thrown on an optimistic locking violation.classException thrown when the underlying resource denied a permission to access a specific element, such as a specific database table.classException thrown on a pessimistic locking violation.classException to be thrown on a query timeout.classData access exception thrown when a previously failed operation might be able to succeed if the application performs some recovery steps and retries the entire transaction or in the case of a distributed transaction, the transaction branch.classRoot of the hierarchy of data access exceptions that are considered transient - where a previously failed operation might be able to succeed when the operation is retried without any intervention by application-level functionality.classData access exception thrown when a resource fails temporarily and the operation can be retried.classException thrown on mismatch between Java type and database type: for example on an attempt to set an object of the wrong type in an RDBMS column.classNormal superclass when we can't distinguish anything more specific than "something went wrong with the underlying resource": for example, an SQLException from JDBC we can't pinpoint more precisely. -
Uses of DataAccessException in org.springframework.dao.support
Methods in org.springframework.dao.support that return DataAccessExceptionModifier and TypeMethodDescriptionChainedPersistenceExceptionTranslator.translateExceptionIfPossible(RuntimeException ex) PersistenceExceptionTranslator.translateExceptionIfPossible(RuntimeException ex) Translate the given runtime exception thrown by a persistence framework to a corresponding exception from Spring's genericDataAccessExceptionhierarchy, if possible. -
Uses of DataAccessException in org.springframework.jdbc
Subclasses of DataAccessException in org.springframework.jdbcModifier and TypeClassDescriptionclassException thrown when SQL specified is invalid.classFatal exception thrown when we can't connect to an RDBMS using JDBC.classData access exception thrown when a result set did not have the correct column count, for example when expecting a single column but getting 0 or more than 1 column.classException thrown when a ResultSet has been accessed in an invalid fashion.classException thrown when a JDBC update affects an unexpected number of rows.classDeprecated.as of 6.2 along withLobHandlerclassException thrown when we're not ignoringSQLWarnings.classException thrown when we can't classify an SQLException into one of our generic data access exceptions. -
Uses of DataAccessException in org.springframework.jdbc.core
Methods in org.springframework.jdbc.core that return DataAccessExceptionModifier and TypeMethodDescriptionprotected DataAccessExceptionJdbcTemplate.translateException(String task, @Nullable String sql, SQLException ex) Translate the givenSQLExceptioninto a genericDataAccessException.Methods in org.springframework.jdbc.core that throw DataAccessExceptionModifier and TypeMethodDescriptionint[]JdbcOperations.batchUpdate(String... sql) Issue multiple SQL updates on a single JDBC Statement using batching.<T> int[][]JdbcOperations.batchUpdate(String sql, Collection<T> batchArgs, int batchSize, ParameterizedPreparedStatementSetter<T> pss) Execute multiple batches using the supplied SQL statement with the collect of supplied arguments.int[]JdbcOperations.batchUpdate(String sql, List<Object[]> batchArgs) Execute a batch using the supplied SQL statement with the batch of supplied arguments.int[]JdbcOperations.batchUpdate(String sql, List<Object[]> batchArgs, int[] argTypes) Execute a batch using the supplied SQL statement with the batch of supplied arguments.int[]JdbcOperations.batchUpdate(String sql, BatchPreparedStatementSetter pss) Issue multiple update statements on a single PreparedStatement, using batch updates and a BatchPreparedStatementSetter to set values.int[]JdbcOperations.batchUpdate(PreparedStatementCreator psc, BatchPreparedStatementSetter pss, KeyHolder generatedKeyHolder) Issue multiple update statements on a single PreparedStatement, using batch updates and a BatchPreparedStatementSetter to set values.int[]JdbcTemplate.batchUpdate(String... sql) <T> int[][]JdbcTemplate.batchUpdate(String sql, Collection<T> batchArgs, int batchSize, ParameterizedPreparedStatementSetter<T> pss) int[]JdbcTemplate.batchUpdate(String sql, List<Object[]> batchArgs) int[]JdbcTemplate.batchUpdate(String sql, List<Object[]> batchArgs, int[] argTypes) int[]JdbcTemplate.batchUpdate(String sql, BatchPreparedStatementSetter pss) int[]JdbcTemplate.batchUpdate(PreparedStatementCreator psc, BatchPreparedStatementSetter pss, KeyHolder generatedKeyHolder) JdbcOperations.call(CallableStatementCreator csc, List<SqlParameter> declaredParameters) Execute an SQL call using a CallableStatementCreator to provide SQL and any required parameters.JdbcTemplate.call(CallableStatementCreator csc, List<SqlParameter> declaredParameters) CallableStatementCallback.doInCallableStatement(CallableStatement cs) Gets called byJdbcTemplate.executewith an active JDBC CallableStatement.ConnectionCallback.doInConnection(Connection con) Gets called byJdbcTemplate.executewith an active JDBC Connection.PreparedStatementCallback.doInPreparedStatement(PreparedStatement ps) Gets called byJdbcTemplate.executewith an active JDBC PreparedStatement.StatementCallback.doInStatement(Statement stmt) Gets called byJdbcTemplate.executewith an active JDBC Statement.voidIssue a single SQL execute, typically a DDL statement.JdbcOperations.execute(String callString, CallableStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC CallableStatement.JdbcOperations.execute(String sql, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.JdbcOperations.execute(CallableStatementCreator csc, CallableStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC CallableStatement.JdbcOperations.execute(ConnectionCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC Connection.JdbcOperations.execute(PreparedStatementCreator psc, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.JdbcOperations.execute(StatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC Statement.voidJdbcTemplate.execute(String callString, CallableStatementCallback<T> action) JdbcTemplate.execute(String sql, PreparedStatementCallback<T> action) JdbcTemplate.execute(CallableStatementCreator csc, CallableStatementCallback<T> action) JdbcTemplate.execute(ConnectionCallback<T> action) JdbcTemplate.execute(PreparedStatementCreator psc, PreparedStatementCallback<T> action) JdbcTemplate.execute(StatementCallback<T> action) ResultSetExtractor.extractData(ResultSet rs) Implementations must implement this method to process the entire ResultSet.JdbcOperations.query(String sql, @Nullable Object @Nullable [] args, int[] argTypes, ResultSetExtractor<T> 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.voidJdbcOperations.query(String sql, @Nullable Object @Nullable [] args, int[] argTypes, 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.JdbcOperations.query(String sql, @Nullable Object @Nullable [] args, int[] argTypes, RowMapper<T> 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 result object via a RowMapper.Deprecated.voidDeprecated.Deprecated.JdbcOperations.query(String sql, @Nullable PreparedStatementSetter pss, ResultSetExtractor<T> rse) Query using a prepared statement, reading the ResultSet with a ResultSetExtractor.voidJdbcOperations.query(String sql, @Nullable PreparedStatementSetter pss, RowCallbackHandler rch) Query given SQL to create a prepared statement from SQL and a PreparedStatementSetter implementation that knows how to bind values to the query, reading the ResultSet on a per-row basis with a RowCallbackHandler.JdbcOperations.query(String sql, @Nullable PreparedStatementSetter pss, RowMapper<T> rowMapper) Query given SQL to create a prepared statement from SQL and a PreparedStatementSetter implementation that knows how to bind values to the query, mapping each row to a result object via a RowMapper.JdbcOperations.query(String sql, ResultSetExtractor<T> rse) Execute a query given static SQL, reading the ResultSet with a ResultSetExtractor.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.voidJdbcOperations.query(String sql, RowCallbackHandler rch) Execute a query given static SQL, reading the ResultSet on a per-row basis with a RowCallbackHandler.voidQuery 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.Execute a query given static SQL, mapping each row to a result object via a 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 result object via a RowMapper.JdbcOperations.query(PreparedStatementCreator psc, ResultSetExtractor<T> rse) Query using a prepared statement, reading the ResultSet with a ResultSetExtractor.voidJdbcOperations.query(PreparedStatementCreator psc, RowCallbackHandler rch) Query using a prepared statement, reading the ResultSet on a per-row basis with a RowCallbackHandler.JdbcOperations.query(PreparedStatementCreator psc, RowMapper<T> rowMapper) Query using a prepared statement, mapping each row to a result object via a RowMapper.JdbcTemplate.query(String sql, @Nullable Object @Nullable [] args, int[] argTypes, ResultSetExtractor<T> rse) voidJdbcTemplate.query(String sql, @Nullable Object @Nullable [] args, int[] argTypes, RowCallbackHandler rch) JdbcTemplate.query(String sql, @Nullable Object @Nullable [] args, int[] argTypes, RowMapper<T> rowMapper) Deprecated.voidDeprecated.Deprecated.JdbcTemplate.query(String sql, @Nullable PreparedStatementSetter pss, ResultSetExtractor<T> rse) voidJdbcTemplate.query(String sql, @Nullable PreparedStatementSetter pss, RowCallbackHandler rch) JdbcTemplate.query(String sql, @Nullable PreparedStatementSetter pss, RowMapper<T> rowMapper) JdbcTemplate.query(String sql, ResultSetExtractor<T> rse) voidJdbcTemplate.query(String sql, RowCallbackHandler rch) voidJdbcTemplate.query(PreparedStatementCreator psc, @Nullable PreparedStatementSetter pss, ResultSetExtractor<T> rse) Query using a prepared statement, allowing for a PreparedStatementCreator and a PreparedStatementSetter.JdbcTemplate.query(PreparedStatementCreator psc, ResultSetExtractor<T> rse) voidJdbcTemplate.query(PreparedStatementCreator psc, RowCallbackHandler rch) JdbcTemplate.query(PreparedStatementCreator psc, RowMapper<T> rowMapper) JdbcOperations.queryForList(String sql) Execute a query for a result list, given static SQL.JdbcOperations.queryForList(String sql, @Nullable Object @Nullable ... args) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list.JdbcOperations.queryForList(String sql, @Nullable Object @Nullable [] args, int[] argTypes) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list.JdbcOperations.queryForList(String sql, @Nullable Object @Nullable [] args, int[] argTypes, Class<T> 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.Deprecated.JdbcOperations.queryForList(String sql, Class<T> elementType) Execute a query for a result list, given static SQL.Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result list.JdbcTemplate.queryForList(String sql) JdbcTemplate.queryForList(String sql, @Nullable Object @Nullable ... args) JdbcTemplate.queryForList(String sql, @Nullable Object @Nullable [] args, int[] argTypes) JdbcTemplate.queryForList(String sql, @Nullable Object @Nullable [] args, int[] argTypes, Class<T> elementType) Deprecated.JdbcTemplate.queryForList(String sql, Class<T> elementType) JdbcOperations.queryForMap(String sql) Execute a query for a result map, given static SQL.JdbcOperations.queryForMap(String sql, @Nullable Object @Nullable ... args) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result map.JdbcOperations.queryForMap(String sql, @Nullable Object @Nullable [] args, int[] argTypes) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result map.JdbcTemplate.queryForMap(String sql) JdbcTemplate.queryForMap(String sql, @Nullable Object @Nullable ... args) JdbcTemplate.queryForMap(String sql, @Nullable Object @Nullable [] args, int[] argTypes) <T> @Nullable TJdbcOperations.queryForObject(String sql, @Nullable Object @Nullable [] args, int[] argTypes, Class<T> 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.JdbcOperations.queryForObject(String sql, @Nullable Object @Nullable [] args, int[] argTypes, RowMapper<T> 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 result object via a RowMapper.<T> @Nullable TJdbcOperations.queryForObject(String sql, @Nullable Object @Nullable [] args, Class<T> requiredType) Deprecated.JdbcOperations.queryForObject(String sql, @Nullable Object @Nullable [] args, RowMapper<T> rowMapper) Deprecated.<T> @Nullable TJdbcOperations.queryForObject(String sql, Class<T> requiredType) Execute a query for a result object, given static SQL.<T> @Nullable TJdbcOperations.queryForObject(String sql, Class<T> requiredType, @Nullable Object @Nullable ... args) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting a result object.JdbcOperations.queryForObject(String sql, RowMapper<T> rowMapper) Execute a query given static SQL, mapping a single result row to a result object via a RowMapper.JdbcOperations.queryForObject(String sql, RowMapper<T> rowMapper, @Nullable Object @Nullable ... args) 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 result object via a RowMapper.<T> @Nullable TJdbcTemplate.queryForObject(String sql, @Nullable Object @Nullable [] args, int[] argTypes, Class<T> requiredType) JdbcTemplate.queryForObject(String sql, @Nullable Object @Nullable [] args, int[] argTypes, RowMapper<T> rowMapper) <T> @Nullable TDeprecated.Deprecated.<T> @Nullable TJdbcTemplate.queryForObject(String sql, Class<T> requiredType) <T> @Nullable TJdbcTemplate.queryForObject(String sql, RowMapper<T> rowMapper) JdbcTemplate.queryForObject(String sql, RowMapper<T> rowMapper, @Nullable Object @Nullable ... args) JdbcOperations.queryForRowSet(String sql) Execute a query for an SqlRowSet, given static SQL.JdbcOperations.queryForRowSet(String sql, @Nullable Object @Nullable ... args) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting an SqlRowSet.JdbcOperations.queryForRowSet(String sql, @Nullable Object @Nullable [] args, int[] argTypes) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting an SqlRowSet.JdbcTemplate.queryForRowSet(String sql) JdbcTemplate.queryForRowSet(String sql, @Nullable Object @Nullable ... args) JdbcTemplate.queryForRowSet(String sql, @Nullable Object @Nullable [] args, int[] argTypes) JdbcOperations.queryForStream(String sql, @Nullable PreparedStatementSetter pss, RowMapper<T> rowMapper) Query given SQL to create a prepared statement from SQL and a PreparedStatementSetter implementation that knows how to bind values to the query, mapping each row to a result object via a RowMapper, and turning it into an iterable and closeable Stream.JdbcOperations.queryForStream(String sql, RowMapper<T> rowMapper) Execute a query given static SQL, mapping each row to a result object via a RowMapper, and turning it into an iterable and closeable Stream.JdbcOperations.queryForStream(String sql, RowMapper<T> rowMapper, @Nullable Object @Nullable ... args) 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 result object via a RowMapper, and turning it into an iterable and closeable Stream.JdbcOperations.queryForStream(PreparedStatementCreator psc, RowMapper<T> rowMapper) Query using a prepared statement, mapping each row to a result object via a RowMapper, and turning it into an iterable and closeable Stream.JdbcTemplate.queryForStream(String sql, @Nullable PreparedStatementSetter pss, RowMapper<T> rowMapper) <T> Stream<T> JdbcTemplate.queryForStream(String sql, RowMapper<T> rowMapper) JdbcTemplate.queryForStream(String sql, RowMapper<T> rowMapper, @Nullable Object @Nullable ... args) JdbcTemplate.queryForStream(PreparedStatementCreator psc, @Nullable PreparedStatementSetter pss, RowMapper<T> rowMapper) Query using a prepared statement, allowing for a PreparedStatementCreator and a PreparedStatementSetter.JdbcTemplate.queryForStream(PreparedStatementCreator psc, RowMapper<T> rowMapper) intIssue a single SQL update operation (such as an insert, update or delete statement).intIssue a single SQL update operation (such as an insert, update or delete statement) via a prepared statement, binding the given arguments.intIssue a single SQL update operation (such as an insert, update or delete statement) via a prepared statement, binding the given arguments.intJdbcOperations.update(String sql, @Nullable PreparedStatementSetter pss) Issue an update statement using a PreparedStatementSetter to set bind parameters, with given SQL.intJdbcOperations.update(PreparedStatementCreator psc) Issue a single SQL update operation (such as an insert, update or delete statement) using a PreparedStatementCreator to provide SQL and any required parameters.intJdbcOperations.update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder) Issue an update statement using a PreparedStatementCreator to provide SQL and any required parameters.intintintintJdbcTemplate.update(String sql, @Nullable PreparedStatementSetter pss) intJdbcTemplate.update(PreparedStatementCreator psc) protected intJdbcTemplate.update(PreparedStatementCreator psc, @Nullable PreparedStatementSetter pss) intJdbcTemplate.update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder) -
Uses of DataAccessException in org.springframework.jdbc.core.namedparam
Methods in org.springframework.jdbc.core.namedparam that throw DataAccessExceptionModifier and TypeMethodDescriptionNamedParameterJdbcOperations.execute(String sql, Map<String, ?> paramMap, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.NamedParameterJdbcOperations.execute(String sql, SqlParameterSource paramSource, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.NamedParameterJdbcOperations.execute(String sql, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.NamedParameterJdbcTemplate.execute(String sql, Map<String, ?> paramMap, PreparedStatementCallback<T> action) NamedParameterJdbcTemplate.execute(String sql, SqlParameterSource paramSource, PreparedStatementCallback<T> action) NamedParameterJdbcTemplate.execute(String sql, PreparedStatementCallback<T> action) NamedParameterJdbcOperations.query(String sql, Map<String, ?> paramMap, ResultSetExtractor<T> 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.voidNamedParameterJdbcOperations.query(String sql, Map<String, ?> 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.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.NamedParameterJdbcOperations.query(String sql, SqlParameterSource paramSource, ResultSetExtractor<T> 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.voidNamedParameterJdbcOperations.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.NamedParameterJdbcOperations.query(String sql, SqlParameterSource paramSource, RowMapper<T> 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.NamedParameterJdbcOperations.query(String sql, ResultSetExtractor<T> rse) Query given SQL to create a prepared statement from SQL, reading the ResultSet with a ResultSetExtractor.voidNamedParameterJdbcOperations.query(String sql, RowCallbackHandler rch) Query given SQL to create a prepared statement from SQL, reading the ResultSet on a per-row basis with a RowCallbackHandler.Query given SQL to create a prepared statement from SQL, mapping each row to a Java object via a RowMapper.NamedParameterJdbcTemplate.query(String sql, Map<String, ?> paramMap, ResultSetExtractor<T> rse) voidNamedParameterJdbcTemplate.query(String sql, Map<String, ?> paramMap, RowCallbackHandler rch) NamedParameterJdbcTemplate.query(String sql, SqlParameterSource paramSource, ResultSetExtractor<T> rse) voidNamedParameterJdbcTemplate.query(String sql, SqlParameterSource paramSource, RowCallbackHandler rch) NamedParameterJdbcTemplate.query(String sql, SqlParameterSource paramSource, RowMapper<T> rowMapper) NamedParameterJdbcTemplate.query(String sql, ResultSetExtractor<T> rse) voidNamedParameterJdbcTemplate.query(String sql, RowCallbackHandler rch) <T> List<T> NamedParameterJdbcOperations.queryForList(String sql, Map<String, ?> 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.NamedParameterJdbcOperations.queryForList(String sql, Map<String, ?> paramMap, Class<T> 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.NamedParameterJdbcOperations.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.NamedParameterJdbcOperations.queryForList(String sql, SqlParameterSource paramSource, Class<T> 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.NamedParameterJdbcTemplate.queryForList(String sql, Map<String, ?> paramMap) NamedParameterJdbcTemplate.queryForList(String sql, Map<String, ?> paramMap, Class<T> elementType) NamedParameterJdbcTemplate.queryForList(String sql, SqlParameterSource paramSource) NamedParameterJdbcTemplate.queryForList(String sql, SqlParameterSource paramSource, Class<T> elementType) NamedParameterJdbcOperations.queryForMap(String sql, Map<String, ?> 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.NamedParameterJdbcOperations.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.NamedParameterJdbcTemplate.queryForMap(String sql, Map<String, ?> paramMap) NamedParameterJdbcTemplate.queryForMap(String sql, SqlParameterSource paramSource) <T> @Nullable TNamedParameterJdbcOperations.queryForObject(String sql, Map<String, ?> paramMap, Class<T> 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.NamedParameterJdbcOperations.queryForObject(String sql, Map<String, ?> paramMap, RowMapper<T> 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.<T> @Nullable TNamedParameterJdbcOperations.queryForObject(String sql, SqlParameterSource paramSource, Class<T> 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.NamedParameterJdbcOperations.queryForObject(String sql, SqlParameterSource paramSource, RowMapper<T> 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.<T> @Nullable TNamedParameterJdbcTemplate.queryForObject(String sql, Map<String, ?> paramMap, Class<T> requiredType) NamedParameterJdbcTemplate.queryForObject(String sql, Map<String, ?> paramMap, RowMapper<T> rowMapper) <T> @Nullable TNamedParameterJdbcTemplate.queryForObject(String sql, SqlParameterSource paramSource, Class<T> requiredType) NamedParameterJdbcTemplate.queryForObject(String sql, SqlParameterSource paramSource, RowMapper<T> rowMapper) NamedParameterJdbcOperations.queryForRowSet(String sql, Map<String, ?> paramMap) Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, expecting an SqlRowSet.NamedParameterJdbcOperations.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 an SqlRowSet.NamedParameterJdbcTemplate.queryForRowSet(String sql, Map<String, ?> paramMap) NamedParameterJdbcTemplate.queryForRowSet(String sql, SqlParameterSource paramSource) NamedParameterJdbcOperations.queryForStream(String sql, Map<String, ?> paramMap, RowMapper<T> 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, and turning it into an iterable and closeable Stream.NamedParameterJdbcOperations.queryForStream(String sql, SqlParameterSource paramSource, RowMapper<T> 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, and turning it into an iterable and closeable Stream.NamedParameterJdbcTemplate.queryForStream(String sql, Map<String, ?> paramMap, RowMapper<T> rowMapper) NamedParameterJdbcTemplate.queryForStream(String sql, SqlParameterSource paramSource, RowMapper<T> rowMapper) intIssue an update via a prepared statement, binding the given arguments.intNamedParameterJdbcOperations.update(String sql, SqlParameterSource paramSource) Issue an update via a prepared statement, binding the given arguments.intNamedParameterJdbcOperations.update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder) Issue an update via a prepared statement, binding the given arguments, returning generated keys.intNamedParameterJdbcOperations.update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder, String[] keyColumnNames) Issue an update via a prepared statement, binding the given arguments, returning generated keys.intintNamedParameterJdbcTemplate.update(String sql, SqlParameterSource paramSource) intNamedParameterJdbcTemplate.update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder) intNamedParameterJdbcTemplate.update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder, String @Nullable [] keyColumnNames) -
Uses of DataAccessException in org.springframework.jdbc.core.support
Methods in org.springframework.jdbc.core.support that throw DataAccessExceptionModifier and TypeMethodDescriptionfinal IntegerAbstractLobCreatingPreparedStatementCallback.doInPreparedStatement(PreparedStatement ps) Deprecated.AbstractLobStreamingResultSetExtractor.extractData(ResultSet rs) Deprecated.Delegates to handleNoRowFound, handleMultipleRowsFound and streamData, according to the ResultSet state.protected voidAbstractLobStreamingResultSetExtractor.handleMultipleRowsFound()Deprecated.Handle the case where the ResultSet contains multiple rows.protected voidAbstractLobStreamingResultSetExtractor.handleNoRowFound()Deprecated.Handle the case where the ResultSet does not contain a row.protected abstract voidAbstractLobCreatingPreparedStatementCallback.setValues(PreparedStatement ps, LobCreator lobCreator) Deprecated.Set values on the given PreparedStatement, using the given LobCreator for BLOB/CLOB arguments.protected abstract voidAbstractLobStreamingResultSetExtractor.streamData(ResultSet rs) Deprecated.Stream LOB content from the given ResultSet to some OutputStream. -
Uses of DataAccessException in org.springframework.jdbc.datasource.init
Subclasses of DataAccessException in org.springframework.jdbc.datasource.initModifier and TypeClassDescriptionclassThrown byScriptUtilsif an SQL script cannot be read.classRoot of the hierarchy of data access exceptions that are related to processing of SQL scripts.classThrown byScriptUtilsif an SQL script cannot be properly parsed.classThrown byScriptUtilsif a statement in an SQL script failed when executing it against the target database.classThrown when we cannot determine anything more specific than "something went wrong while processing an SQL script": for example, aSQLExceptionfrom JDBC that we cannot pinpoint more precisely.Methods in org.springframework.jdbc.datasource.init that throw DataAccessExceptionModifier and TypeMethodDescriptionstatic voidDatabasePopulatorUtils.execute(DatabasePopulator populator, DataSource dataSource) Execute the givenDatabasePopulatoragainst the givenDataSource. -
Uses of DataAccessException in org.springframework.jdbc.datasource.lookup
Subclasses of DataAccessException in org.springframework.jdbc.datasource.lookupModifier and TypeClassDescriptionclassException to be thrown by a DataSourceLookup implementation, indicating that the specified DataSource could not be obtained. -
Uses of DataAccessException in org.springframework.jdbc.object
Methods in org.springframework.jdbc.object that throw DataAccessExceptionModifier and TypeMethodDescriptionSqlQuery.execute()Convenient method to execute without parameters nor context.SqlQuery.execute(int p1) Convenient method to execute with a single int parameter.SqlQuery.execute(int p1, int p2) Convenient method to execute with two int parameters.Convenient method to execute with two int parameters and context.Convenient method to execute with a single int parameter and context.SqlQuery.execute(long p1) Convenient method to execute with a single long parameter.Convenient method to execute with a single long parameter and context.Convenient method to execute without context.Central execution method.Convenient method to execute with a single String parameter.Convenient method to execute with a single String parameter and context.Convenient method to execute without parameters.Execute the stored procedure.StoredProcedure.execute(ParameterMapper inParamMapper) Execute the stored procedure.SqlQuery.executeByNamedParam(Map<String, ?> paramMap, @Nullable Map<?, ?> context) Central execution method.SqlQuery.executeByNamedParam(Map<String, ? extends @Nullable Object> paramMap) Convenient method to execute without context.SqlQuery.findObject(int p1) Convenient method to find a single object given a single int parameter.SqlQuery.findObject(int p1, int p2) Convenient method to find a single object given two int parameters.SqlQuery.findObject(int p1, int p2, @Nullable Map<?, ?> context) Convenient method to find a single object given two int parameters and a context.SqlQuery.findObject(int p1, @Nullable Map<?, ?> context) Convenient method to find a single object given a single int parameter and a context.SqlQuery.findObject(long p1) Convenient method to find a single object given a single long parameter.SqlQuery.findObject(long p1, @Nullable Map<?, ?> context) Convenient method to find a single object given a single long parameter and a context.SqlQuery.findObject(Object... params) Convenient method to find a single object without context.SqlQuery.findObject(Object @Nullable [] params, @Nullable Map<?, ?> context) Generic object finder method, used by all otherfindObjectmethods.SqlQuery.findObject(String p1) Convenient method to find a single object given a single String parameter.SqlQuery.findObject(String p1, @Nullable Map<?, ?> context) Convenient method to find a single object given a single String parameter and a context.SqlQuery.findObjectByNamedParam(Map<String, ?> paramMap) Convenient method to execute without context.SqlQuery.findObjectByNamedParam(Map<String, ?> paramMap, @Nullable Map<?, ?> context) Generic object finder method for named parameters.SqlQuery.stream()Convenient method to stream without parameters nor context.Convenient method to stream without context.Central stream method.Convenient method to stream without parameters.SqlQuery.streamByNamedParam(Map<String, ?> paramMap, @Nullable Map<?, ?> context) Central stream method.SqlQuery.streamByNamedParam(Map<String, ? extends @Nullable Object> paramMap) Convenient method to stream without context.intOverridden version ofupdatethat adds the given statement parameters to the queue rather than executing them immediately.intSqlUpdate.update()Convenience method to execute an update with no parameters.intSqlUpdate.update(int p1) Convenient method to execute an update given one int arg.intSqlUpdate.update(int p1, int p2) Convenient method to execute an update given two int args.intSqlUpdate.update(long p1) Convenient method to execute an update given one long arg.intSqlUpdate.update(long p1, long p2) Convenient method to execute an update given two long args.intGeneric method to execute the update given parameters.intMethod to execute the update given arguments and retrieve the generated keys using a KeyHolder.intConvenient method to execute an update given one String arg.intConvenient method to execute an update given two String args.intSqlUpdate.updateByNamedParam(Map<String, ?> paramMap) Generic method to execute the update given named parameters.intSqlUpdate.updateByNamedParam(Map<String, ?> paramMap, KeyHolder generatedKeyHolder) Method to execute the update given arguments and retrieve the generated keys using a KeyHolder. -
Uses of DataAccessException in org.springframework.jdbc.support
Methods in org.springframework.jdbc.support that return DataAccessExceptionModifier and TypeMethodDescriptionprotected @Nullable DataAccessExceptionSQLErrorCodeSQLExceptionTranslator.createCustomException(String task, @Nullable String sql, SQLException sqlEx, Class<?> exceptionClass) Create a customDataAccessException, based on a given exception class from aCustomSQLErrorCodesTranslationdefinition.protected @Nullable DataAccessExceptionSQLErrorCodeSQLExceptionTranslator.customTranslate(String task, @Nullable String sql, SQLException sqlEx) Deprecated.as of 6.1, in favor ofAbstractFallbackSQLExceptionTranslator.setCustomTranslator(SQLExceptionTranslator)protected abstract @Nullable DataAccessExceptionAbstractFallbackSQLExceptionTranslator.doTranslate(String task, @Nullable String sql, SQLException ex) Template method for actually translating the given exception.protected @Nullable DataAccessExceptionSQLErrorCodeSQLExceptionTranslator.doTranslate(String task, @Nullable String sql, SQLException ex) protected @Nullable DataAccessExceptionSQLExceptionSubclassTranslator.doTranslate(String task, @Nullable String sql, SQLException ex) protected @Nullable DataAccessExceptionSQLStateSQLExceptionTranslator.doTranslate(String task, @Nullable String sql, SQLException ex) AbstractFallbackSQLExceptionTranslator.translate(String task, @Nullable String sql, SQLException ex) Pre-checks the arguments, callsAbstractFallbackSQLExceptionTranslator.doTranslate(String, String, SQLException), and invokes thefallback translatorif necessary.SQLExceptionTranslator.translate(String task, @Nullable String sql, SQLException ex) Translate the givenSQLExceptioninto a genericDataAccessException. -
Uses of DataAccessException in org.springframework.jdbc.support.incrementer
Methods in org.springframework.jdbc.support.incrementer that throw DataAccessExceptionModifier and TypeMethodDescriptionprotected longAbstractIdentityColumnMaxValueIncrementer.getNextKey()protected longAbstractSequenceMaxValueIncrementer.getNextKey()Executes the SQL as specified byAbstractSequenceMaxValueIncrementer.getSequenceQuery().protected longMySQLMaxValueIncrementer.getNextKey()intAbstractDataFieldMaxValueIncrementer.nextIntValue()intDataFieldMaxValueIncrementer.nextIntValue()Increment the data store field's max value as int.longAbstractDataFieldMaxValueIncrementer.nextLongValue()longDataFieldMaxValueIncrementer.nextLongValue()Increment the data store field's max value as long.AbstractDataFieldMaxValueIncrementer.nextStringValue()DataFieldMaxValueIncrementer.nextStringValue()Increment the data store field's max value as String. -
Uses of DataAccessException in org.springframework.jdbc.support.xml
Subclasses of DataAccessException in org.springframework.jdbc.support.xmlModifier and TypeClassDescriptionclassDeprecated.as of 6.2, in favor of directResultSet.getSQLXML(int)andConnection.createSQLXML()usage, possibly in combination with a customSqlValueimplementation -
Uses of DataAccessException in org.springframework.orm
Subclasses of DataAccessException in org.springframework.ormModifier and TypeClassDescriptionclassException thrown on an optimistic locking violation for a mapped object.classException thrown if a mapped object could not be retrieved via its identifier. -
Uses of DataAccessException in org.springframework.orm.jpa
Subclasses of DataAccessException in org.springframework.orm.jpaModifier and TypeClassDescriptionclassJPA-specific subclass of ObjectRetrievalFailureException.classJPA-specific subclass of ObjectOptimisticLockingFailureException.classJPA-specific subclass of UncategorizedDataAccessException, for JPA system errors that do not match any concreteorg.springframework.daoexceptions.Methods in org.springframework.orm.jpa that return DataAccessExceptionModifier and TypeMethodDescriptionstatic @Nullable DataAccessExceptionEntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(RuntimeException ex) Convert the given runtime exception to an appropriate exception from theorg.springframework.daohierarchy.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(RuntimeException ex) Implementation of the PersistenceExceptionTranslator interface, as autodetected by Spring's PersistenceExceptionTranslationPostProcessor.DefaultJpaDialect.translateExceptionIfPossible(RuntimeException ex) This implementation delegates to EntityManagerFactoryUtils. -
Uses of DataAccessException in org.springframework.orm.jpa.hibernate
Methods in org.springframework.orm.jpa.hibernate that return DataAccessExceptionModifier and TypeMethodDescriptionprotected DataAccessExceptionHibernateExceptionTranslator.convertHibernateAccessException(HibernateException ex) Convert the given HibernateException to an appropriate exception from theorg.springframework.daohierarchy.HibernateExceptionTranslator.translateExceptionIfPossible(RuntimeException ex) -
Uses of DataAccessException in org.springframework.orm.jpa.support
Methods in org.springframework.orm.jpa.support that throw DataAccessExceptionModifier and TypeMethodDescriptionvoidOpenEntityManagerInViewInterceptor.afterCompletion(WebRequest request, @Nullable Exception ex) voidOpenEntityManagerInViewInterceptor.preHandle(WebRequest request) -
Uses of DataAccessException in org.springframework.orm.jpa.vendor
Methods in org.springframework.orm.jpa.vendor that return DataAccessExceptionModifier and TypeMethodDescriptionHibernateJpaDialect.translateExceptionIfPossible(RuntimeException ex) -
Uses of DataAccessException in org.springframework.r2dbc
Subclasses of DataAccessException in org.springframework.r2dbcModifier and TypeClassDescriptionclassException thrown when SQL specified is invalid.classException thrown when we can't classify aR2dbcExceptioninto one of our generic data access exceptions. -
Uses of DataAccessException in org.springframework.r2dbc.connection
Methods in org.springframework.r2dbc.connection that return DataAccessExceptionModifier and TypeMethodDescriptionstatic DataAccessExceptionConnectionFactoryUtils.convertR2dbcException(String task, @Nullable String sql, R2dbcException ex) Translate the givenR2dbcExceptioninto a genericDataAccessException. -
Uses of DataAccessException in org.springframework.r2dbc.connection.init
Subclasses of DataAccessException in org.springframework.r2dbc.connection.initModifier and TypeClassDescriptionclassThrown byScriptUtilsif an SQL script cannot be read.classRoot of the hierarchy of data access exceptions that are related to processing of SQL scripts.classThrown byScriptUtilsif an SQL script cannot be properly parsed.classThrown byScriptUtilsif a statement in an SQL script failed when executing it against the target database.classThrown when we cannot determine anything more specific than "something went wrong while processing an SQL script": for example, anR2dbcExceptionfrom R2DBC that we cannot pinpoint more precisely. -
Uses of DataAccessException in org.springframework.r2dbc.connection.lookup
Subclasses of DataAccessException in org.springframework.r2dbc.connection.lookupModifier and TypeClassDescriptionclassException to be thrown by aConnectionFactoryLookupimplementation, indicating that the specifiedConnectionFactorycould not be obtained. -
Uses of DataAccessException in org.springframework.r2dbc.core.binding
Subclasses of DataAccessException in org.springframework.r2dbc.core.bindingModifier and TypeClassDescriptionstatic classException thrown when aBindMarkersFactoryResolvercannot resolve aBindMarkersFactory. -
Uses of DataAccessException in org.springframework.test.context.junit4
Methods in org.springframework.test.context.junit4 that throw DataAccessExceptionModifier and TypeMethodDescriptionprotected voidAbstractTransactionalJUnit4SpringContextTests.executeSqlScript(String sqlResourcePath, boolean continueOnError) Deprecated.Execute the given SQL script. -
Uses of DataAccessException in org.springframework.test.context.testng
Methods in org.springframework.test.context.testng that throw DataAccessExceptionModifier and TypeMethodDescriptionprotected voidAbstractTransactionalTestNGSpringContextTests.executeSqlScript(String sqlResourcePath, boolean continueOnError) Execute the given SQL script.
PessimisticLockingFailureException/CannotAcquireLockException