Here's what I would do assuming the list is called productList and has a
productId in it and you wanted to map the list by productId:
FastMap returnMap = FastMap.newInstance();
for(int i = 0; i < productList.size(); i++)
{
GenericValue product = (GenericValue)productList.get(i);
returnMap.put(product.getString("productId", product);
}
Skip
-----Original Message-----
From: Vedam B [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2008 10:21 PM
To: [email protected]
Subject: convert list of Generic value to Map
Hi,
Can some one help on "how to convert list of generic values returned using
findByConditionCache to a Map".
Regards
Vedam
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 3/10/2008
7:27 PM
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 3/10/2008
7:27 PM