Exemplo n.º 1
0
 /**
  * This method constructs a HashMap (Long typeId, TypeFacade typeFacade) with the items in
  * typeList
  *
  * @param typeList
  * @return a HashMap
  */
 private HashMap createTypeFacadeMapById(List typeList) {
   HashMap typeFacadeMap = new HashMap();
   for (int i = 0; i < typeList.size(); i++) {
     TypeD typeData = (TypeD) typeList.get(i);
     TypeFacade typeFacade = new TypeFacade(typeData);
     typeFacadeMap.put(typeData.getTypeId(), typeFacade);
   }
   return typeFacadeMap;
 }
Exemplo n.º 2
0
 public List getFacadeListByAuthorityDomain(String authority, String domain) {
   ArrayList typeList = new ArrayList();
   List list = getListByAuthorityDomain(authority, domain);
   for (int i = 0; i < list.size(); i++) {
     TypeD type = (TypeD) list.get(i);
     TypeFacade f =
         new TypeFacade(
             type.getAuthority(), type.getDomain(), type.getKeyword(), type.getDescription());
     f.setTypeId(type.getTypeId());
     typeList.add(f);
   }
   return (List) typeList;
 }