|
|
||
Lance Andersen's BlogJDBC 4.0 Wrapper InterfacePosted by lancea on February 23, 2006 at 02:46 PM | Comments (1)The Wrapper interface provides a mechanism for JDBC users to be able to access an instance of a resource which has been wrapped for architectural reasons. This mechanism helps to eliminate the need to use non-standard means to access vendor specific resources. The following JDBC interfaces are subinterfaces of the Wrapper interface:
The Wrapper interface consists of two methods:
Statement stmt = conn.createStatement();
Class clzz = Class.forName("oracle.jdbc.OracleStatement");
OracleStatement os;
if(stmt.isWrapperFor(clzz)) {
os = stmt.unwrap(clzz);
os.defineColumnType(1, Types.NUMBER);
}
Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment
| ||
|
|