|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.web.validation.Word
com.bea.web.validation.IntegerWord
Determines if a value is a valid Java Integer between a specified range. By default, any Java int is valid.
Constructor Summary | |
IntegerWord()
|
Method Summary | |
protected IValidationResult |
checkAdditional(Integer value,
ResourceBundle bundle)
This method is called by the validate method after the lower
and upper bounds have been validated. |
protected IValidationResult |
checkLowerBound(Integer value,
ResourceBundle bundle)
Checks value against the lower bound,
minInclusive or minExclusive. |
protected IValidationResult |
checkUpperBound(Integer value,
ResourceBundle bundle)
Checks value against the upper bound,
maxInclusive or maxExclusive. |
Integer |
getMaxExclusive()
|
Integer |
getMaxInclusive()
|
Integer |
getMaxValue()
|
Integer |
getMinExclusive()
|
Integer |
getMinInclusive()
|
Integer |
getMinValue()
|
void |
setMaxExclusive(String strMaxExclusive)
Sets the value for the maximum exclusive constraining facet. |
void |
setMaxInclusive(String strMaxInclusive)
Sets the value for the maximum inclusive constraining facet. |
void |
setMinExclusive(String strMinExclusive)
Sets the value for the minimum exclusive constraining facet. |
void |
setMinInclusive(String strMinInclusive)
Sets the value for the minimum inclusive constraining facet. |
String |
toString()
|
IValidationResult |
validate(String strValue,
ResourceBundle bundle)
|
Methods inherited from class com.bea.web.validation.Word |
formatMessage, formatMessage, getKey, getPattern, getResource, isRequired, matchesPattern, setKey, setPattern, setRequired |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IntegerWord()
Method Detail |
public IValidationResult validate(String strValue, ResourceBundle bundle)
validate
in class Word
protected IValidationResult checkLowerBound(Integer value, ResourceBundle bundle)
value
against the lower bound,
minInclusive or minExclusive.
value
- - the Integer value to compare against the lower bound
value
satifies the lower
bound. If return value is not null, then value
does not
satisfy the lower bound.protected IValidationResult checkUpperBound(Integer value, ResourceBundle bundle)
value
against the upper bound,
maxInclusive or maxExclusive.
value
- - the Integer value to compare against the upper bound
value
satifies the upper
bound. If return value is not null, then value
does not
satisfy the upper bound.protected IValidationResult checkAdditional(Integer value, ResourceBundle bundle)
validate
method after the lower
and upper bounds have been validated. This method returns null. Sub-classes
can override this method to supply additional validation on the Integer
value and still benefit from the parse and lower/upper bounds checking
provided by the current implementation of validate
method.
public Integer getMinValue()
public Integer getMaxValue()
public final void setMinInclusive(String strMinInclusive) throws NumberFormatException
strMinInclusive
. It is an error for both minInclusive
and minExclusive to be specified on the same object.
NumberFormatException
- - the argument strMinInclusive
cannot be parsed into a Java Integer.public final Integer getMinInclusive()
public final void setMaxInclusive(String strMaxInclusive) throws NumberFormatException
strMaxInclusive
. It is an error for both maxInclusive
and maxExclusive to be specified on the same object.
NumberFormatException
- - the argument strMaxInclusive
cannot be parsed into a Java Integer.public final Integer getMaxInclusive()
public final void setMinExclusive(String strMinExclusive) throws NumberFormatException
strMinExclusive
. It is an error for both minInclusive
and minExclusive to be specified on the same object.
NumberFormatException
- - the argument strMinExclusive
cannot be parsed into a Java Integer.public final Integer getMinExclusive()
public final void setMaxExclusive(String strMaxExclusive) throws NumberFormatException
strMaxExclusive
. It is an error for both maxInclusive
and maxExclusive to be specified on the same object.
NumberFormatException
- - the argument strMaxExclusive
cannot be parsed into a Java Integer.public final Integer getMaxExclusive()
public String toString()
toString
in class Word
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |