Deprecated
as a consequence of DefaultConnection being deprecated. See corresponding docs for further information.
ConnectionProvider-enabled connection.
This is a wrapper for both a connection that must be returned to a
ConnectionProvider. This wrapper abstracts closing a JDBC connection
when it is obtained from a data source by closing it when the
Statement, PreparedStatement, or CallableStatement is
closed.
| Modifier and Type | Field and Description |
|---|---|
| private final ConnectionProvider |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final void | close()
Overrides org. Implements java. Connection object's database and JDBC resources
immediately instead of waiting for them to be automatically released.
|
| public final Statement | createStatement()
Overrides org. Implements java. Statement object for sending
SQL statements to the database.
|
| public final Statement | createStatement(int
a result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEOverrides org. Implements java. Statement object that will generate
ResultSet objects with the given type and concurrency.
|
| public final Statement | createStatement(int
one of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITOverrides org. Implements java. Statement object that will generate
ResultSet objects with the given type, concurrency,
and holdability.
|
| public final CallableStatement | prepareCall(String
an SQL statement that may contain one or more '?'
parameter placeholders. Typically this statement is specified using JDBC
call escape syntax. sql)Overrides org. Implements java. CallableStatement object for calling
database stored procedures.
|
| public final CallableStatement | prepareCall(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain on or more '?' parametersa result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEOverrides org. Implements java. CallableStatement object that will generate
ResultSet objects with the given type and concurrency.
|
| public final CallableStatement | prepareCall(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain on or more '?' parametersone of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITOverrides org. Implements java. CallableStatement object that will generate
ResultSet objects with the given type and concurrency.
|
| public final PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql)Overrides org. Implements java. PreparedStatement object for sending
parameterized SQL statements to the database.
|
| public final PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, int a flag indicating whether auto-generated keys
should be returned; one of
autoGeneratedKeys)Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYSOverrides org. Implements java. PreparedStatement object that has
the capability to retrieve auto-generated keys.
|
| public final PreparedStatement | prepareStatement(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain one or more '?' IN
parametersa result set type; one of
resultSetType, int ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEa concurrency type; one of
resultSetConcurrency)ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEOverrides org. Implements java. PreparedStatement object that will generate
ResultSet objects with the given type and concurrency.
|
| public final PreparedStatement | prepareStatement(String
a sql, int String object that is the SQL statement to
be sent to the database; may contain one or more '?' IN
parametersone of the following resultSetType, int ResultSet
constants:
ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEone of the following resultSetConcurrency, int ResultSet
constants:
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLEone of the following resultSetHoldability)ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMITOverrides org. Implements java. PreparedStatement object that will generate
ResultSet objects with the given type, concurrency,
and holdability.
|
| public final PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, int[] an array of column indexes indicating the columns
that should be returned from the inserted row or rows columnIndexes)Overrides org. Implements java. PreparedStatement object capable
of returning the auto-generated keys designated by the given array.
|
| public final PreparedStatement | prepareStatement(String
an SQL statement that may contain one or more '?' IN
parameter placeholders sql, String[] an array of column names indicating the columns
that should be returned from the inserted row or rows columnNames)Overrides org. Implements java. PreparedStatement object capable
of returning the auto-generated keys designated by the given array.
|
| connectionProvider | back to summary |
|---|---|
| private final ConnectionProvider connectionProvider | |
| ProviderEnabledConnection | back to summary |
|---|---|
| pack-priv ProviderEnabledConnection(ConnectionProvider connectionProvider, Connection connection) | |
| close | back to summary |
|---|---|
| public final void close() throws SQLException Overrides org. Implements java. Doc from java. Releases this
Calling the method
It is strongly recommended that an application explicitly
commits or rolls back an active transaction prior to calling the
| |
| createStatement | back to summary |
|---|---|
| public final Statement createStatement() throws SQLException Overrides org. Implements java. Doc from java. Creates a
Result sets created using the returned
| |
| createStatement | back to summary |
|---|---|
| public final Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException Overrides org. Implements java. Doc from java. Creates a
| |
| createStatement | back to summary |
|---|---|
| public final Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Overrides org. Implements java. Doc from java. Creates a
| |
| prepareCall | back to summary |
|---|---|
| public final CallableStatement prepareCall(String sql) throws SQLException Overrides org. Implements java. Doc from java. Creates a Note This method is optimized for handling stored
procedure call statements. Some drivers may send the call
statement to the database when the method
Result sets created using the returned
| |
| prepareCall | back to summary |
|---|---|
| public final CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException Overrides org. Implements java. Doc from java. Creates a
| |
| prepareCall | back to summary |
|---|---|
| public final CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Overrides org. Implements java. Doc from java. Creates a
| |
| prepareStatement | back to summary |
|---|---|
| public final PreparedStatement prepareStatement(String sql) throws SQLException Overrides org. Implements java. Doc from java. Creates a
A SQL statement with or without IN parameters can be
pre-compiled and stored in a Note This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method
Result sets created using the returned
| |
| prepareStatement | back to summary |
|---|---|
| public final PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException Overrides org. Implements java. Doc from java. Creates a default Note This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method
Result sets created using the returned
| |
| prepareStatement | back to summary |
|---|---|
| public final PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException Overrides org. Implements java. Doc from java. Creates a
| |
| prepareStatement | back to summary |
|---|---|
| public final PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException Overrides org. Implements java. Doc from java. Creates a
This method is the same as the
| |
| prepareStatement | back to summary |
|---|---|
| public final PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException Overrides org. Implements java. Doc from java. Creates a default
An SQL statement with or without IN parameters can be
pre-compiled and stored in a Note This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method
Result sets created using the returned
| |
| prepareStatement | back to summary |
|---|---|
| public final PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException Overrides org. Implements java. Doc from java. Creates a default
An SQL statement with or without IN parameters can be
pre-compiled and stored in a Note This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method
Result sets created using the returned
| |