org.hibernate.validator
Class RangeValidator

java.lang.Object
  extended by org.hibernate.validator.RangeValidator
All Implemented Interfaces:
Serializable, PropertyConstraint, Validator<Range>

public class RangeValidator
extends Object
implements Validator<Range>, PropertyConstraint, Serializable

The value has to be in a defined range, the constraint is also applied on DB

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
RangeValidator()
           
 
Method Summary
 void apply(org.hibernate.mapping.Property property)
           
 void initialize(Range 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
 

Constructor Detail

RangeValidator

public RangeValidator()
Method Detail

initialize

public void initialize(Range parameters)
Description copied from interface: Validator
Take the annotations values

Specified by:
initialize in interface Validator<Range>

isValid

public boolean isValid(Object value)
Description copied from interface: Validator
does the object/element pass the constraints

Specified by:
isValid in interface Validator<Range>

apply

public void apply(org.hibernate.mapping.Property property)
Specified by:
apply in interface PropertyConstraint