org.makumba.providers.datadefinition.mdd.validation
Class RangeValidationRule

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by org.makumba.providers.datadefinition.mdd.MDDAST
              extended by org.makumba.providers.datadefinition.mdd.ValidationRuleNode
                  extended by org.makumba.providers.datadefinition.mdd.validation.RangeValidationRule
All Implemented Interfaces:
antlr.collections.AST, Serializable, Comparable<ValidationRule>, ValidationRule

public class RangeValidationRule
extends ValidationRuleNode

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.makumba.providers.datadefinition.mdd.ValidationRuleNode
arguments, comparisonExpression, expression, field, lowerBound, mdd, message, name, type, upperBound
 
Fields inherited from class org.makumba.providers.datadefinition.mdd.MDDAST
makumbaType, wasIncluded
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
RangeValidationRule(MDDNode mdd, antlr.collections.AST originAST, FieldNode field, ValidationType type)
           
 
Method Summary
 String getRuleName()
          Gets the name of this rule.
 boolean validate(Object value, Transaction t)
          should be overridden in extended classes
 
Methods inherited from class org.makumba.providers.datadefinition.mdd.ValidationRuleNode
checkApplicability, compareTo, getComparisonExpression, getDataDefinition, getErrorMessage, getExpression, getFieldDefinition, getLowerBound, getUpperBound, getValidationRuleArguments, getValidationRuleArgumentType, getValidationType, throwException, toString
 
Methods inherited from class org.makumba.providers.datadefinition.mdd.MDDAST
getColumn, getLine, initialize, initialize, setCol, setLine
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, setText, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeValidationRule

public RangeValidationRule(MDDNode mdd,
                           antlr.collections.AST originAST,
                           FieldNode field,
                           ValidationType type)
Method Detail

validate

public boolean validate(Object value,
                        Transaction t)
                 throws InvalidValueException
Description copied from class: ValidationRuleNode
should be overridden in extended classes

Specified by:
validate in interface ValidationRule
Overrides:
validate in class ValidationRuleNode
t - TODO
Throws:
InvalidValueException - if the validation fails

getRuleName

public String getRuleName()
Description copied from interface: ValidationRule
Gets the name of this rule.

Specified by:
getRuleName in interface ValidationRule
Overrides:
getRuleName in class ValidationRuleNode