org.hibernate.validator
Class LengthValidator
java.lang.Object
org.hibernate.validator.LengthValidator
- All Implemented Interfaces:
- Serializable, PropertyConstraint, Validator<Length>
public class LengthValidator
- extends Object
- implements Validator<Length>, PropertyConstraint, Serializable
Do check a length restriction on a string, and apply expected contraints on hibernate metadata.
- Author:
- Gavin King
- See Also:
- Serialized Form
Method Summary |
void |
apply(org.hibernate.mapping.Property property)
|
void |
initialize(Length parameters)
Take the annotations values |
boolean |
isValid(Object value)
does the object/element pass the constraints |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LengthValidator
public LengthValidator()
initialize
public void initialize(Length parameters)
- Description copied from interface:
Validator
- Take the annotations values
- Specified by:
initialize
in interface Validator<Length>
isValid
public boolean isValid(Object value)
- Description copied from interface:
Validator
- does the object/element pass the constraints
- Specified by:
isValid
in interface Validator<Length>
apply
public void apply(org.hibernate.mapping.Property property)
- Specified by:
apply
in interface PropertyConstraint