org.springmodules.validation.bean.rule
Class RangeValidationRule

java.lang.Object
  extended by org.springmodules.validation.bean.rule.AbstractValidationRule
      extended by org.springmodules.validation.bean.rule.RangeValidationRule
All Implemented Interfaces:
ValidationRule

public class RangeValidationRule
extends AbstractValidationRule

An AbstractValidationRule implementation that validates that a comparable value is within specific bounds.

Author:
Uri Boness

Field Summary
static String DEFAULT_ERROR_CODE
           
 
Constructor Summary
RangeValidationRule(Comparable min, Comparable max)
          Constructs a new RangeValidationRule with given lower (min) and upper (max) bounds for the validated value.
 
Method Summary
 Condition getCondition()
          Returns the condition of this validation rule.
 Comparable getMax()
           
 Comparable getMin()
           
 
Methods inherited from class org.springmodules.validation.bean.rule.AbstractValidationRule
checkContexts, createErrorArgumentsResolver, createErrorArgumentsResolver, createErrorArgumentsResolver, createErrorArgumentsResolver, getDefaultErrorMessage, getErrorArguments, getErrorCode, isApplicable, setApplicabilityCondition, setContextTokens, setDefaultErrorMessage, setErrorArgumentsResolver, setErrorCode, supportsNullValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ERROR_CODE

public static final String DEFAULT_ERROR_CODE
See Also:
Constant Field Values
Constructor Detail

RangeValidationRule

public RangeValidationRule(Comparable min,
                           Comparable max)
Constructs a new RangeValidationRule with given lower (min) and upper (max) bounds for the validated value.

Parameters:
min - The lower bound of the value.
max - The upper bound of the value.
Method Detail

getCondition

public Condition getCondition()
Returns the condition of this validation rule.

Returns:
The condition of this validation rule.
See Also:
ValidationRule.getCondition()

getMin

public Comparable getMin()

getMax

public Comparable getMax()


Copyright © 2009. All Rights Reserved.