コード例 #1
0
ファイル: ResearchStaff.java プロジェクト: gopuv/caaers
 /**
  * Gets the site roles mapping.
  *
  * @return the site roles mapping
  */
 @Transient
 public Map<String, List<String>> getSiteRolesMapping() {
   Map<String, List<String>> siteRolesMap = new HashMap<String, List<String>>();
   List<String> roleCodeList = null;
   for (SiteResearchStaff siteResearchStaff : getSiteResearchStaffs()) {
     for (SiteResearchStaffRole siteResearchStaffRole :
         siteResearchStaff.getSiteResearchStaffRoles()) {
       roleCodeList = new ArrayList<String>();
       roleCodeList.add(siteResearchStaffRole.getRoleCode());
     }
     siteRolesMap.put(siteResearchStaff.getOrganization().getNciInstituteCode(), roleCodeList);
   }
   return siteRolesMap;
 }
コード例 #2
0
ファイル: ResearchStaff.java プロジェクト: gopuv/caaers
 /**
  * Gets the all roles.
  *
  * @return the all roles
  */
 @Transient
 public List<String> getAllRoles() {
   Set<String> roleSet = new HashSet<String>();
   for (SiteResearchStaff siteResearchStaff : getSiteResearchStaffs()) {
     for (SiteResearchStaffRole siteResearchStaffRole :
         siteResearchStaff.getSiteResearchStaffRoles()) {
       if (siteResearchStaffRole.isActive()) {
         roleSet.add(siteResearchStaffRole.getRoleCode());
       }
     }
   }
   List<String> roleList = new ArrayList<String>();
   roleList.addAll(roleSet);
   return roleList;
 }