it.amattioli.dominate.validation
Class DefaultValidator
java.lang.Object
it.amattioli.dominate.validation.ChainedValidator
it.amattioli.dominate.validation.DefaultValidator
- All Implemented Interfaces:
- Validator
public class DefaultValidator
- extends ChainedValidator
A default implementation of the Validator interface.
This implementation can perform validation in two distinct ways:
- using Hibernate Validator
- using validation methods
To validate a property using Hibernate Validator simply annotate
one of its accessor methods with a Hibernate Validator compliant
annotation.
To validate a property using validation methods you have to create
a public method in the validating class whose name must be of the form:
public ValidationResult validatePropertyName(PropertyClass validatingValue)
- Author:
- andrea
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultValidator
public DefaultValidator(Object validatingBean)
itselfValidateBean
protected ValidationResult itselfValidateBean()
- Specified by:
itselfValidateBean in class ChainedValidator
itselfValidateProperty
protected ValidationResult itselfValidateProperty(String propertyName,
Object value)
- Specified by:
itselfValidateProperty in class ChainedValidator
itselfGetPropertyConstraints
protected Collection<Constraint> itselfGetPropertyConstraints(String propertyName)
- Specified by:
itselfGetPropertyConstraints in class ChainedValidator
Copyright © 2011. All Rights Reserved.