org.datamanager.constraint
Class DateValueRangeConstraint

java.lang.Object
  |
  +--org.datamanager.kernel.AbstractEntityConstraint
        |
        +--org.datamanager.constraint.DateValueRangeConstraint
All Implemented Interfaces:
Constraint, EntityConstraint, EntityValue, Serializable

public class DateValueRangeConstraint
extends AbstractEntityConstraint

Matches a DateEntityValue with a range described by two Date. This class matches any Entity that has a DateEntityValue that is between the Dates given in the constructor of this class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.datamanager.kernel.AbstractEntityConstraint
DEBUG_ACCEPTS_MESSAGE
 
Fields inherited from interface org.datamanager.constraint.EntityConstraint
NONE
 
Constructor Summary
DateValueRangeConstraint(Date min, Date max)
          The default constructor.
 
Method Summary
protected  boolean describes(Entity defendant)
          Decide if the Entity is valid or not.
 
Methods inherited from class org.datamanager.kernel.AbstractEntityConstraint
accepts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateValueRangeConstraint

public DateValueRangeConstraint(Date min,
                                Date max)
The default constructor. It uses indexOf() to find the given String in a StringEntityValue.

Method Detail

describes

protected boolean describes(Entity defendant)
                     throws DataManagerException
Decide if the Entity is valid or not. It uses indexOf() to find the given String in a StringEntityValue.

Specified by:
describes in class AbstractEntityConstraint
Parameters:
defendant - An entity to check.
Returns:
Whether the entity is acceptable or not.
DataManagerException


See the Helium Website