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