You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Jason Hall <JH...@cihi.ca> on 2005/06/14 20:05:51 UTC

Array of Domain Objects - from queryObject

Hi,

Is there a way to get an array of Domain objects or a list of domain objects using
any of the the queryxxxx methods. Instead of a list of HashMaps or HashMap of HashMaps?

ex. Employee employee[]  = queryForObject("getEmployee",null);

Or do I have to do this manually by extracting from the HashMap into the Domain objects then into array?

Thanks,

JH.

Re: Array of Domain Objects - from queryObject

Posted by Larry Meadors <la...@gmail.com>.
Man, this sounds like an RTFM kinda question unless I am misreading it.

resultClass="my.domain.ObjectClass"

List employeeList  = queryForList("getEmployee",null);

Larry


On 6/14/05, Jason Hall <JH...@cihi.ca> wrote:
>  
> 
> Hi, 
> 
> Is there a way to get an array of Domain objects or a list of domain objects
> using 
> any of the the queryxxxx methods. Instead of a list of HashMaps or HashMap
> of HashMaps? 
> 
> ex. Employee employee[]  =
> queryForObject("getEmployee",null); 
> 
> Or do I have to do this manually by extracting from the HashMap into the
> Domain objects then into array? 
> 
> Thanks, 
> 
> JH.