net.leadware.persistence.tools.api.validator.jsr303ext
Class IntervalRule

java.lang.Object
  extended by net.leadware.persistence.tools.api.validator.jsr303ext.IntervalRule
All Implemented Interfaces:
javax.validation.ConstraintValidator<Interval,Number>

public class IntervalRule
extends Object
implements javax.validation.ConstraintValidator<Interval,Number>

Classe implementant la regle de validation controlant que la valeur d'une proprité se trouve dans un intervalle donne

Author:
Jean-Jacques ETUNÈ NGI

Field Summary
private  Number max
          Valeur maximale de l'intervalle
private  Number min
          Valeur minimum de l'intervalle
 
Constructor Summary
IntervalRule()
           
 
Method Summary
 void initialize(Interval annotation)
           
 boolean isValid(Number value, javax.validation.ConstraintValidatorContext constraintContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

min

private Number min
Valeur minimum de l'intervalle


max

private Number max
Valeur maximale de l'intervalle

Constructor Detail

IntervalRule

public IntervalRule()
Method Detail

initialize

public void initialize(Interval annotation)
Specified by:
initialize in interface javax.validation.ConstraintValidator<Interval,Number>

isValid

public boolean isValid(Number value,
                       javax.validation.ConstraintValidatorContext constraintContext)
Specified by:
isValid in interface javax.validation.ConstraintValidator<Interval,Number>


Copyright © 2014 Leadware. All Rights Reserved.