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
Method Summary |
protected boolean |
describes(Entity defendant)
Decide if the Entity is valid or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateValueRangeConstraint
public DateValueRangeConstraint(Date min,
Date max)
- The default constructor. It uses indexOf() to
find the given String in a StringEntityValue.
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