ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enrique Ferreyra <eferre...@gmail.com>
Subject Re: Warnings at queryForList
Date Sat, 08 Apr 2006 11:03:33 GMT
I think this thread answer why the annotation (SuppressWarnings) is 
necessary, in general :)


Ben Munat escribi├│:

> duh... good point... boundaries between libraries and app code is one 
> place where generics really get annoying... that and typing the damn 
> types over and over.
> b
> Jeff Butler wrote:
>> <snip>
>> On a side note to the ibatis devs, what's the road map for having 
>> ibatis query methods return type-specific collections? Will you ever 
>> do so (since that would break backwards compatibility, right?)?
>> </snip>
>> It's not just a backwards compatibility problem...
>> The problem with iBATIS returning type specific collections is that 
>> iBATIS has no way of knowing that the type should be when it's 
>> compiled - the type is dependant on what you've configured and it 
>> changes at runtime.  So I think the best iBATIS could do would be to 
>> return List<Object> - basically the same thing it does now.
>> You can always cast to the proper parameterized type in your DAO 
>> method and do the warning suppress (just like you can do now).  Maybe 
>> I'm missing something fundamental, but I don't see a way for it to be 
>> better than that.
>> Isn't it all just syntax sugar anyway? :-)
>> Jeff Butler

  A.U.S. Enrique Ferreyra
    Centro de C├│mputos
 Red Megatone - Red Confina

View raw message