|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Validator
An object that implements this interface can be used to validate an object. Implementations of the interface should provide a way to set the object to be validated. Tipically the object to be validated will be passed to the validator constructor. The validator can also be used to retrieve validation meta-data.
| Method Summary | |
|---|---|
Constraint |
getPropertyConstraint(String propertyName,
String constraintName)
Retrieves validation meta-data about a property. |
Collection<Constraint> |
getPropertyConstraints(String propertyName)
Retrieves validation meta-data about a property. |
ValidationResult |
validateBean()
Check if an object is valid as a whole. |
ValidationResult |
validateProperty(String propertyName,
Object value)
Check if a value is valid for a property. |
| Method Detail |
|---|
ValidationResult validateBean()
ValidationResult validateProperty(String propertyName,
Object value)
propertyName - the name of the property to be checkedvalue - the value to be checked
Collection<Constraint> getPropertyConstraints(String propertyName)
propertyName - the name of the property
Constraint objects each containing a
constraint description
Constraint getPropertyConstraint(String propertyName,
String constraintName)
propertyName - the name of the propertyconstraintName - the name of the constraint to be retrieved
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||