|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectantlr.BaseAST
antlr.CommonAST
org.makumba.providers.datadefinition.mdd.MDDAST
org.makumba.providers.datadefinition.mdd.ValidationRuleNode
org.makumba.providers.datadefinition.mdd.validation.ComparisonValidationRule
public class ComparisonValidationRule
FIXME the whole Lhs/Rhs thing is a very clumsy implementation.
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 | |
---|---|
ComparisonValidationRule(MDDNode mdd,
antlr.collections.AST originAST,
ValidationType type,
FieldNode parentField)
|
Method Summary | |
---|---|
String |
getRuleName()
Gets the name of this rule. |
protected boolean |
throwException(boolean b)
|
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 |
---|
public ComparisonValidationRule(MDDNode mdd, antlr.collections.AST originAST, ValidationType type, FieldNode parentField)
Method Detail |
---|
public String getRuleName()
ValidationRule
getRuleName
in interface ValidationRule
getRuleName
in class ValidationRuleNode
public boolean validate(Object value, Transaction t) throws InvalidValueException
ValidationRuleNode
validate
in interface ValidationRule
validate
in class ValidationRuleNode
t
- TODO
InvalidValueException
- if the validation failsprotected boolean throwException(boolean b) throws InvalidValueException
InvalidValueException
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |