|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.codestreet.messageforge.RFldConstraintI64 com.codestreet.messageforge.RFldConstraintI64MinMax
Class to represent a minimum/maximum value constraint on a long numeric message field.
Field Summary | |
protected long |
maxVal_
Maximum value allowed. |
protected boolean |
maxValSet_
Flag to indicate if maximum value constraint is set. |
protected long |
minVal_
Minimum value allowed. |
protected boolean |
minValSet_
Flag to indicate if minimum value constraint is set. |
Method Summary | |
java.lang.String |
errDesc(java.lang.String fldName)
Get error description. |
boolean |
isValid(long val)
Check if a value satisfies the constraint. |
static RFldConstraintI64MinMax |
valueOf(java.lang.String key,
java.lang.String fldName,
boolean minSet,
java.lang.Long min,
boolean maxSet,
java.lang.Long max)
Factory. |
static RFldConstraintI64MinMax |
valueOf(java.lang.String key,
java.lang.String fldName,
boolean minSet,
java.lang.String min,
boolean maxSet,
java.lang.String max)
Factory. |
Methods inherited from class com.codestreet.messageforge.RFldConstraintI64 |
isValid, validate, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean minValSet_
protected boolean maxValSet_
protected long minVal_
protected long maxVal_
Method Detail |
public static RFldConstraintI64MinMax valueOf(java.lang.String key, java.lang.String fldName, boolean minSet, java.lang.Long min, boolean maxSet, java.lang.Long 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 length allowed. If this is null then no
constraint is placed on the minimum length.maxSet
- Flag to indicate whether max value is set.max
- Maximum length allowed. If this is null then no
constraint is placed on the maximum length.
FieldValidationException
public static RFldConstraintI64MinMax valueOf(java.lang.String key, java.lang.String fldName, boolean minSet, java.lang.String min, boolean maxSet, java.lang.String 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 length allowed. If this is null then no
constraint is placed on the minimum length.maxSet
- Flag to indicate whether max value is set.max
- Maximum length allowed. If this is null then no
constraint is placed on the maximum length.
FieldValidationException
public java.lang.String errDesc(java.lang.String fldName)
fldName
- Field name.
public boolean isValid(long val)
isValid
in class RFldConstraintI64
val
- Field value to validate.
RFld
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |