[rules-users] Enumeration in BRMS

sreenivas555 yssr_555 at yahoo.com
Thu May 7 03:32:53 EDT 2009


hi All, 

I am loading the dropdown values from a DB / Bean. I want to even control
the values it is internally using. 
For Example: 
['3=Good','4=Very Good'] . It will display 'Good' for us but internally, it
uses the value 3 and display 'Very Good' for us but internally uses 4. 

Same way I want to use when it is loading from DB.

Java method.
   public List getDataFromDb(){
	   ArrayList al=new ArrayList();
		   al.add("verygood");
		   al.add("good");
		   al.add("bad");
	   return al;
   }

Above method is not giving me any control over the ids internally refered.

I tried the following But it is not working. Not sure whether the following
is correct. It is just a guess. 
 public Map getDataFromDb(){
	 Map m=new HashMap();
	 m.put(1, "very good");
	 m.put(3, "good");
	 m.put(5, "bad");
	 return m;
   }
  
Any help on this highly appreciable!!!! 

-- 
View this message in context: http://www.nabble.com/Enumeration-in-BRMS-tp23421669p23421669.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list