コード例 #1
0
 void processOrgNode(LegalEntityNode orgNode, List<DictionaryEntity> results) {
   Enumeration<Node> enumeration = orgNode.children();
   while (enumeration.hasMoreElements()) {
     LegalEntityNode childNode = (LegalEntityNode) enumeration.nextElement();
     DictionaryEntity dictionaryEntity = new DictionaryEntity();
     dictionaryEntity.setCode(childNode.getId());
     dictionaryEntity.setName(childNode.getName());
     results.add(dictionaryEntity);
   }
 }
コード例 #2
0
 @Override
 public List<DictionaryEntity> getDictionaryEntities() {
   List<DictionaryEntity> results = new ArrayList<DictionaryEntity>();
   LegalEntityNode orgNode = LegalEntityCacheUtils.getTopNode();
   Enumeration<Node> enumeration = orgNode.children();
   while (enumeration.hasMoreElements()) {
     LegalEntityNode childNode = (LegalEntityNode) enumeration.nextElement();
     DictionaryEntity dictionaryEntity = new DictionaryEntity();
     dictionaryEntity.setCode(childNode.getId());
     dictionaryEntity.setName(childNode.getName());
     results.add(dictionaryEntity);
     processOrgNode(childNode, results);
   }
   return results;
 }