use of com.developmentontheedge.sql.model.AstBeCondition in project be5 by DevelopmentOnTheEdge.
the class ContextApplier method applyConditions.
private int applyConditions(SimpleNode newTree, int i) {
AstBeCondition condNode = (AstBeCondition) newTree.child(i);
boolean correct = checkConditions(condNode);
if (condNode instanceof AstBeUnless)
i = setUnlessResult(newTree, i, condNode, correct);
else if (condNode instanceof AstBeIf)
i = setIfResult(newTree, i, condNode, correct);
return i;
}
use of com.developmentontheedge.sql.model.AstBeCondition in project be5 by DevelopmentOnTheEdge.
the class ContextApplier method checkExpression.
private void checkExpression(SimpleNode newTree, String key, Function<String, String> varResolver) {
for (int i = 0; i < newTree.jjtGetNumChildren(); i++) {
SimpleNode child = newTree.child(i);
checkExpression(child, key, varResolver);
if (child instanceof AstBeCondition)
i = applyConditions(newTree, i);
if (child instanceof AstBeParameterTag)
applyParameterTag(newTree, i, key, varResolver);
else if (child instanceof AstBePlaceHolder)
applyPlaceHolder((AstBePlaceHolder) child);
else if (child instanceof AstBeSessionTag)
applySessionTag((AstBeSessionTag) child);
else if (child instanceof AstBeSqlSubQuery)
applySubQuery((AstBeSqlSubQuery) child);
else if (child instanceof AstBeSqlAuto)
applyAutoQuery((AstBeSqlAuto) child);
else if (child instanceof AstBeConditionChain) {
applyConditionChain((AstBeConditionChain) child);
i--;
} else if (child instanceof AstBeSql)
applySqlTag((AstBeSql) child);
else if (child instanceof AstBeDictionary)
applyDictionary((AstBeDictionary) child);
}
}
Aggregations