com.codestreet.messageforge
Class RFldConstraintDatetimeEnum

java.lang.Object
  extended bycom.codestreet.messageforge.RFldConstraintDatetime
      extended bycom.codestreet.messageforge.RFldConstraintDatetimeEnum
All Implemented Interfaces:
RFldConstraint

public class RFldConstraintDatetimeEnum
extends RFldConstraintDatetime

Class to represent an enumeration constraint on a date/time message field.

Author:
Jawaid Hakim.

Field Summary
protected  java.util.Date[] enums_
          Enumeration of allowed values.
 
Constructor Summary
RFldConstraintDatetimeEnum(java.lang.String fldName, java.util.Date[] enums)
          Constructor.
 
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.
 
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

enums_

protected java.util.Date[] enums_
Enumeration of allowed values.

Constructor Detail

RFldConstraintDatetimeEnum

public RFldConstraintDatetimeEnum(java.lang.String fldName,
                                  java.util.Date[] enums)
                           throws FieldValidationException
Constructor.

Parameters:
fldName - Name of field to which this constraint is bound.
enums - Enumeration of allowed values.
Method Detail

errDesc

public java.lang.String errDesc(java.lang.String fldName)
Get error description.

Parameters:
fldName - Field name.
Returns:
Error description.

isValid

public boolean isValid(java.util.Date val)
Check if a value satisfies the constraint.

Specified by:
isValid in class RFldConstraintDatetime
Parameters:
val - Data to validate.
Returns:
true if the data satisfied the constraint. Otherwise, false is returned.


Copyright © 2003-2006 CodeStreet. All Rights Reserved.