Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 8742 invoked from network); 31 Jan 2007 05:55:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jan 2007 05:55:30 -0000 Received: (qmail 28012 invoked by uid 500); 31 Jan 2007 05:55:34 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 27862 invoked by uid 500); 31 Jan 2007 05:55:33 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 27851 invoked by uid 99); 31 Jan 2007 05:55:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2007 21:55:33 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [196.25.240.73] (HELO ctb-mesg3.saix.net) (196.25.240.73) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2007 21:55:23 -0800 Received: from isanusid800 (dsl-241-238-213.telkomadsl.co.za [41.241.238.213]) by ctb-mesg3.saix.net (Postfix) with ESMTP id 1FA9727B5 for ; Wed, 31 Jan 2007 07:54:59 +0200 (SAST) From: "Abdullah Kauchali" To: Subject: RE: Can we do with specifying resultClass and parameterClass at runtime? Date: Wed, 31 Jan 2007 07:55:02 +0200 Organization: iSanusi Systems Architects Message-ID: <000001c744fc$59f40480$0300a8c0@isanusid800> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C7450D.1D7CD480" X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcdEtFVYhcR9tHYYT3yqAIJ2ufMyLgAROh4g In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C7450D.1D7CD480 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Jeff! >You can delay parameterClass to runtime already - > you don't need to specify it at configuration time. Yes, of course: queryForList(String id, Object paramObject) does that already! (Sorry, my previous message where I gave an example of the API was wrong. It should have been: queryForList(String id, Object paramObject, java.lang.Class resultClass) >For results, you could use a HashMap as the resultclass and then >convert to your desired class, or you could specify some common >interface and use the ResultObjectFactory to specify the implementation >at runtime. Understood. >Lastly, if this has something to do with polymorphic queries, then you >might take a look at the tag - it might do what you want. I like the sound of "polymorphic queries"! :-) Many thanks & kind regards, A ------=_NextPart_000_0001_01C7450D.1D7CD480 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi = Jeff!

 

=

>You can delay parameterClass to runtime already –

> you don't need to specify it at configuration = time.

 

=

Yes, of = course:

  =   queryForList(String id, Object = paramObject)

does that = already!

 

=

(Sorry, my previous message where = I gave an example of the API was wrong.  It should have = been:

    = queryForList(String id, Object paramObject, java.lang.Class resultClass)

 

=

>For results, you could use a HashMap as the resultclass and = then

>convert to your desired class, or you could specify some = common

>interface and use the ResultObjectFactory to specify the implementation

>at runtime.

 

=

Understood.  =

 

>Lastly, if this has something to do with polymorphic = queries, then you

>might take a look at the <discriminator> tag - it = might do what you want.

 

I like the sound of = “polymorphic queries”!   J

 

=

Many thanks & kind = regards,

 

=

A

 

=

 

------=_NextPart_000_0001_01C7450D.1D7CD480--