예제 #1
0
 public List<Classification> listAll() {
   if ("Flg".equals(name())) {
     return toClassificationList(CDef.Flg.listAll());
   }
   if ("MemberStatus".equals(name())) {
     return toClassificationList(CDef.MemberStatus.listAll());
   }
   if ("ServiceRank".equals(name())) {
     return toClassificationList(CDef.ServiceRank.listAll());
   }
   if ("Region".equals(name())) {
     return toClassificationList(CDef.Region.listAll());
   }
   if ("WithdrawalReason".equals(name())) {
     return toClassificationList(CDef.WithdrawalReason.listAll());
   }
   if ("ProductCategory".equals(name())) {
     return toClassificationList(CDef.ProductCategory.listAll());
   }
   if ("ProductStatus".equals(name())) {
     return toClassificationList(CDef.ProductStatus.listAll());
   }
   throw new IllegalStateException("Unknown definition: " + this); // basically unreachable
 }
예제 #2
0
 public Classification nameOf(String name) {
   if ("Flg".equals(name())) {
     return CDef.Flg.valueOf(name);
   }
   if ("MemberStatus".equals(name())) {
     return CDef.MemberStatus.valueOf(name);
   }
   if ("ServiceRank".equals(name())) {
     return CDef.ServiceRank.valueOf(name);
   }
   if ("Region".equals(name())) {
     return CDef.Region.valueOf(name);
   }
   if ("WithdrawalReason".equals(name())) {
     return CDef.WithdrawalReason.valueOf(name);
   }
   if ("ProductCategory".equals(name())) {
     return CDef.ProductCategory.valueOf(name);
   }
   if ("ProductStatus".equals(name())) {
     return CDef.ProductStatus.valueOf(name);
   }
   throw new IllegalStateException("Unknown definition: " + this); // basically unreachable
 }