Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba.providers.datadefinition.makumba.validation
Class NumberRangeValidationRule

    java.lang.Object
      org.makumba.providers.datadefinition.makumba.validation.BasicValidationRule
          org.makumba.providers.datadefinition.makumba.validation.SingleFieldValidationRule
              org.makumba.providers.datadefinition.makumba.validation.RangeValidationRule
                  org.makumba.providers.datadefinition.makumba.validation.NumberRangeValidationRule

All Implemented Interfaces:
  Serializable, Comparable<ValidationRule>, ValidationRule

    public class NumberRangeValidationRule

extends RangeValidationRule

This validation rule implements number range checks, using the syntax <fieldname> in range [<lowerCValue>..<upperValue>]. ? is allowed as identifier for unlimted ranges in either range end. This rule can be used both for int and for real data types.

Version:
  $Id: NumberRangeValidationRule.java,v 1.1 Sep 6, 2007 1:31:27 AM rudi Exp $
Author:
  Rudolf Mayer
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.makumba.providers.datadefinition.makumba.validation.RangeValidationRule
`lowerLimit, lowerLimitString, pattern, rule, upperLimit, upperLimitString`

Fields inherited from class org.makumba.providers.datadefinition.makumba.validation.BasicValidationRule
`allowedTypes, errorMessage, fd, fieldDef, fieldFunction, fieldName, lowerFunction, NUMBER_TYPES, operators, rangeDef, rangeValue, ruleName, ruleSyntax, STRING_TYPES, upperFunction`

Constructor Summary
`NumberRangeValidationRule(FieldDefinition fd, String fieldName, String ruleName, String errorMessage, String lowerLimitString, String upperLimitString)`

Method Summary
`static String` | `getAcceptedRules()`
`static String` | `getOperator()`
`static void` | `main(String[] args)` Do some pattern matching tests.
`String` | `toString()`
`boolean` | `validate(Object value)` Perform the validation process.

Methods inherited from class org.makumba.providers.datadefinition.makumba.validation.RangeValidationRule
`getLowerLimit, getLowerLimitString, getMatcher, getUpperLimit, getUpperLimitString, matches`

Methods inherited from class org.makumba.providers.datadefinition.makumba.validation.SingleFieldValidationRule
`checkApplicability, compileRule, throwException`

Methods inherited from class org.makumba.providers.datadefinition.makumba.validation.BasicValidationRule
`applyFunction, compareTo, extractFunctionArgument, extractFunctionNameFromStatement, getAllowedTypes, getErrorMessage, getFieldDefinition, getFieldName, getRuleName, getValidationRuleOperators, isFunctionCall, isValidFunctionCall`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### NumberRangeValidationRule

    public NumberRangeValidationRule(FieldDefinition fd,
                                     String fieldName,
                                     String ruleName,
                                     String errorMessage,
                                     String lowerLimitString,
                                     String upperLimitString)
                              throws ValidationDefinitionParseError

Throws:
  `ValidationDefinitionParseError`

Method Detail

### getOperator

    public static String getOperator()

### validate

    public boolean validate(Object value)
                     throws InvalidValueException

  Description copied from interface: `ValidationRule`
  Perform the validation process.

  Throws:
    `InvalidValueException` - if the validation fails

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getAcceptedRules

    public static String getAcceptedRules()

### main

    public static void main(String[] args)

  Do some pattern matching tests.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20