ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Fotiou" <Mike.Fot...@pwgsc.gc.ca>
Subject RE: Automatically Create Maps
Date Wed, 29 Jun 2005 15:31:18 GMT
The 3rd parameter is the getXXX method to use as the Map key when put(Object key, Object value)
is called...


String userId = "BILL";

Map roles = sqlMapClient.QueryForMap("getUserRoles", userId, "roleCode")

This will create a HashMap containing all the roles for BILL, which are represented as UserRole
objects, keyed by the getRoleCode() method of each UserRole instance added to the map.

-----Original Message-----
From: Folashade Adeyosoye [mailto:shardayyy@gmail.com]
Sent: Wednesday, June 29, 2005 11:13 AM
To: user-java@ibatis.apache.org
Subject: RE: Automatically Create Maps

What is the 3rd parameter (keyProperty) used for

QueryForMap(string statementName, object parameterObject, string


-----Original Message-----
From: Larry Meadors [mailto:larry.meadors@gmail.com] 
Sent: Wednesday, June 29, 2005 10:39 AM
To: user-java@ibatis.apache.org
Subject: Re: Automatically Create Maps

Yes, there is.

On 6/29/05, Mike Fotiou <Mike.Fotiou@pwgsc.gc.ca> wrote:
> Is there any way in IBATIS to create a Map via the XML file instead of a
> List/Collection?  This is possible programmatically using queryForMap.  If
> not, would it be useful in a future version of IBATIS?

View raw message