db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-940) Add JDBC 4 Wrapper support
Date Wed, 29 Mar 2006 11:37:22 GMT
    [ http://issues.apache.org/jira/browse/DERBY-940?page=comments#action_12372228 ] 

Knut Anders Hatlen commented on DERBY-940:

I noticed that three new classes were introduced: EmbedStatement40,
EmbedParameterMetaData40, EmbedResultSetMetaData40. These classes only
contain the wrapper methods.

The description of the patch says:

> The wrapper interface has two new methods 
> isWrapperFor
> unwrap
> both of which use generics in their signature. Thus the classes in
> derby had to be extended and these methods had to be implemented in
> those extended classes so that the extended classes can then be
> compiled with jdk1.6.

Although the methods have Class<?> in their signatures, they don't
require jdk1.6. Class<?> is equivalent to Class. The compiler did not
complain when I compiled this code:

  public class wrapperimpl implements java.sql.Wrapper {
      public Object unwrap(Class interfaces) {
          return null;
      public boolean isWrapperFor(Class interfaces) {
          return false;

Note that I used Class instead of Class<?>. So I don't think you need
to introduce new 4.0 classes just to implement the wrapper methods.

> Add JDBC 4 Wrapper support
> --------------------------
>          Key: DERBY-940
>          URL: http://issues.apache.org/jira/browse/DERBY-940
>      Project: Derby
>         Type: New Feature
>   Components: JDBC
>     Reporter: Rick Hillegas
>     Assignee: V.Narayanan
>      Fix For:
>  Attachments: DERBY940_embedded.html, wrapper_ver1_embedded.diff, wrapper_ver1_embedded.stat
> As described in the JDBC 4 spec, sections 21 and 3.1.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message