X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AFA40529FB for ; Tue, 28 Jun 2005 16:42:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30961-05 for ; Tue, 28 Jun 2005 19:42:47 +0000 (GMT) Received: from bedrock.cromagnon.com (170-215-19-8.dsl1.mnd.mn.frontiernet.net [170.215.19.8]) by svr1.postgresql.org (Postfix) with ESMTP id 4CCFA529EA for ; Tue, 28 Jun 2005 16:42:44 -0300 (ADT) Received: from lt-cservin.cdhps.com (cservin.dsl.visi.com [209.98.143.247]) (authenticated bits=0) by bedrock.cromagnon.com (8.12.8/8.12.8) with ESMTP id j5SJgevl002596 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 28 Jun 2005 14:42:42 -0500 From: Craig Servin Organization: CMS To: pgsql-jdbc@postgresql.org, murphy@genome.chop.edu Subject: Re: OT: easiest way to create a custom PreparedStatement class Date: Tue, 28 Jun 2005 14:42:39 -0500 User-Agent: KMail/1.8 References: <42C19D1D.30809@genome.chop.edu> In-Reply-To: <42C19D1D.30809@genome.chop.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506281442.39797.cservin@cdhps.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/144 X-Sequence-Number: 13106 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@postgresql.org so that your > message can get through to the mailing list cleanly