public boolean columnMatch(String column) { if (this.column instanceof SQLIdentifierExpr) { return ((SQLIdentifierExpr) this.column).nameEquals(column); } else if (this.column instanceof SQLPropertyExpr) { ((SQLPropertyExpr) this.column).nameEquals(column); } return false; }
public void setOwner(String owner) { this.setOwner(new SQLIdentifierExpr(owner)); }
public static SQLBinaryOpExpr isNotNull(SQLExpr expr) { return new SQLBinaryOpExpr(expr, SQLBinaryOperator.IsNot, new SQLNullExpr()); }
public SQLMethodInvokeExpr(String methodName, SQLExpr owner, SQLExpr... params){ this.name = methodName; setOwner(owner); for (SQLExpr param : params) { this.addParameter(param); } }
@Override public boolean replace(SQLExpr expr, SQLExpr target) { if (valueExpr == expr) { setValueExpr(target); return true; } if (elseExpr == expr) { setElseExpr(target); return true; } return false; }
public void setOrderingColumn(SQLIdentifierExpr orderingColumn) { if (orderingColumn != null) { orderingColumn.setParent(this); } this.orderingColumn = orderingColumn; }
public void setName(String name) { this.name = name; this.hashCode64 = 0; this.nameHashCod64 = 0; if (parent instanceof SQLPropertyExpr) { SQLPropertyExpr propertyExpr = (SQLPropertyExpr) parent; propertyExpr.computeHashCode64(); } }
static boolean isRowNumber(SQLExpr expr) { if (expr instanceof SQLIdentifierExpr) { return ((SQLIdentifierExpr) expr) .hashCode64() == FnvHash.Constants.ROWNUM; } return false; } }
public boolean conditionContainsTable(String alias) { if (condition == null) { return false; } if (condition instanceof SQLBinaryOpExpr) { return ((SQLBinaryOpExpr) condition).conditionContainsTable(alias); } return false; }
public static boolean visit(SQLEvalVisitor visitor, SQLIdentifierExpr x) { x.putAttribute(EVAL_EXPR, x); return false; } }
public void setQuery(SQLQueryExpr query) { if (query != null) { query.setParent(this); } this.query = query; }
public void setComment(SQLLiteralExpr comment) { if (comment != null) { comment.setParent(this); } this.comment = comment; }
public void setMethod(SQLMethodInvokeExpr method) { if (method != null) { method.setParent(this); } this.method = method; }
public String getSchema() { if (expr == null) { return null; } if (expr instanceof SQLPropertyExpr) { return ((SQLPropertyExpr) expr).getOwnernName(); } return null; }
public void addWhere(SQLExpr condition) { if (condition == null) { return; } if (where == null) { where = condition; } else { where = SQLBinaryOpExpr.and(where, condition); } }
public SQLTimestampExpr clone() { SQLTimestampExpr x = new SQLTimestampExpr(); x.literal = literal; x.timeZone = timeZone; x.withTimeZone = withTimeZone; return x; }
public void setComment(SQLCharExpr comment) { if (comment != null) { comment.setParent(this); } this.comment = comment; }
public static SQLBinaryOpExpr isNull(SQLExpr expr) { return new SQLBinaryOpExpr(expr, SQLBinaryOperator.Is, new SQLNullExpr()); }
public long hashCode64() { if (hashCode64 == 0) { computeHashCode64(); } return hashCode64; }