Skip site navigation (1) Skip section navigation (2)

Re: OT: easiest way to create a custom PreparedStatement class

From: Craig Servin <cservin(at)cdhps(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org, murphy(at)genome(dot)chop(dot)edu
Subject: Re: OT: easiest way to create a custom PreparedStatement class
Date: 2005-06-28 19:42:39
Message-ID: 200506281442.39797.cservin@cdhps.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Or you could use:

java.lang.reflect.Proxy




On Tuesday 28 June 2005 01:55 pm, Kevin Murphy wrote:
> I am modifying some existing data loading code (that only makes use of 4
> or 5 methods from PreparedStatement) to optionally be able to *not*
> connect to a database but instead dump either the generated SQL code or
> the raw insert data to files on the file system.
>
> It would be great if I could just overload PreparedStatement with my own
> classes, but unfortunately it is an interface, so I presumably need to
> implement stubs for the umpty-ump methods defined by PreparedStatement?
>
> Is this true, and if so, what is the easiest/fastest way to do this (if
> it is even possible)?
>
> I am a java newbie, by the way.  Don't flame me too hard.  I did say
> "OT", after all ;-)
>
> Thanks,
> Kevin
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>        message can get through to the mailing list cleanly

In response to

pgsql-jdbc by date

Next:From: Craig ServinDate: 2005-06-28 19:55:09
Subject: Re: OT: easiest way to create a custom PreparedStatement class
Previous:From: Kevin MurphyDate: 2005-06-28 18:55:25
Subject: OT: easiest way to create a custom PreparedStatement class

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group