ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abdullah Kauchali" <abdullah.kauch...@isanusi.com>
Subject RE: Can we do with specifying resultClass and parameterClass at runtime?
Date Wed, 31 Jan 2007 05:55:02 GMT
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.




>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"!   :-)


Many thanks & kind regards,





View raw message