Known Indirect Subclasses
CallableStatement,
Connection,
DataSource,
DatabaseMetaData,
ParameterMetaData,
PreparedStatement,
ResultSet,
ResultSetMetaData,
RowSet,
RowSetMetaData,
Statement
CallableStatement |
An interface used to call Stored Procedures. |
Connection |
A connection represents a link from a Java application to a database. |
DataSource |
An interface for the creation of Connection objects which represent a
connection to a database. |
DatabaseMetaData |
An interface which provides comprehensive information about the database
management system and its supported features. |
ParameterMetaData |
An interface used to get information about the types and properties of
parameters in a PreparedStatement . |
PreparedStatement |
An interface for a precompiled SQL Statement. |
ResultSet |
An interface for an object which represents a database table entry, returned
as the result of the query to the database. |
ResultSetMetaData |
Provides information about the columns returned in a ResultSet . |
RowSet |
An interface which provides means to access data which
persists on a database. |
RowSetMetaData |
An interface which provides facilities for getting information about the
columns in a RowSet . |
Statement |
Interface used for executing static SQL statements to retrieve query results. |
|
Class Overview
This class is an actual usage of the wrapper pattern for JDBC classes.
Developers can get the delegate instance when the instance may be a proxy
class.
Summary
Public Methods |
abstract
boolean
|
isWrapperFor(Class<?> iface)
If the caller is a wrapper of the class or implements the given
interface, the methods return false and vice versa.
|
abstract
<T>
T
|
unwrap(Class<T> iface)
Returns an object that implements the given interface.
|
Public Methods
public
abstract
boolean
isWrapperFor
(Class<?> iface)
If the caller is a wrapper of the class or implements the given
interface, the methods return false and vice versa.
Parameters
iface
| -
the class that defines the interface |
Returns
- - true if the instance implements the interface
public
abstract
T
unwrap
(Class<T> iface)
Returns an object that implements the given interface. If the caller is
not a wrapper, a SQLException will be thrown.
Parameters
iface
| -
the class that defines the interface |
Returns
- - an object that implements the interface
Throws
SQLException
| -
if there is no object implementing the specific interface
|