Uses of Class
org.springframework.dao.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
Hibernate 5.x
with Spring concepts.
Classes supporting the
org.springframework.orm.hibernate5
package.Package providing integration of JPA (Java Persistence API) with Spring concepts.
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.
Core domain types around DatabaseClient.
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
Modifier and TypeClassDescriptionclass
Exception thrown on failure to acquire a lock during an update, for example during a "select for update" statement.class
Deprecated.class
Deprecated.as of 6.0.3 since it is not in use within core JDBC/ORM supportclass
Exception thrown on various data access concurrency failures.class
Data access exception thrown when a resource fails completely: for example, if we can't connect to a database using JDBC.class
Exception thrown when an attempt to insert or update data results in violation of an integrity constraint.class
Exception thrown if certain expected data could not be retrieved, e.g.class
Deprecated.as of 6.0.3, in favor ofPessimisticLockingFailureException
/CannotAcquireLockException
class
Exception thrown when an attempt to insert or update data results in violation of a primary key or unique constraint.class
Data access exception thrown when a result was expected to have at least one row (or element) but zero rows (or elements) were actually returned.class
Data 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.class
Data access exception thrown when something unintended appears to have happened with an update, but the transaction hasn't already been rolled back.class
Exception thrown on incorrect usage of the API, such as failing to "compile" a query object that needed compilation before execution.class
Root for exceptions thrown when we use a data access resource incorrectly.class
Root 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.class
Data access exception thrown when a resource fails completely and the failure is permanent.class
Exception thrown on an optimistic locking violation.class
Exception thrown when the underlying resource denied a permission to access a specific element, such as a specific database table.class
Exception thrown on a pessimistic locking violation.class
Exception to be thrown on a query timeout.class
Data 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.class
Root 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.class
Data access exception thrown when a resource fails temporarily and the operation can be retried.class
Exception 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.class
Normal 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
Modifier 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 genericDataAccessException
hierarchy, if possible. -
Uses of DataAccessException in org.springframework.jdbc
Modifier and TypeClassDescriptionclass
Exception thrown when SQL specified is invalid.class
Fatal exception thrown when we can't connect to an RDBMS using JDBC.class
Data 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 columns.class
Exception thrown when a ResultSet has been accessed in an invalid fashion.class
Exception thrown when a JDBC update affects an unexpected number of rows.class
Exception to be thrown when a LOB could not be retrieved.class
Exception thrown when we're not ignoringSQLWarnings
.class
Exception thrown when we can't classify an SQLException into one of our generic data access exceptions. -
Uses of DataAccessException in org.springframework.jdbc.core
Modifier and TypeMethodDescriptionprotected DataAccessException
JdbcTemplate.translateException
(String task, String sql, SQLException ex) Translate the givenSQLException
into a genericDataAccessException
.Modifier 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[]
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) 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.execute
with an active JDBC CallableStatement.ConnectionCallback.doInConnection
(Connection con) Gets called byJdbcTemplate.execute
with an active JDBC Connection.PreparedStatementCallback.doInPreparedStatement
(PreparedStatement ps) Gets called byJdbcTemplate.execute
with an active JDBC PreparedStatement.StatementCallback.doInStatement
(Statement stmt) Gets called byJdbcTemplate.execute
with an active JDBC Statement.void
Issue a single SQL execute, typically a DDL statement.<T> T
JdbcOperations.execute
(String callString, CallableStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC CallableStatement.<T> T
JdbcOperations.execute
(String sql, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.<T> T
JdbcOperations.execute
(CallableStatementCreator csc, CallableStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC CallableStatement.<T> T
JdbcOperations.execute
(ConnectionCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC Connection.<T> T
JdbcOperations.execute
(PreparedStatementCreator psc, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.<T> T
JdbcOperations.execute
(StatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC Statement.void
<T> T
JdbcTemplate.execute
(String callString, CallableStatementCallback<T> action) <T> T
JdbcTemplate.execute
(String sql, PreparedStatementCallback<T> action) <T> T
JdbcTemplate.execute
(CallableStatementCreator csc, CallableStatementCallback<T> action) <T> T
JdbcTemplate.execute
(ConnectionCallback<T> action) <T> T
JdbcTemplate.execute
(PreparedStatementCreator psc, PreparedStatementCallback<T> action) <T> T
JdbcTemplate.execute
(StatementCallback<T> action) ResultSetExtractor.extractData
(ResultSet rs) Implementations must implement this method to process the entire ResultSet.<T> T
JdbcOperations.query
(String sql, Object[] 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.void
JdbcOperations.query
(String sql, Object[] 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.<T> List<T>
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.<T> T
JdbcOperations.query
(String sql, Object[] args, ResultSetExtractor<T> rse) Deprecated.as of 5.3, in favor ofJdbcOperations.query(String, ResultSetExtractor, Object...)
void
JdbcOperations.query
(String sql, Object[] args, RowCallbackHandler rch) Deprecated.as of 5.3, in favor ofJdbcOperations.query(String, RowCallbackHandler, Object...)
<T> List<T>
Deprecated.as of 5.3, in favor ofJdbcOperations.query(String, RowMapper, Object...)
<T> T
JdbcOperations.query
(String sql, PreparedStatementSetter pss, ResultSetExtractor<T> rse) Query using a prepared statement, reading the ResultSet with a ResultSetExtractor.void
JdbcOperations.query
(String sql, 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.<T> List<T>
JdbcOperations.query
(String sql, 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.<T> T
JdbcOperations.query
(String sql, ResultSetExtractor<T> rse) Execute a query given static SQL, reading the ResultSet with a ResultSetExtractor.<T> T
JdbcOperations.query
(String sql, ResultSetExtractor<T> rse, Object... args) 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
JdbcOperations.query
(String sql, RowCallbackHandler rch) Execute a query given static SQL, reading the ResultSet on a per-row basis with a RowCallbackHandler.void
JdbcOperations.query
(String sql, RowCallbackHandler rch, Object... args) 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.<T> List<T>
Execute a query given static SQL, mapping each row to a result object via a RowMapper.<T> List<T>
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.<T> T
JdbcOperations.query
(PreparedStatementCreator psc, ResultSetExtractor<T> rse) Query using a prepared statement, reading the ResultSet with a ResultSetExtractor.void
JdbcOperations.query
(PreparedStatementCreator psc, RowCallbackHandler rch) Query using a prepared statement, reading the ResultSet on a per-row basis with a RowCallbackHandler.<T> List<T>
JdbcOperations.query
(PreparedStatementCreator psc, RowMapper<T> rowMapper) Query using a prepared statement, mapping each row to a result object via a RowMapper.<T> T
JdbcTemplate.query
(String sql, Object[] args, int[] argTypes, ResultSetExtractor<T> rse) void
JdbcTemplate.query
(String sql, Object[] args, int[] argTypes, RowCallbackHandler rch) <T> List<T>
<T> T
JdbcTemplate.query
(String sql, Object[] args, ResultSetExtractor<T> rse) Deprecated.void
JdbcTemplate.query
(String sql, Object[] args, RowCallbackHandler rch) Deprecated.<T> List<T>
Deprecated.<T> T
JdbcTemplate.query
(String sql, PreparedStatementSetter pss, ResultSetExtractor<T> rse) void
JdbcTemplate.query
(String sql, PreparedStatementSetter pss, RowCallbackHandler rch) <T> List<T>
JdbcTemplate.query
(String sql, PreparedStatementSetter pss, RowMapper<T> rowMapper) <T> T
JdbcTemplate.query
(String sql, ResultSetExtractor<T> rse) <T> T
JdbcTemplate.query
(String sql, ResultSetExtractor<T> rse, Object... args) void
JdbcTemplate.query
(String sql, RowCallbackHandler rch) void
JdbcTemplate.query
(String sql, RowCallbackHandler rch, Object... args) <T> List<T>
<T> List<T>
<T> T
JdbcTemplate.query
(PreparedStatementCreator psc, PreparedStatementSetter pss, ResultSetExtractor<T> rse) Query using a prepared statement, allowing for a PreparedStatementCreator and a PreparedStatementSetter.<T> T
JdbcTemplate.query
(PreparedStatementCreator psc, ResultSetExtractor<T> rse) void
JdbcTemplate.query
(PreparedStatementCreator psc, RowCallbackHandler rch) <T> List<T>
JdbcTemplate.query
(PreparedStatementCreator psc, RowMapper<T> rowMapper) JdbcOperations.queryForList
(String sql) Execute a query for a result list, given static SQL.<T> List<T>
JdbcOperations.queryForList
(String sql, Class<T> elementType) Execute a query for a result list, given static SQL.<T> List<T>
JdbcOperations.queryForList
(String sql, Class<T> elementType, Object... 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, Object... 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, Object[] 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.<T> List<T>
JdbcOperations.queryForList
(String sql, Object[] 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.<T> List<T>
JdbcOperations.queryForList
(String sql, Object[] args, Class<T> elementType) Deprecated.as of 5.3, in favor ofJdbcOperations.queryForList(String, Class, Object...)
JdbcTemplate.queryForList
(String sql) <T> List<T>
JdbcTemplate.queryForList
(String sql, Class<T> elementType) <T> List<T>
JdbcTemplate.queryForList
(String sql, Class<T> elementType, Object... args) JdbcTemplate.queryForList
(String sql, Object... args) JdbcTemplate.queryForList
(String sql, Object[] args, int[] argTypes) <T> List<T>
JdbcTemplate.queryForList
(String sql, Object[] args, int[] argTypes, Class<T> elementType) <T> List<T>
JdbcTemplate.queryForList
(String sql, Object[] args, Class<T> elementType) Deprecated.JdbcOperations.queryForMap
(String sql) Execute a query for a result map, given static SQL.JdbcOperations.queryForMap
(String sql, Object... 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, Object[] 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, Object... args) JdbcTemplate.queryForMap
(String sql, Object[] args, int[] argTypes) <T> T
JdbcOperations.queryForObject
(String sql, Class<T> requiredType) Execute a query for a result object, given static SQL.<T> T
JdbcOperations.queryForObject
(String sql, Class<T> requiredType, Object... 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.<T> T
JdbcOperations.queryForObject
(String sql, Object[] 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.<T> T
JdbcOperations.queryForObject
(String sql, Object[] 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> T
JdbcOperations.queryForObject
(String sql, Object[] args, Class<T> requiredType) Deprecated.as of 5.3, in favor ofJdbcOperations.queryForObject(String, Class, Object...)
<T> T
JdbcOperations.queryForObject
(String sql, Object[] args, RowMapper<T> rowMapper) Deprecated.as of 5.3, in favor ofJdbcOperations.queryForObject(String, RowMapper, Object...)
<T> T
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.<T> T
JdbcOperations.queryForObject
(String sql, RowMapper<T> rowMapper, Object... 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> T
JdbcTemplate.queryForObject
(String sql, Class<T> requiredType) <T> T
JdbcTemplate.queryForObject
(String sql, Class<T> requiredType, Object... args) <T> T
JdbcTemplate.queryForObject
(String sql, Object[] args, int[] argTypes, Class<T> requiredType) <T> T
JdbcTemplate.queryForObject
(String sql, Object[] args, int[] argTypes, RowMapper<T> rowMapper) <T> T
JdbcTemplate.queryForObject
(String sql, Object[] args, Class<T> requiredType) Deprecated.<T> T
JdbcTemplate.queryForObject
(String sql, Object[] args, RowMapper<T> rowMapper) Deprecated.<T> T
JdbcTemplate.queryForObject
(String sql, RowMapper<T> rowMapper) <T> T
JdbcTemplate.queryForObject
(String sql, RowMapper<T> rowMapper, Object... args) JdbcOperations.queryForRowSet
(String sql) Execute a query for an SqlRowSet, given static SQL.JdbcOperations.queryForRowSet
(String sql, Object... 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, Object[] 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, Object... args) JdbcTemplate.queryForRowSet
(String sql, Object[] args, int[] argTypes) <T> Stream<T>
JdbcOperations.queryForStream
(String sql, 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.<T> Stream<T>
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.<T> Stream<T>
JdbcOperations.queryForStream
(String sql, RowMapper<T> rowMapper, Object... 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.<T> Stream<T>
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.<T> Stream<T>
JdbcTemplate.queryForStream
(String sql, PreparedStatementSetter pss, RowMapper<T> rowMapper) <T> Stream<T>
JdbcTemplate.queryForStream
(String sql, RowMapper<T> rowMapper) <T> Stream<T>
JdbcTemplate.queryForStream
(String sql, RowMapper<T> rowMapper, Object... args) <T> Stream<T>
JdbcTemplate.queryForStream
(PreparedStatementCreator psc, PreparedStatementSetter pss, RowMapper<T> rowMapper) Query using a prepared statement, allowing for a PreparedStatementCreator and a PreparedStatementSetter.<T> Stream<T>
JdbcTemplate.queryForStream
(PreparedStatementCreator psc, RowMapper<T> rowMapper) int
Issue a single SQL update operation (such as an insert, update or delete statement).int
Issue a single SQL update operation (such as an insert, update or delete statement) via a prepared statement, binding the given arguments.int
Issue a single SQL update operation (such as an insert, update or delete statement) via a prepared statement, binding the given arguments.int
JdbcOperations.update
(String sql, PreparedStatementSetter pss) Issue an update statement using a PreparedStatementSetter to set bind parameters, with given SQL.int
JdbcOperations.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.int
JdbcOperations.update
(PreparedStatementCreator psc, KeyHolder generatedKeyHolder) Issue an update statement using a PreparedStatementCreator to provide SQL and any required parameters.int
int
int
int
JdbcTemplate.update
(String sql, PreparedStatementSetter pss) int
JdbcTemplate.update
(PreparedStatementCreator psc) protected int
JdbcTemplate.update
(PreparedStatementCreator psc, PreparedStatementSetter pss) int
JdbcTemplate.update
(PreparedStatementCreator psc, KeyHolder generatedKeyHolder) -
Uses of DataAccessException in org.springframework.jdbc.core.namedparam
Modifier and TypeMethodDescription<T> T
NamedParameterJdbcOperations.execute
(String sql, Map<String, ?> paramMap, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.<T> T
NamedParameterJdbcOperations.execute
(String sql, SqlParameterSource paramSource, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.<T> T
NamedParameterJdbcOperations.execute
(String sql, PreparedStatementCallback<T> action) Execute a JDBC data access operation, implemented as callback action working on a JDBC PreparedStatement.<T> T
NamedParameterJdbcTemplate.execute
(String sql, Map<String, ?> paramMap, PreparedStatementCallback<T> action) <T> T
NamedParameterJdbcTemplate.execute
(String sql, SqlParameterSource paramSource, PreparedStatementCallback<T> action) <T> T
NamedParameterJdbcTemplate.execute
(String sql, PreparedStatementCallback<T> action) <T> T
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.void
NamedParameterJdbcOperations.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.<T> List<T>
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.<T> T
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.void
NamedParameterJdbcOperations.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.<T> List<T>
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.<T> T
NamedParameterJdbcOperations.query
(String sql, ResultSetExtractor<T> rse) Query given SQL to create a prepared statement from SQL, reading the ResultSet with a ResultSetExtractor.void
NamedParameterJdbcOperations.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.<T> List<T>
Query given SQL to create a prepared statement from SQL, mapping each row to a Java object via a RowMapper.<T> T
NamedParameterJdbcTemplate.query
(String sql, Map<String, ?> paramMap, ResultSetExtractor<T> rse) void
NamedParameterJdbcTemplate.query
(String sql, Map<String, ?> paramMap, RowCallbackHandler rch) <T> List<T>
<T> T
NamedParameterJdbcTemplate.query
(String sql, SqlParameterSource paramSource, ResultSetExtractor<T> rse) void
NamedParameterJdbcTemplate.query
(String sql, SqlParameterSource paramSource, RowCallbackHandler rch) <T> List<T>
NamedParameterJdbcTemplate.query
(String sql, SqlParameterSource paramSource, RowMapper<T> rowMapper) <T> T
NamedParameterJdbcTemplate.query
(String sql, ResultSetExtractor<T> rse) void
NamedParameterJdbcTemplate.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.<T> List<T>
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.<T> List<T>
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) <T> List<T>
NamedParameterJdbcTemplate.queryForList
(String sql, Map<String, ?> paramMap, Class<T> elementType) NamedParameterJdbcTemplate.queryForList
(String sql, SqlParameterSource paramSource) <T> List<T>
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> T
NamedParameterJdbcOperations.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.<T> T
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> T
NamedParameterJdbcOperations.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.<T> T
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> T
NamedParameterJdbcTemplate.queryForObject
(String sql, Map<String, ?> paramMap, Class<T> requiredType) <T> T
NamedParameterJdbcTemplate.queryForObject
(String sql, Map<String, ?> paramMap, RowMapper<T> rowMapper) <T> T
NamedParameterJdbcTemplate.queryForObject
(String sql, SqlParameterSource paramSource, Class<T> requiredType) <T> T
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) <T> Stream<T>
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.<T> Stream<T>
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.<T> Stream<T>
NamedParameterJdbcTemplate.queryForStream
(String sql, Map<String, ?> paramMap, RowMapper<T> rowMapper) <T> Stream<T>
NamedParameterJdbcTemplate.queryForStream
(String sql, SqlParameterSource paramSource, RowMapper<T> rowMapper) int
Issue an update via a prepared statement, binding the given arguments.int
NamedParameterJdbcOperations.update
(String sql, SqlParameterSource paramSource) Issue an update via a prepared statement, binding the given arguments.int
NamedParameterJdbcOperations.update
(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder) Issue an update via a prepared statement, binding the given arguments, returning generated keys.int
NamedParameterJdbcOperations.update
(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder, String[] keyColumnNames) Issue an update via a prepared statement, binding the given arguments, returning generated keys.int
int
NamedParameterJdbcTemplate.update
(String sql, SqlParameterSource paramSource) int
NamedParameterJdbcTemplate.update
(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder) int
NamedParameterJdbcTemplate.update
(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder, String[] keyColumnNames) -
Uses of DataAccessException in org.springframework.jdbc.core.support
Modifier and TypeMethodDescriptionfinal Integer
AbstractLobCreatingPreparedStatementCallback.doInPreparedStatement
(PreparedStatement ps) final T
AbstractLobStreamingResultSetExtractor.extractData
(ResultSet rs) Delegates to handleNoRowFound, handleMultipleRowsFound and streamData, according to the ResultSet state.protected void
AbstractLobStreamingResultSetExtractor.handleMultipleRowsFound()
Handle the case where the ResultSet contains multiple rows.protected void
AbstractLobStreamingResultSetExtractor.handleNoRowFound()
Handle the case where the ResultSet does not contain a row.protected abstract void
AbstractLobCreatingPreparedStatementCallback.setValues
(PreparedStatement ps, LobCreator lobCreator) Set values on the given PreparedStatement, using the given LobCreator for BLOB/CLOB arguments.protected abstract void
AbstractLobStreamingResultSetExtractor.streamData
(ResultSet rs) Stream LOB content from the given ResultSet to some OutputStream. -
Uses of DataAccessException in org.springframework.jdbc.datasource.init
Modifier and TypeClassDescriptionclass
Thrown byScriptUtils
if an SQL script cannot be read.class
Root of the hierarchy of data access exceptions that are related to processing of SQL scripts.class
Thrown byScriptUtils
if an SQL script cannot be properly parsed.class
Thrown byScriptUtils
if a statement in an SQL script failed when executing it against the target database.class
Thrown when we cannot determine anything more specific than "something went wrong while processing an SQL script": for example, aSQLException
from JDBC that we cannot pinpoint more precisely.Modifier and TypeMethodDescriptionstatic void
DatabasePopulatorUtils.execute
(DatabasePopulator populator, DataSource dataSource) Execute the givenDatabasePopulator
against the givenDataSource
. -
Uses of DataAccessException in org.springframework.jdbc.datasource.lookup
Modifier and TypeClassDescriptionclass
Exception to be thrown by a DataSourceLookup implementation, indicating that the specified DataSource could not be obtained. -
Uses of DataAccessException in org.springframework.jdbc.object
Modifier 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) Convenient method to execute without context.SqlQuery.executeByNamedParam
(Map<String, ?> paramMap, Map<?, ?> context) Central execution method.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, Map<?, ?> context) Convenient method to find a single object given two int parameters and a context.SqlQuery.findObject
(int p1, 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, 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[] params, Map<?, ?> context) Generic object finder method, used by all otherfindObject
methods.SqlQuery.findObject
(String p1) Convenient method to find a single object given a single String parameter.SqlQuery.findObject
(String p1, 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, Map<?, ?> context) Generic object finder method for named parameters.int
Overridden version ofupdate
that adds the given statement parameters to the queue rather than executing them immediately.int
SqlUpdate.update()
Convenience method to execute an update with no parameters.int
SqlUpdate.update
(int p1) Convenient method to execute an update given one int arg.int
SqlUpdate.update
(int p1, int p2) Convenient method to execute an update given two int args.int
SqlUpdate.update
(long p1) Convenient method to execute an update given one long arg.int
SqlUpdate.update
(long p1, long p2) Convenient method to execute an update given two long args.int
Generic method to execute the update given parameters.int
Method to execute the update given arguments and retrieve the generated keys using a KeyHolder.int
Convenient method to execute an update given one String arg.int
Convenient method to execute an update given two String args.int
SqlUpdate.updateByNamedParam
(Map<String, ?> paramMap) Generic method to execute the update given named parameters.int
SqlUpdate.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
Modifier and TypeMethodDescriptionprotected DataAccessException
SQLErrorCodeSQLExceptionTranslator.createCustomException
(String task, String sql, SQLException sqlEx, Class<?> exceptionClass) Create a customDataAccessException
, based on a given exception class from aCustomSQLErrorCodesTranslation
definition.protected DataAccessException
SQLErrorCodeSQLExceptionTranslator.customTranslate
(String task, String sql, SQLException sqlEx) Subclasses can override this method to attempt a custom mapping fromSQLException
toDataAccessException
.protected abstract DataAccessException
AbstractFallbackSQLExceptionTranslator.doTranslate
(String task, String sql, SQLException ex) Template method for actually translating the given exception.protected DataAccessException
SQLErrorCodeSQLExceptionTranslator.doTranslate
(String task, String sql, SQLException ex) protected DataAccessException
SQLExceptionSubclassTranslator.doTranslate
(String task, String sql, SQLException ex) protected DataAccessException
SQLStateSQLExceptionTranslator.doTranslate
(String task, String sql, SQLException ex) AbstractFallbackSQLExceptionTranslator.translate
(String task, String sql, SQLException ex) Pre-checks the arguments, callsAbstractFallbackSQLExceptionTranslator.doTranslate(java.lang.String, java.lang.String, java.sql.SQLException)
, and invokes thefallback translator
if necessary.SQLExceptionTranslator.translate
(String task, String sql, SQLException ex) Translate the givenSQLException
into a genericDataAccessException
. -
Uses of DataAccessException in org.springframework.jdbc.support.incrementer
Modifier and TypeMethodDescriptionprotected long
AbstractIdentityColumnMaxValueIncrementer.getNextKey()
protected long
AbstractSequenceMaxValueIncrementer.getNextKey()
Executes the SQL as specified byAbstractSequenceMaxValueIncrementer.getSequenceQuery()
.protected long
MySQLMaxValueIncrementer.getNextKey()
int
AbstractDataFieldMaxValueIncrementer.nextIntValue()
int
DataFieldMaxValueIncrementer.nextIntValue()
Increment the data store field's max value as int.long
AbstractDataFieldMaxValueIncrementer.nextLongValue()
long
DataFieldMaxValueIncrementer.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
Modifier and TypeClassDescriptionclass
Exception thrown when the underlying implementation does not support the requested feature of the API. -
Uses of DataAccessException in org.springframework.orm
Modifier and TypeClassDescriptionclass
Exception thrown on an optimistic locking violation for a mapped object.class
Exception thrown if a mapped object could not be retrieved via its identifier. -
Uses of DataAccessException in org.springframework.orm.hibernate5
Modifier and TypeClassDescriptionclass
Hibernate-specific subclass of UncategorizedDataAccessException, for JDBC exceptions that Hibernate wrapped.class
Hibernate-specific subclass of ObjectRetrievalFailureException.class
Hibernate-specific subclass of ObjectOptimisticLockingFailureException.class
Hibernate-specific subclass of InvalidDataAccessResourceUsageException, thrown on invalid HQL query syntax.class
Hibernate-specific subclass of UncategorizedDataAccessException, for Hibernate system errors that do not match any concreteorg.springframework.dao
exceptions.Modifier and TypeMethodDescriptionprotected DataAccessException
HibernateExceptionTranslator.convertHibernateAccessException
(HibernateException ex) Convert the given HibernateException to an appropriate exception from theorg.springframework.dao
hierarchy.protected DataAccessException
HibernateTransactionManager.convertHibernateAccessException
(HibernateException ex) Convert the given HibernateException to an appropriate exception from theorg.springframework.dao
hierarchy.static DataAccessException
SessionFactoryUtils.convertHibernateAccessException
(HibernateException ex) Convert the given HibernateException to an appropriate exception from theorg.springframework.dao
hierarchy.HibernateExceptionTranslator.translateExceptionIfPossible
(RuntimeException ex) Modifier and TypeMethodDescriptionvoid
SpringSessionSynchronization.beforeCommit
(boolean readOnly) int
HibernateOperations.bulkUpdate
(String queryString, Object... values) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodint
HibernateTemplate.bulkUpdate
(String queryString, Object... values) Deprecated.void
HibernateOperations.clear()
Remove all objects from theSession
cache, and cancel all pending saves, updates and deletes.void
HibernateTemplate.clear()
void
HibernateOperations.closeIterator
(Iterator<?> it) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodvoid
HibernateTemplate.closeIterator
(Iterator<?> it) Deprecated.boolean
Check whether the given object is in the Session cache.boolean
void
Delete the given persistent instance.void
Delete the given persistent instance.void
Delete the given persistent instance.void
Delete the given persistent instance.void
void
void
void
void
HibernateOperations.deleteAll
(Collection<?> entities) Delete all given persistent instances.void
HibernateTemplate.deleteAll
(Collection<?> entities) protected <T> T
HibernateTemplate.doExecute
(HibernateCallback<T> action, boolean enforceNativeSession) Execute the action specified by the given action object within a Session.void
Remove the given object from theSession
cache.void
<T> T
HibernateOperations.execute
(HibernateCallback<T> action) Execute the action specified by the given action object within aSession
.<T> T
HibernateTemplate.execute
(HibernateCallback<T> action) List<?>
Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodList<?>
Deprecated.List<?>
HibernateOperations.findByCriteria
(DetachedCriteria criteria) Execute a query based on a given Hibernate criteria object.List<?>
HibernateOperations.findByCriteria
(DetachedCriteria criteria, int firstResult, int maxResults) Execute a query based on the given Hibernate criteria object.List<?>
HibernateTemplate.findByCriteria
(DetachedCriteria criteria) List<?>
HibernateTemplate.findByCriteria
(DetachedCriteria criteria, int firstResult, int maxResults) <T> List<T>
HibernateOperations.findByExample
(String entityName, T exampleEntity) Execute a query based on the given example entity object.<T> List<T>
HibernateOperations.findByExample
(String entityName, T exampleEntity, int firstResult, int maxResults) Execute a query based on a given example entity object.<T> List<T>
HibernateOperations.findByExample
(T exampleEntity) Execute a query based on the given example entity object.<T> List<T>
HibernateOperations.findByExample
(T exampleEntity, int firstResult, int maxResults) Execute a query based on a given example entity object.<T> List<T>
HibernateTemplate.findByExample
(String entityName, T exampleEntity) <T> List<T>
HibernateTemplate.findByExample
(String entityName, T exampleEntity, int firstResult, int maxResults) <T> List<T>
HibernateTemplate.findByExample
(T exampleEntity) <T> List<T>
HibernateTemplate.findByExample
(T exampleEntity, int firstResult, int maxResults) List<?>
HibernateOperations.findByNamedParam
(String queryString, String[] paramNames, Object[] values) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodList<?>
HibernateOperations.findByNamedParam
(String queryString, String paramName, Object value) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodList<?>
HibernateTemplate.findByNamedParam
(String queryString, String[] paramNames, Object[] values) Deprecated.List<?>
HibernateTemplate.findByNamedParam
(String queryString, String paramName, Object value) Deprecated.List<?>
HibernateOperations.findByNamedQuery
(String queryName, Object... values) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodList<?>
HibernateTemplate.findByNamedQuery
(String queryName, Object... values) Deprecated.List<?>
HibernateOperations.findByNamedQueryAndNamedParam
(String queryName, String[] paramNames, Object[] values) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodList<?>
HibernateOperations.findByNamedQueryAndNamedParam
(String queryName, String paramName, Object value) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodList<?>
HibernateTemplate.findByNamedQueryAndNamedParam
(String queryName, String[] paramNames, Object[] values) Deprecated.List<?>
HibernateTemplate.findByNamedQueryAndNamedParam
(String queryName, String paramName, Object value) Deprecated.List<?>
HibernateOperations.findByNamedQueryAndValueBean
(String queryName, Object valueBean) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodList<?>
HibernateTemplate.findByNamedQueryAndValueBean
(String queryName, Object valueBean) Deprecated.List<?>
HibernateOperations.findByValueBean
(String queryString, Object valueBean) Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodList<?>
HibernateTemplate.findByValueBean
(String queryString, Object valueBean) Deprecated.void
HibernateOperations.flush()
Flush all pending saves, updates and deletes to the database.void
HibernateTemplate.flush()
<T> T
HibernateOperations.get
(Class<T> entityClass, Serializable id) Return the persistent instance of the given entity class with the given identifier, ornull
if not found.<T> T
HibernateOperations.get
(Class<T> entityClass, Serializable id, LockMode lockMode) Return the persistent instance of the given entity class with the given identifier, ornull
if not found.HibernateOperations.get
(String entityName, Serializable id) Return the persistent instance of the given entity class with the given identifier, ornull
if not found.HibernateOperations.get
(String entityName, Serializable id, LockMode lockMode) Return the persistent instance of the given entity class with the given identifier, ornull
if not found.<T> T
HibernateTemplate.get
(Class<T> entityClass, Serializable id) <T> T
HibernateTemplate.get
(Class<T> entityClass, Serializable id, LockMode lockMode) HibernateTemplate.get
(String entityName, Serializable id) HibernateTemplate.get
(String entityName, Serializable id, LockMode lockMode) void
HibernateOperations.initialize
(Object proxy) Force initialization of a Hibernate proxy or persistent collection.void
HibernateTemplate.initialize
(Object proxy) Iterator<?>
Deprecated.as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodIterator<?>
Deprecated.<T> T
HibernateOperations.load
(Class<T> entityClass, Serializable id) Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found.<T> T
HibernateOperations.load
(Class<T> entityClass, Serializable id, LockMode lockMode) Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found.void
HibernateOperations.load
(Object entity, Serializable id) Load the persistent instance with the given identifier into the given object, throwing an exception if not found.HibernateOperations.load
(String entityName, Serializable id) Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found.HibernateOperations.load
(String entityName, Serializable id, LockMode lockMode) Return the persistent instance of the given entity class with the given identifier, throwing an exception if not found.<T> T
HibernateTemplate.load
(Class<T> entityClass, Serializable id) <T> T
HibernateTemplate.load
(Class<T> entityClass, Serializable id, LockMode lockMode) void
HibernateTemplate.load
(Object entity, Serializable id) HibernateTemplate.load
(String entityName, Serializable id) HibernateTemplate.load
(String entityName, Serializable id, LockMode lockMode) <T> List<T>
Return all persistent instances of the given entity class.<T> List<T>
void
Obtain the specified lock level upon the given object, implicitly checking whether the corresponding database entry still exists.void
Obtain the specified lock level upon the given object, implicitly checking whether the corresponding database entry still exists.void
void
<T> T
Copy the state of the given object onto the persistent object with the same identifier.<T> T
HibernateOperations.merge
(T entity) Copy the state of the given object onto the persistent object with the same identifier.<T> T
<T> T
HibernateTemplate.merge
(T entity) void
Persist the given transient instance.void
Persist the given transient instance.void
void
void
Re-read the state of the given persistent instance.void
Re-read the state of the given persistent instance.void
void
void
HibernateOperations.replicate
(Object entity, ReplicationMode replicationMode) Persist the state of the given detached instance according to the given replication mode, reusing the current identifier value.void
HibernateOperations.replicate
(String entityName, Object entity, ReplicationMode replicationMode) Persist the state of the given detached instance according to the given replication mode, reusing the current identifier value.void
HibernateTemplate.replicate
(Object entity, ReplicationMode replicationMode) void
HibernateTemplate.replicate
(String entityName, Object entity, ReplicationMode replicationMode) Persist the given transient instance.Persist the given transient instance.void
HibernateOperations.saveOrUpdate
(Object entity) Save or update the given persistent instance, according to its id (matching the configured "unsaved-value"?).void
HibernateOperations.saveOrUpdate
(String entityName, Object entity) Save or update the given persistent instance, according to its id (matching the configured "unsaved-value"?).void
HibernateTemplate.saveOrUpdate
(Object entity) void
HibernateTemplate.saveOrUpdate
(String entityName, Object entity) void
Update the given persistent instance, associating it with the current HibernateSession
.void
Update the given persistent instance, associating it with the current HibernateSession
.void
Update the given persistent instance, associating it with the current HibernateSession
.void
Update the given persistent instance, associating it with the current HibernateSession
.void
void
void
void
-
Uses of DataAccessException in org.springframework.orm.hibernate5.support
Modifier and TypeMethodDescriptionvoid
OpenSessionInViewInterceptor.afterCompletion
(WebRequest request, Exception ex) Unbind the HibernateSession
from the thread and close it.void
OpenSessionInViewInterceptor.preHandle
(WebRequest request) Open a new HibernateSession
according and bind it to the thread via theTransactionSynchronizationManager
. -
Uses of DataAccessException in org.springframework.orm.jpa
Modifier and TypeClassDescriptionclass
JPA-specific subclass of ObjectRetrievalFailureException.class
JPA-specific subclass of ObjectOptimisticLockingFailureException.class
JPA-specific subclass of UncategorizedDataAccessException, for JPA system errors that do not match any concreteorg.springframework.dao
exceptions.Modifier and TypeMethodDescriptionstatic DataAccessException
EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible
(RuntimeException ex) Convert the given runtime exception to an appropriate exception from theorg.springframework.dao
hierarchy.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.support
Modifier and TypeMethodDescriptionvoid
OpenEntityManagerInViewInterceptor.afterCompletion
(WebRequest request, Exception ex) void
OpenEntityManagerInViewInterceptor.preHandle
(WebRequest request) -
Uses of DataAccessException in org.springframework.orm.jpa.vendor
Modifier and TypeMethodDescriptionprotected DataAccessException
HibernateJpaDialect.convertHibernateAccessException
(HibernateException ex) Convert the given HibernateException to an appropriate exception from theorg.springframework.dao
hierarchy.HibernateJpaDialect.translateExceptionIfPossible
(RuntimeException ex) -
Uses of DataAccessException in org.springframework.r2dbc
Modifier and TypeClassDescriptionclass
Exception thrown when SQL specified is invalid.class
Exception thrown when we can't classify aR2dbcException
into one of our generic data access exceptions. -
Uses of DataAccessException in org.springframework.r2dbc.connection
Modifier and TypeMethodDescriptionstatic DataAccessException
ConnectionFactoryUtils.convertR2dbcException
(String task, String sql, R2dbcException ex) Translate the givenR2dbcException
into a genericDataAccessException
. -
Uses of DataAccessException in org.springframework.r2dbc.connection.init
Modifier and TypeClassDescriptionclass
Thrown byScriptUtils
if an SQL script cannot be read.class
Root of the hierarchy of data access exceptions that are related to processing of SQL scripts.class
Thrown byScriptUtils
if an SQL script cannot be properly parsed.class
Thrown byScriptUtils
if a statement in an SQL script failed when executing it against the target database.class
Thrown when we cannot determine anything more specific than "something went wrong while processing an SQL script": for example, anR2dbcException
from R2DBC that we cannot pinpoint more precisely.Modifier and TypeMethodDescriptiondefault reactor.core.publisher.Mono<Void>
DatabasePopulator.populate
(ConnectionFactory connectionFactory) Execute the givenDatabasePopulator
against the givenConnectionFactory
. -
Uses of DataAccessException in org.springframework.r2dbc.connection.lookup
Modifier and TypeClassDescriptionclass
Exception to be thrown by aConnectionFactoryLookup
implementation, indicating that the specifiedConnectionFactory
could not be obtained. -
Uses of DataAccessException in org.springframework.r2dbc.core
Modifier and TypeMethodDescription<T> reactor.core.publisher.Mono<T>
ConnectionAccessor.inConnection
(Function<Connection, reactor.core.publisher.Mono<T>> action) Execute a callbackFunction
within aConnection
scope.<T> reactor.core.publisher.Flux<T>
ConnectionAccessor.inConnectionMany
(Function<Connection, reactor.core.publisher.Flux<T>> action) Execute a callbackFunction
within aConnection
scope. -
Uses of DataAccessException in org.springframework.r2dbc.core.binding
Modifier and TypeClassDescriptionstatic class
Exception thrown whenBindMarkersFactoryResolver
cannot resolve aBindMarkersFactory
. -
Uses of DataAccessException in org.springframework.test.context.junit4
Modifier and TypeMethodDescriptionprotected void
AbstractTransactionalJUnit4SpringContextTests.executeSqlScript
(String sqlResourcePath, boolean continueOnError) Execute the given SQL script. -
Uses of DataAccessException in org.springframework.test.context.testng
Modifier and TypeMethodDescriptionprotected void
AbstractTransactionalTestNGSpringContextTests.executeSqlScript
(String sqlResourcePath, boolean continueOnError) Execute the given SQL script.
PessimisticLockingFailureException
/CannotAcquireLockException