コード例 #1
0
ファイル: Functions.java プロジェクト: magicgis/authManager
 public static String organizationName(Long organizationId) {
   Organization organization = getOrganizationService().findOne(organizationId);
   if (organization == null) {
     return "";
   }
   return organization.getOrgName();
 }
コード例 #2
0
ファイル: Functions.java プロジェクト: magicgis/authManager
  public static String organizationNames(Collection<Long> organizationIds) {
    if (CollectionUtils.isEmpty(organizationIds)) {
      return "";
    }

    StringBuilder s = new StringBuilder();
    for (Long organizationId : organizationIds) {
      Organization organization = getOrganizationService().findOne(organizationId);
      if (organization == null) {
        return "";
      }
      s.append(organization.getOrgName());
      s.append(",");
    }

    if (s.length() > 0) {
      s.deleteCharAt(s.length() - 1);
    }

    return s.toString();
  }