Re: JDK 1.4 challenge, opinions please

From: Rene Pijlman <rene(at)lab(dot)applinet(dot)nl>
To: Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>
Cc: PostgreSQL-JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDK 1.4 challenge, opinions please
Date: 2001-12-17 23:08:18
Message-ID: e6us1uo3n765p9aojhi4gc7585cu8eibh7@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 17 Dec 2001 09:46:41 -0700, you wrote:
>Couldn't the method that creates the resultSet to be used/abused be an
>abstract method that the jdbcge2/DatabaseMetaData calls? For instance,
>jdbcge2/DatabaseMetaData has a protected method
> protected ResultSet getResultSet();
>and then the jdbc2/DatabaseMetaData and jdbc3/DatabaseMetaData classes
>that inherit from jdbcge2/DatabaseMetaData implement it to return the
>proper one? Then jdbcge2/DatabaseMetaData can set the needed data in
>the ResultSet.

Yes, this looks like a better idea. Its amazing how
non-intuitive Object Orientation can be :-) I'll continue on
this path.

>Did that make sense? ;-)

Very much so! Thanks for pointing me in the right direction.

And I wrote:
>> There are other problems up ahead though, such as common code in
>> jdbcge2 that references constants from java.sql (e.g.
>> FETCH_FORWARD).

This turns out to be a non-problem. I just needed to qualify the
constants with the java.sql.Interface prefix, since the class
containing this code no longer implements the interface.

There may be some cases of constants that exist only in some
versions of the JDBC API, but this can be handled with a similar
inheritance workaround as you described for creating
ResultSet's.

Regards,
René Pijlman <rene(at)lab(dot)applinet(dot)nl>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Antonio Fiol Bonnín 2001-12-18 08:58:12 Re: Servlet problems
Previous Message Jayesh K. Parayali 2001-12-17 17:44:51 Re: Servlet problems