org.hibernate.validator.constraints.impl
Class PastValidatorForDate

java.lang.Object
  extended by org.hibernate.validator.constraints.impl.PastValidatorForDate
All Implemented Interfaces:
ConstraintValidator<Past,Date>

public class PastValidatorForDate
extends Object
implements ConstraintValidator<Past,Date>

Check that the java.util.Date passed to be validated is in the past.

Author:
Alaa Nassef

Constructor Summary
PastValidatorForDate()
           
 
Method Summary
 void initialize(Past constraintAnnotation)
           
 boolean isValid(Date date, ConstraintValidatorContext constraintValidatorContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PastValidatorForDate

public PastValidatorForDate()
Method Detail

initialize

public void initialize(Past constraintAnnotation)
Specified by:
initialize in interface ConstraintValidator<Past,Date>

isValid

public boolean isValid(Date date,
                       ConstraintValidatorContext constraintValidatorContext)
Specified by:
isValid in interface ConstraintValidator<Past,Date>


Copyright © 2007-2011 Red Hat Middleware, LLC. All Rights Reserved