コード例 #1
0
 @Override
 public PetType parse(String text, Locale locale) throws ParseException {
   Collection<PetType> findPetTypes = this.clinicService.findPetTypes();
   for (PetType type : findPetTypes) {
     if (type.getName().equals(text)) {
       return type;
     }
   }
   throw new ParseException("type not found: " + text, 0);
 }
コード例 #2
0
 @Override
 public String print(PetType petType, Locale locale) {
   return petType.getName();
 }