コード例 #1
0
 public String fromInternalValue(String value) {
   SelectPosition constant = SelectPosition.parseValue(value);
   if (constant != null) {
     return constant.getName();
   }
   return "";
 }
コード例 #2
0
 public boolean canSetValue(String value) {
   if (value == null) {
     return true;
   }
   Iterator<SelectPosition> constants =
       ListSequence.fromList(SelectPosition.getConstants()).iterator();
   while (constants.hasNext()) {
     SelectPosition constant = constants.next();
     if (value.equals(constant.getName())) {
       return true;
     }
   }
   return false;
 }
コード例 #3
0
 public String toInternalValue(String value) {
   if (value == null) {
     return null;
   }
   Iterator<SelectPosition> constants =
       ListSequence.fromList(SelectPosition.getConstants()).iterator();
   while (constants.hasNext()) {
     SelectPosition constant = constants.next();
     if (value.equals(constant.getName())) {
       return constant.getValueAsString();
     }
   }
   return null;
 }