@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);
    }
Instructs Spring MVC on how to parse and print elements of type 'PetType'. Starting from Spring 3.0, Formatters have
come as an improvement in comparison to legacy PropertyEditors. See the following links for more details: - The
Spring ref doc: http://static.springsource.org/spring/docs/current/spring-framework-reference/html/validation.html#format-Formatter-SPI
- A nice blog entry from Gordon Dickens: http://gordondickens.com/wordpress/2010/09/30/using-spring-3-0-custom-type-converter/
<p/>
Also see how the bean 'conversionService' has been declared inside /WEB-INF/mvc-core-config.xml

@author Mark Fisher
@author Juergen Hoeller
@author Michael Isvy
src/main/java/org/springframework/samples/petclinic/web/PetTypeFormatter.java