|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.codestreet.messageforge.RFldConstraintDatetime com.codestreet.messageforge.RFldConstraintDatetimeMinMax
Class to represent a minumum/maximum date constraint on a datetime message field.
Field Summary | |
protected java.util.Date |
maxDate_
Maximum date allowed. |
protected boolean |
maxSet_
|
protected java.util.Date |
minDate_
Minimum date allowed. |
protected boolean |
minSet_
|
Method Summary | |
java.lang.String |
errDesc(java.lang.String fldName)
Get error description. |
boolean |
isValid(java.util.Date val)
Check if a value satisfies the constraint. |
static RFldConstraintDatetimeMinMax |
valueOf(java.lang.String key,
java.lang.String fldName,
boolean minSet,
java.util.Date min,
boolean maxSet,
java.util.Date max)
Factory. |
Methods inherited from class com.codestreet.messageforge.RFldConstraintDatetime |
isValid, validate, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Date minDate_
protected java.util.Date maxDate_
protected boolean minSet_
protected boolean maxSet_
Method Detail |
public static RFldConstraintDatetimeMinMax valueOf(java.lang.String key, java.lang.String fldName, boolean minSet, java.util.Date min, boolean maxSet, java.util.Date max) throws FieldValidationException
key
- Key to use for caching constraint.fldName
- Name of field to which this constraint is bound.minSet
- Flag to indicate whether min value is set.min
- Minimum date allowed. If this is null then no
constraint is placed on the minimum date.maxSet
- Flag to indicate whether max value is set.max
- Maximum date allowed. If this is null then no
constraint is placed on the maximum date.
FieldValidationException
public java.lang.String errDesc(java.lang.String fldName)
fldName
- Field name.
public boolean isValid(java.util.Date val)
isValid
in class RFldConstraintDatetime
val
- Data to validate.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |