ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Huy <huym...@swiftdsl.com.au>
Subject Re: Flexible ResultMaps (Again)
Date Sun, 06 Feb 2005 22:07:26 GMT
Larry Meadors wrote:
> On Sun, 06 Feb 2005 09:31:21 +1100, Huy <huymail@swiftdsl.com.au> wrote:
>>Yeah, I hate all that casting stuff you have to do in java when getting
>>things out of collections. Generics thing in java 1.5 might help out
>>with this.
> Not really. :-(
> It will help for things where every element of the collection are the
> same type. I did a simple JDK5 iBATIS app, and used strongly typed
> lists - VERY cool! Using List<Customer> is much nicer than
> "(Customer)List.get(i)" for everything.
> But, for a Map, since all the "properties" in your "domain" objects
> are not the same type, the Map cannot be typed.
> Larry

I try to avoid all this casting by just using Arrays. Its much clearing 
when you have  Customer[] getCustomers() in your DAO.


View raw message