@Override public void visit(Parenthesis parenthesis) { if (parenthesis.isNot()) { buffer.append(NOT); } buffer.append("("); parenthesis.getExpression().accept(this); buffer.append(")"); }
/** * delete update 语句 where 处理 */ protected BinaryExpression andExpression(Table table, Expression where) { //获得where条件表达式 EqualsTo equalsTo = new EqualsTo(); equalsTo.setLeftExpression(this.getAliasColumn(table)); equalsTo.setRightExpression(tenantHandler.getTenantId()); if (null != where) { if (where instanceof OrExpression) { return new AndExpression(equalsTo, new Parenthesis(where)); } else { return new AndExpression(equalsTo, where); } } return equalsTo; }
public Parenthesis(Expression expression) { setExpression(expression); }
left = OrExpression(); jj_consume_token(80); left = new Parenthesis(left); if (not) { ((Parenthesis)left).setNot(); not = false; } break; default: right = OrExpression(); jj_consume_token(80); right = new Parenthesis(right); if (not) { ((Parenthesis)right).setNot(); not = false; } break; default:
@Override public void visit(Parenthesis parenthesis) { parenthesis.getExpression().accept(this); }
public void visit(Parenthesis parenthesis) { Expression pExp = parenthesis.getExpression(); Expression qualifiedExpression; qualifiedExpression = qualify(session, tableAliases, pExp); Parenthesis qualified = new Parenthesis(); qualified.setExpression(qualifiedExpression); this._qualifiedExpression = qualified; }
public void visit(Parenthesis parenthesis) { if (parenthesis.isNot()) { buffer.append(parenthesis.getCommentNot() != null ? " " + parenthesis.getCommentNot() + ExpressionDeParser.LINE_SEPARATOR : "").append(" not "); } buffer.append(parenthesis.getCommentBeginBracket() != null ? parenthesis.getCommentBeginBracket() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append("("); parenthesis.getExpression().accept(this); buffer.append(parenthesis.getCommentEndBracket() != null ? parenthesis.getCommentEndBracket() + " " + ExpressionDeParser.LINE_SEPARATOR : "").append(")"); }
retval = new Parenthesis(retval); ((Parenthesis) retval).setCommentBeginBracket(commentBeginBracket); if (tk.specialToken != null) { ((Parenthesis) retval).setCommentEndBracket(tk.specialToken.image);
Expression child = expr1.getExpression(); Expression child2 = convertToImplementation(child); expr1.setExpression(child2); implExpr = expr1;
left = new Parenthesis(left); ((Parenthesis) left).setCommentBeginBracket(commentBeginBracket); ((Parenthesis) left).setCommentNot(commentNot); if (tk.specialToken != null) { ((Parenthesis) left).setCommentEndBracket(tk.specialToken.image); if (not) { ((Parenthesis)left).setNot(); not = false; } break; right = new Parenthesis(right); ((Parenthesis) right).setCommentBeginBracket(commentBeginBracket); ((Parenthesis) right).setCommentNot(commentNot); if (tk.specialToken != null) { ((Parenthesis) right).setCommentEndBracket(tk.specialToken.image); if (not) { ((Parenthesis)right).setNot(); not = false; } break;
@Override public void visit(Parenthesis parenthesis) { parenthesis.getExpression().accept(this); }
public void visit(Parenthesis parenthesis) { Expression pExp = parenthesis.getExpression(); Expression qualifiedExpression; qualifiedExpression = qualify(session, tableAliases, pExp); Parenthesis qualified = new Parenthesis(); qualified.setExpression(qualifiedExpression); this._qualifiedExpression = qualified; }
left = OrExpression(); jj_consume_token(200); left = new Parenthesis(left); if (not) { ((Parenthesis)left).setNot(); not = false; } break; right = OrExpression(); jj_consume_token(200); right = new Parenthesis(right); if (not) { ((Parenthesis)right).setNot(); not = false; } break;
retval = new Parenthesis(retval); ((Parenthesis) retval).setCommentBeginBracket(commentBeginBracket); {if (tk.specialToken != null) { ((Parenthesis) retval).setCommentEndBracket(tk.specialToken.image);
public void visit(Parenthesis parenthesis) { if (parenthesis.isNot()) buffer.append(" NOT "); buffer.append("("); parenthesis.getExpression().accept(this); buffer.append(")"); }
public void visit(Parenthesis parenthesis) { parenthesis.getExpression().accept(this); }
/** * This helper method is used to change the multiple expression into * the binary form, respectively and return the root of the expression tree. * @param isMultiOr variable tells whether the expression is or. * @param exp the expression that needs to be converted. * @return the root of the expression tree. */ public Expression changeBack(Boolean isMultiOr, Expression exp) { if(!(exp instanceof MultipleExpression)) { return exp; } MultipleExpression changed = (MultipleExpression) exp; Expression result = changed.getChild(0); for(int i=1; i<changed.size(); i++) { Expression left = result; Expression right = changed.getChild(i); if(isMultiOr) { result = new OrExpression(left, right); } else { result = new AndExpression(left, right); } } if(isMultiOr) { return new Parenthesis(result); } return result; }
left = OrExpression(); jj_consume_token(80); left = new Parenthesis(left); if (not) { ((Parenthesis)left).setNot(); not = false; } break; right = OrExpression(); jj_consume_token(80); right = new Parenthesis(right); if (not) { ((Parenthesis)right).setNot(); not = false; } break;
leftExpression = new Parenthesis(leftExpression); ((Parenthesis) leftExpression).setCommentBeginBracket(commentBeginBracket); {if (tk.specialToken != null) { ((Parenthesis) leftExpression).setCommentEndBracket(tk.specialToken.image); rightExpression = new Parenthesis(rightExpression); ((Parenthesis) rightExpression).setCommentBeginBracket(commentBeginBracket); {if (tk.specialToken != null) { ((Parenthesis) rightExpression).setCommentEndBracket(tk.specialToken.image);
public Parenthesis(Expression expression) { setExpression(expression); }