com.codestreet.messageforge
Interface RFldConstraint

All Known Subinterfaces:
RFldConstraintNumeric
All Known Implementing Classes:
RFldConstraintDatetime, RFldConstraintF32, RFldConstraintF64, RFldConstraintI16, RFldConstraintI32, RFldConstraintI64, RFldConstraintI8, RFldConstraintString

public interface RFldConstraint

Interface to represent a constraint on a message field.

Author:
Jawaid Hakim.

Method Summary
 java.lang.String errDesc(java.lang.String fldName)
          Get error description.
 boolean isValid(RFld fld)
          Check if a message field satisfies the constraint.
 void validate(RFld fld)
          Check if a message field satisfies the constraint.
 

Method Detail

isValid

public boolean isValid(RFld fld)
Check if a message field satisfies the constraint.

Parameters:
fld - Field to validate.
Returns:
true if the field satisfies the constraint. Otherwise, false is returned.
See Also:
RFld

validate

public void validate(RFld fld)
              throws FieldValidationException
Check if a message field satisfies the constraint.

Parameters:
fld - Field to validate.
Throws:
FieldValidationException
See Also:
RFld

errDesc

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

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


Copyright © 2003-2006 CodeStreet. All Rights Reserved.