/** * INTERNAL: * Add a new Expression to the list of arguments. * This method will update the list of arguments and any constant strings that are required * to be printed with the arguments * @param argument */ @Override public synchronized void addChild(Expression argument){ if (hasLastChild != null && hasLastChild.booleanValue()){ getChildren().add(getChildren().size() - 1, argument); } else { super.addChild(argument); } setBaseExpression(getChildren().firstElement()); ((ListExpressionOperator)operator).incrementNumberOfItems(); }
/** * INTERNAL: * Add a new Expression to the list of arguments. * This method will update the list of arguments and any constant strings that are required * to be printed with the arguments * @param argument */ @Override public synchronized void addChild(Expression argument){ if (hasLastChild != null && hasLastChild.booleanValue()){ getChildren().add(getChildren().size() - 1, argument); } else { super.addChild(argument); } setBaseExpression((Expression)getChildren().firstElement()); ((ListExpressionOperator)operator).incrementNumberOfItems(); }
/** * INTERNAL: * Add a new Expression to the list of arguments. * This method will update the list of arguments and any constant strings that are required * to be printed with the arguments * @param argument */ @Override public synchronized void addChild(Expression argument){ if (hasLastChild != null && hasLastChild.booleanValue()){ getChildren().add(getChildren().size() - 1, argument); } else { super.addChild(argument); } setBaseExpression((Expression)getChildren().firstElement()); ((ListExpressionOperator)operator).incrementNumberOfItems(); }
Expression base = Expression.from(iterator.next(), this); expression.addChild(base); expression.setBaseExpression(base);//base needs to be the same as the first child for reportQuery items. while (iterator.hasNext()) { expression.addChild(Expression.from(iterator.next(), this));
Expression base = Expression.from(iterator.next(), this); expression.addChild(base); expression.setBaseExpression(base);//base needs to be the same as the first child for reportQuery items. while (iterator.hasNext()) { expression.addChild(Expression.from(iterator.next(), this));
public ArgumentListFunctionExpression coalesce() { ListExpressionOperator coalesceOperator = (ListExpressionOperator)getOperator(ExpressionOperator.Coalesce); ListExpressionOperator clonedCoalesceOperator = new ListExpressionOperator(); coalesceOperator.copyTo(clonedCoalesceOperator); ArgumentListFunctionExpression expression = new ArgumentListFunctionExpression(); expression.setBaseExpression(this); expression.setOperator(clonedCoalesceOperator); return expression; }
public ArgumentListFunctionExpression coalesce() { ListExpressionOperator coalesceOperator = (ListExpressionOperator)getOperator(ExpressionOperator.Coalesce); ListExpressionOperator clonedCoalesceOperator = new ListExpressionOperator(); coalesceOperator.copyTo(clonedCoalesceOperator); ArgumentListFunctionExpression expression = new ArgumentListFunctionExpression(); expression.setBaseExpression(this); expression.setOperator(clonedCoalesceOperator); return expression; }
/** * INTERNAL: * Creates an ArgumentListFunctionExpression that is capable of creating a case statement of the form: * <blockquote><pre> * SQL: CASE name WHEN "Robert" THEN "Bob" * WHEN "Susan" THEN "Sue" * ELSE "No-Nickname" * </pre></blockquote> * * This expression must be manipulated to successfully build a case statement by adding appropriate * children to it. * * A child must be added for the "case expression" (name above), a pair of children must be added for * each "when then" expression and a child must be added for the else. * * @see ArgumentListFunctionExpression */ public ArgumentListFunctionExpression caseStatement() { ListExpressionOperator caseOperator = (ListExpressionOperator)getOperator(ExpressionOperator.Case); ListExpressionOperator clonedCaseOperator = new ListExpressionOperator(); caseOperator.copyTo(clonedCaseOperator); ArgumentListFunctionExpression expression = new ArgumentListFunctionExpression(); expression.setBaseExpression(this); expression.setOperator(clonedCaseOperator); return expression; }
/** * INTERNAL: * Creates an ArgumentListFunctionExpression that is capable of creating a case statement of the form: * <blockquote><pre> * SQL: CASE WHEN name = "Robert" THEN "Bob" * WHEN name = "Susan" THEN "Sue" * ELSE "No-Nickname" * </pre></blockquote> * * This expression must be manipulated to successfully build a case statement by adding appropriate * children to it. * * A pair of children must be added for each "when then" expression and a child must be added for the else. * * @see ArgumentListFunctionExpression */ public ArgumentListFunctionExpression caseConditionStatement() { ListExpressionOperator caseOperator = (ListExpressionOperator)getOperator(ExpressionOperator.CaseCondition); ListExpressionOperator clonedCaseOperator = new ListExpressionOperator(); caseOperator.copyTo(clonedCaseOperator); ArgumentListFunctionExpression expression = new ArgumentListFunctionExpression(); expression.setBaseExpression(this); expression.setOperator(clonedCaseOperator); return expression; }
/** * INTERNAL: * Creates an ArgumentListFunctionExpression that is capable of creating a case statement of the form: * <blockquote><pre> * SQL: CASE name WHEN "Robert" THEN "Bob" * WHEN "Susan" THEN "Sue" * ELSE "No-Nickname" * </pre></blockquote> * * This expression must be manipulated to successfully build a case statement by adding appropriate * children to it. * * A child must be added for the "case expression" (name above), a pair of children must be added for * each "when then" expression and a child must be added for the else. * * @see ArgumentListFunctionExpression */ public ArgumentListFunctionExpression caseStatement() { ListExpressionOperator caseOperator = (ListExpressionOperator)getOperator(ExpressionOperator.Case); ListExpressionOperator clonedCaseOperator = new ListExpressionOperator(); caseOperator.copyTo(clonedCaseOperator); ArgumentListFunctionExpression expression = new ArgumentListFunctionExpression(); expression.setBaseExpression(this); expression.setOperator(clonedCaseOperator); return expression; }
/** * INTERNAL: * Creates an ArgumentListFunctionExpression that is capable of creating a case statement of the form: * <blockquote><pre> * SQL: CASE WHEN name = "Robert" THEN "Bob" * WHEN name = "Susan" THEN "Sue" * ELSE "No-Nickname" * </pre></blockquote> * * This expression must be manipulated to successfully build a case statement by adding appropriate * children to it. * * A pair of children must be added for each "when then" expression and a child must be added for the else. * * @see ArgumentListFunctionExpression */ public ArgumentListFunctionExpression caseConditionStatement() { ListExpressionOperator caseOperator = (ListExpressionOperator)getOperator(ExpressionOperator.CaseCondition); ListExpressionOperator clonedCaseOperator = new ListExpressionOperator(); caseOperator.copyTo(clonedCaseOperator); ArgumentListFunctionExpression expression = new ArgumentListFunctionExpression(); expression.setBaseExpression(this); expression.setOperator(clonedCaseOperator); return expression; }
public ArgumentListFunctionExpression coalesce() { ListExpressionOperator anOperator = new ListExpressionOperator(); anOperator.setSelector(ExpressionOperator.Coalesce); anOperator.setNodeClass(FunctionExpression.class); anOperator.setType(ExpressionOperator.FunctionOperator); anOperator.bePrefix(); anOperator.setStartString("COALESCE("); anOperator.setSeparator(","); anOperator.setTerminationString(" )"); ArgumentListFunctionExpression expression = new ArgumentListFunctionExpression(); expression.setBaseExpression(this); expression.setOperator(anOperator); return expression; }
Expression base = Expression.from(iterator.next(), this); expression.addChild(base); expression.setBaseExpression(base);//base needs to be the same as the first child for reportQuery items. while (iterator.hasNext()) { expression.addChild(Expression.from(iterator.next(), this));
expression.setBaseExpression(this);