@Override public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor) throws X { if (arg != null) { arg.visit(visitor); } }
/** * Sets the argument of this unary value operator. * * @param arg * The (new) argument for this operator, must not be <tt>null</tt>. */ public void setArg(ValueExpr arg) { assert arg != null : "arg must not be null"; arg.setParentNode(this); this.arg = arg; }
valueExpr.visit(collector); expr.replaceChildNode(operator, anonVar); anonymousExtension.addElement(new ExtensionElem(operator, anonVar.getName())); expr.visit(collector);
@Override public OptionalJoinSegment<T> clone() { List<QueryModelNode> order = new ArrayList<>(); for(QueryModelNode node: orderedNodes) { order.add(node.clone()); } Set<QueryModelNode> unorder = Sets.newHashSet(order); Map<ValueExpr, Filter> map = new HashMap<>(); for(ValueExpr expr: conditionMap.keySet()) { map.put(expr.clone(), conditionMap.get(expr).clone()); } return new OptionalJoinSegment<T>(unorder, order, map); }
@Override public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor) throws X { for(ValueExpr arg: args) { arg.visit(visitor); } }
@Override public JoinSegment<T> clone() { List<QueryModelNode> order = new ArrayList<>(); for(QueryModelNode node: orderedNodes) { order.add(node.clone()); } Set<QueryModelNode> unorder = Sets.newHashSet(order); Map<ValueExpr, Filter> map = new HashMap<>(); for(ValueExpr expr: conditionMap.keySet()) { map.put(expr.clone(), conditionMap.get(expr).clone()); } return new JoinSegment<T>(unorder, order, map); }
/** * Sets the right argument of this binary value operator. * * @param rightArg * The (new) right argument for this operator, must not be * <tt>null</tt>. */ public void setRightArg(ValueExpr rightArg) { assert rightArg != null : "rightArg must not be null"; rightArg.setParentNode(this); this.rightArg = rightArg; }
@Override public Regex clone() { Regex clone = (Regex)super.clone(); if (flagsArg != null) { clone.setFlagsArg(flagsArg.clone()); } return clone; } }
public void setCondition(ValueExpr condition) { if (condition != null) { condition.setParentNode(this); } this.condition = condition; }
@Override public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor) throws X { expr.visit(visitor); }
public void setCondition(ValueExpr condition) { assert condition != null : "condition must not be null"; condition.setParentNode(this); this.condition = condition; }
@Override public <X extends Exception> void visitChildren(QueryModelVisitor<X> visitor) throws X { expr.visit(visitor); }
@Override public FunctionCall clone() { FunctionCall clone = (FunctionCall)super.clone(); clone.args = new ArrayList<ValueExpr>(getArgs().size()); for (ValueExpr arg : getArgs()) { clone.addArg(arg.clone()); } return clone; } }
/** * Sets the condition argument of this unary value operator. * * @param condition * The (new) condition argument for this operator, must not be * <tt>null</tt>. */ public void setCondition(ValueExpr condition) { assert condition != null : "arg must not be null"; condition.setParentNode(this); this.condition = condition; }
@Override public ExtensionElem clone() { ExtensionElem clone = (ExtensionElem)super.clone(); clone.setExpr(getExpr().clone()); return clone; } }
public void setExpr(ValueExpr expr) { assert expr != null : "expr must not be null"; expr.setParentNode(this); this.expr = expr; }