WebLogic Integration


com.bea.web.validation
Class IntegerWord

java.lang.Object
  |
  +--com.bea.web.validation.Word
        |
        +--com.bea.web.validation.IntegerWord

public class IntegerWord
extends Word
implements java.io.Serializable

Determines if a value is a valid Java Integer between a specified range. By default, any Java int is valid.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Constructor Summary
IntegerWord()
           
 
Method Summary
protected  IValidationResult checkAdditional(java.lang.Integer value, java.util.ResourceBundle bundle)
          This method is called by the validate method after the lower and upper bounds have been validated.
protected  IValidationResult checkLowerBound(java.lang.Integer value, java.util.ResourceBundle bundle)
          Checks value against the lower bound, minInclusive or minExclusive.
protected  IValidationResult checkUpperBound(java.lang.Integer value, java.util.ResourceBundle bundle)
          Checks value against the upper bound, maxInclusive or maxExclusive.
 java.lang.Integer getMaxExclusive()
           
 java.lang.Integer getMaxInclusive()
           
 java.lang.Integer getMaxValue()
           
 java.lang.Integer getMinExclusive()
           
 java.lang.Integer getMinInclusive()
           
 java.lang.Integer getMinValue()
           
 void setMaxExclusive(java.lang.String strMaxExclusive)
          Sets the value for the maximum exclusive constraining facet.
 void setMaxInclusive(java.lang.String strMaxInclusive)
          Sets the value for the maximum inclusive constraining facet.
 void setMinExclusive(java.lang.String strMinExclusive)
          Sets the value for the minimum exclusive constraining facet.
 void setMinInclusive(java.lang.String strMinInclusive)
          Sets the value for the minimum inclusive constraining facet.
 java.lang.String toString()
           
 IValidationResult validate(java.lang.String strValue, java.util.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

IntegerWord

public IntegerWord()
Method Detail

validate

public IValidationResult validate(java.lang.String strValue,
                                  java.util.ResourceBundle bundle)

Overrides:
validate in class Word

checkLowerBound

protected IValidationResult checkLowerBound(java.lang.Integer value,
                                            java.util.ResourceBundle bundle)
Checks value against the lower bound, minInclusive or minExclusive.

Parameters:
value - - the Integer value to compare against the lower bound
Returns:
IValidationResult - null if value satifies the lower bound. If return value is not null, then value does not satisfy the lower bound.

checkUpperBound

protected IValidationResult checkUpperBound(java.lang.Integer value,
                                            java.util.ResourceBundle bundle)
Checks value against the upper bound, maxInclusive or maxExclusive.

Parameters:
value - - the Integer value to compare against the upper bound
Returns:
IValidationResult - null if value satifies the upper bound. If return value is not null, then value does not satisfy the upper bound.

checkAdditional

protected IValidationResult checkAdditional(java.lang.Integer value,
                                            java.util.ResourceBundle bundle)
This method is called by the 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.


getMinValue

public java.lang.Integer getMinValue()

Returns:
the minimum value

getMaxValue

public java.lang.Integer getMaxValue()

Returns:
the maximum value

setMinInclusive

public final void setMinInclusive(java.lang.String strMinInclusive)
                           throws java.lang.NumberFormatException
Sets the value for the minimum inclusive constraining facet. To satisfy this constraining facet, the value must be numerically greater than or equal to strMinInclusive. It is an error for both minInclusive and minExclusive to be specified on the same object.

Parameters:
strMinInclusive - - the inclusive lower bound, must be able to be parsed into a Java Integer.
Throws:
java.lang.NumberFormatException - - the argument strMinInclusive cannot be parsed into a Java Integer.

getMinInclusive

public final java.lang.Integer getMinInclusive()


setMaxInclusive

public final void setMaxInclusive(java.lang.String strMaxInclusive)
                           throws java.lang.NumberFormatException
Sets the value for the maximum inclusive constraining facet. To satisfy this constraining facet, the value must be numerically less than or equal to strMaxInclusive. It is an error for both maxInclusive and maxExclusive to be specified on the same object.

Parameters:
strMaxInclusive - - the inclusive upper bound, must be able to be parsed into a Java Integer.
Throws:
java.lang.NumberFormatException - - the argument strMaxInclusive cannot be parsed into a Java Integer.

getMaxInclusive

public final java.lang.Integer getMaxInclusive()


setMinExclusive

public final void setMinExclusive(java.lang.String strMinExclusive)
                           throws java.lang.NumberFormatException
Sets the value for the minimum exclusive constraining facet. To satisfy this constraining facet, the value must be numerically greater than strMinExclusive. It is an error for both minInclusive and minExclusive to be specified on the same object.

Parameters:
strMinExclusive - - the exclusive lower bound, must be able to be parsed into a Java Integer.
Throws:
java.lang.NumberFormatException - - the argument strMinExclusive cannot be parsed into a Java Integer.

getMinExclusive

public final java.lang.Integer getMinExclusive()


setMaxExclusive

public final void setMaxExclusive(java.lang.String strMaxExclusive)
                           throws java.lang.NumberFormatException
Sets the value for the maximum exclusive constraining facet. To satisfy this constraining facet, the value must be numerically less than strMaxExclusive. It is an error for both maxInclusive and maxExclusive to be specified on the same object.

Parameters:
strMaxExclusive - - the exclusive upper bound, must be able to be parsed into a Java Integer.
Throws:
java.lang.NumberFormatException - - the argument strMaxExclusive cannot be parsed into a Java Integer.

getMaxExclusive

public final java.lang.Integer getMaxExclusive()


toString

public java.lang.String toString()

Overrides:
toString in class Word

WebLogic Integration

WebLogic Integration (WLI)