public SQLBinaryOpExpr(SQLExpr left, SQLExpr right, SQLBinaryOperator operator){ setLeft(left); setRight(right); this.operator = operator; }
public SQLBinaryOpExpr clone() { SQLBinaryOpExpr x = new SQLBinaryOpExpr(); if (left != null) { x.setLeft(left.clone()); } if (right != null) { x.setRight(right.clone()); } x.operator = operator; x.dbType = dbType; x.bracket = bracket; return x; }
public boolean replace(SQLExpr expr, SQLExpr taget) { SQLObject parent = getParent(); if (left == expr) { if (taget == null) { if (parent instanceof SQLReplaceable) { return ((SQLReplaceable) parent).replace(this, right); } else { return false; } } this.setLeft(taget); return true; } if (right == expr) { if (taget == null) { if (parent instanceof SQLReplaceable) { return ((SQLReplaceable) parent).replace(this, left); } else { return false; } } this.setRight(taget); return true; } return false; }
public static void exportParameter(final List<Object> parameters, SQLBinaryOpExpr x) { if (x.getLeft() instanceof SQLLiteralExpr && x.getRight() instanceof SQLLiteralExpr && x.getOperator().isRelational()) { return; } { SQLExpr leftResult = ExportParameterVisitorUtils.exportParameter(parameters, x.getLeft()); if (leftResult != x.getLeft()) { x.setLeft(leftResult); } } { SQLExpr rightResult = exportParameter(parameters, x.getRight()); if (rightResult != x.getRight()) { x.setRight(rightResult); } } }
public SQLBinaryOpExpr(SQLExpr left, SQLExpr right, SQLBinaryOperator operator){ setLeft(left); setRight(right); this.operator = operator; }
public SQLBinaryOpExpr clone() { SQLBinaryOpExpr x = new SQLBinaryOpExpr(); if (left != null) { x.setLeft(left.clone()); } if (right != null) { x.setRight(right.clone()); } x.operator = operator; x.dbType = dbType; x.bracket = bracket; return x; }
public boolean replace(SQLExpr expr, SQLExpr taget) { SQLObject parent = getParent(); if (left == expr) { if (taget == null) { if (parent instanceof SQLReplaceable) { return ((SQLReplaceable) parent).replace(this, right); } else { return false; } } this.setLeft(taget); return true; } if (right == expr) { if (taget == null) { if (parent instanceof SQLReplaceable) { return ((SQLReplaceable) parent).replace(this, left); } else { return false; } } this.setRight(taget); return true; } return false; }
public static void exportParameter(final List<Object> parameters, SQLBinaryOpExpr x) { if (x.getLeft() instanceof SQLLiteralExpr && x.getRight() instanceof SQLLiteralExpr && x.getOperator().isRelational()) { return; } { SQLExpr leftResult = ExportParameterVisitorUtils.exportParameter(parameters, x.getLeft()); if (leftResult != x.getLeft()) { x.setLeft(leftResult); } } { SQLExpr rightResult = exportParameter(parameters, x.getRight()); if (rightResult != x.getRight()) { x.setRight(rightResult); } } }