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 SingleFieldValidationRule

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

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

Direct Known Subclasses:
  RangeValidationRule, RegExpValidationRule

    public abstract class SingleFieldValidationRule

extends BasicValidationRule

This class provides basic support for rules that operate on a single field, e.g. range checks or regular expressions.

Version:
  $Id: AbstractValidationRule.java,v 1.1 Sep 6, 2007 1:28:56 AM rudi Exp $
Author:
  Rudolf Mayer
See Also:
  Serialized Form

Field Summary

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
`protected` | `SingleFieldValidationRule()`
`protected` | `SingleFieldValidationRule(FieldDefinition fd, String fieldName, String errorMessage, String ruleName, int[] allowedTypes)`

Method Summary
`boolean` | `checkApplicability()` Checks whether the rule is applicable for the given field types.
`protected static String` | `compileRule(String operator, String definition)`
`protected void` | `throwException()` Throw a default exception.

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

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

Methods inherited from interface org.makumba.ValidationRule
`validate`

Constructor Detail

### SingleFieldValidationRule

    protected SingleFieldValidationRule()

### SingleFieldValidationRule

    protected SingleFieldValidationRule(FieldDefinition fd,
                                        String fieldName,
                                        String errorMessage,
                                        String ruleName,
                                        int[] allowedTypes)

Method Detail

### compileRule

    protected static String compileRule(String operator,
                                        String definition)

### checkApplicability

    public boolean checkApplicability()
                               throws ValidationDefinitionParseError

  Checks whether the rule is applicable for the given field types.

  Throws:
    `ValidationDefinitionParseError`

### throwException

    protected void throwException()
                           throws InvalidValueException

  Throw a default exception.

  Throws:
    `InvalidValueException`

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