예제 #1
0
 @Override
 public String getCode(MerchantLevel merchantLevel) {
   if (null != merchantLevel) {
     for (MerchantLevel temp : MerchantLevel.values()) {
       if (merchantLevel.equals(temp)) {
         return merchantLevel.code;
       }
     }
   }
   return null;
 }
예제 #2
0
 @Override
 public MerchantLevel getEnum(String code) {
   if (null != code) {
     for (MerchantLevel merchantLevel : MerchantLevel.values()) {
       if (merchantLevel.code.equals(code)) {
         return merchantLevel;
       }
     }
   }
   return null;
 }