コード例 #1
0
 /**
  * @param list
  * @return
  */
 public static List specieForFamilyDataAsLabelValueBean(List list) {
   List newList = new ArrayList();
   Iterator it = list.iterator();
   while (it.hasNext()) {
     Specie s = (Specie) it.next();
     LabelValueBean bean = new LabelValueBean(s.getName(), s.getId());
     newList.add(bean);
   }
   return newList;
 }
コード例 #2
0
 /**
  * @param list
  * @return
  */
 public static List specieDataAsLabelValueBean(List list) {
   if (specieListInMemory == null) {
     logger.debug("Creating species data as LabelValueBean for the first time...");
     specieListInMemory = new ArrayList();
     Iterator it = list.iterator();
     while (it.hasNext()) {
       Specie s = (Specie) it.next();
       LabelValueBean bean = new LabelValueBean(s.getName(), s.getId());
       specieListInMemory.add(bean);
     }
     specieListInMemory.add(0, new LabelValueBean("", ""));
   } else {
     logger.debug("Returning the species data as LabelValueBean without creating objects...");
   }
   return specieListInMemory;
 }