Top Description Interfaces Classes
[default module]

Package org.springframework.jdbc.datasource

Annotations
@NonNullApi
@NonNullFields
Imports
org.springframework.lang.NonNullApi, .NonNullFields

Provides a utility class for easy DataSource access, a PlatformTransactionManager for a single DataSource, and various simple DataSource implementations.

Interface Summary

Modifier and TypeInterface and Description
public interface
ConnectionHandle

Simple interface to be implemented by handles for a JDBC Connection.

public interface
ConnectionProxy

Subinterface of java.sql.Connection to be implemented by Connection proxies.

public interface
ShardingKeyProvider

Strategy interface for determining sharding keys which are used to establish direct shard connections in the context of sharded databases.

public interface
SmartDataSource

Extension of the javax.sql.DataSource interface, to be implemented by special DataSources that return JDBC Connections in an unwrapped fashion.

Class Summary

Modifier and TypeClass and Description
public abstract class
AbstractDataSource

Abstract base class for Spring's javax.sql.DataSource implementations, taking care of the padding.

public abstract class
AbstractDriverBasedDataSource

Abstract base class for JDBC javax.sql.DataSource implementations that operate on a JDBC java.sql.Driver.

public class
ConnectionHolder

Resource holder wrapping a JDBC Connection.

public class
public abstract class
DataSourceUtils

Helper class that provides static methods for obtaining JDBC Connections from a javax.sql.DataSource.

public class
DelegatingDataSource

JDBC javax.sql.DataSource implementation that delegates all calls to a given target javax.sql.DataSource.

public class
DriverManagerDataSource

Simple implementation of the standard JDBC javax.sql.DataSource interface, configuring the plain old JDBC java.sql.DriverManager via bean properties, and returning a new java.sql.Connection from every getConnection call.

public class
IsolationLevelDataSourceAdapter

An adapter for a target javax.sql.DataSource, applying the current Spring transaction's isolation level (and potentially specified user credentials) to every getConnection call.

public abstract class
JdbcTransactionObjectSupport

Convenient base class for JDBC-aware transaction objects.

public class
LazyConnectionDataSourceProxy

Proxy for a target DataSource, fetching actual JDBC Connections lazily, i.e. not until first creation of a Statement.

public class
ShardingKeyDataSourceAdapter

An adapter for a target DataSource, designed to apply sharding keys, if specified, to every standard #getConnection call, returning a direct connection to the shard corresponding to the specified sharding key value.

public class
SimpleConnectionHandle

Simple implementation of the ConnectionHandle interface, containing a given JDBC Connection.

public class
SimpleDriverDataSource

Simple implementation of the standard JDBC javax.sql.DataSource interface, configuring a plain old JDBC java.sql.Driver via bean properties, and returning a new java.sql.Connection from every getConnection call.

public class
SingleConnectionDataSource

Implementation of SmartDataSource that wraps a single JDBC Connection which is not closed after use.

public class
TransactionAwareDataSourceProxy

Proxy for a target JDBC javax.sql.DataSource, adding awareness of Spring-managed transactions.

public class
UserCredentialsDataSourceAdapter

An adapter for a target JDBC javax.sql.DataSource, applying the specified user credentials to every standard getConnection() call, implicitly invoking getConnection(username, password) on the target.