コード例 #1
0
  public static int GetFlag(String description) {
    Integer i = (Integer) AuthorizationRole.getReverse(description);
    if (i == null) {
      throw new IllegalArgumentException("Unknown value " + description);
    }

    return i.intValue();
  }
コード例 #2
0
  static {
    RightsDecodeMap.put(Integers.valueOf(RADG4), "RADG4");
    RightsDecodeMap.put(Integers.valueOf(RADG3), "RADG3");

    AuthorizationRole.put(Integers.valueOf(CVCA), "CVCA");
    AuthorizationRole.put(Integers.valueOf(DV_DOMESTIC), "DV_DOMESTIC");
    AuthorizationRole.put(Integers.valueOf(DV_FOREIGN), "DV_FOREIGN");
    AuthorizationRole.put(Integers.valueOf(IS), "IS");

    /*
    for (int i : RightsDecodeMap.keySet())
        ReverseMap.put(RightsDecodeMap.get(i), i);

    for (int i : AuthorizationRole.keySet())
        ReverseMap.put(AuthorizationRole.get(i), i);
    */
  }
コード例 #3
0
 public static String GetRoleDescription(int i) {
   return (String) AuthorizationRole.get(Integers.valueOf(i));
 }