protected ArithmeticOperand arithmeticOperand( DynamicOperand leftOperand, ArithmeticOperator operator, DynamicOperand rightOperand ) { return new ArithmeticOperand(leftOperand, operator, rightOperand); }
protected ArithmeticOperand arithmeticOperand( DynamicOperand leftOperand, ArithmeticOperator operator, DynamicOperand rightOperand ) { return new ArithmeticOperand(leftOperand, operator, rightOperand); }
protected ComparisonBuilder comparisonBuilder( DynamicOperand right ) { DynamicOperand leftOperand = null; // If the left operand is an arithmetic operand, then we need to check the operator precedence ... if (left instanceof ArithmeticOperand) { ArithmeticOperand leftArith = (ArithmeticOperand)left; ArithmeticOperator operator = leftArith.operator(); if (this.operator.precedes(operator)) { // Need to do create an operand with leftArith.right and right DynamicOperand inner = new ArithmeticOperand(leftArith.getRight(), this.operator, right); leftOperand = new ArithmeticOperand(leftArith.getLeft(), operator, inner); } else { // the left preceds this, so we can add the new operand on top ... leftOperand = new ArithmeticOperand(leftArith, operator, right); } } else { // The left isn't an arith ... leftOperand = new ArithmeticOperand(left, operator, right); } return new ComparisonBuilder(comparisonBuilder.constraintBuilder, leftOperand); } }
protected ComparisonBuilder comparisonBuilder( DynamicOperand right ) { DynamicOperand leftOperand = null; // If the left operand is an arithmetic operand, then we need to check the operator precedence ... if (left instanceof ArithmeticOperand) { ArithmeticOperand leftArith = (ArithmeticOperand)left; ArithmeticOperator operator = leftArith.operator(); if (this.operator.precedes(operator)) { // Need to do create an operand with leftArith.right and right DynamicOperand inner = new ArithmeticOperand(leftArith.getRight(), this.operator, right); leftOperand = new ArithmeticOperand(leftArith.getLeft(), operator, inner); } else { // the left preceds this, so we can add the new operand on top ... leftOperand = new ArithmeticOperand(leftArith, operator, right); } } else { // The left isn't an arith ... leftOperand = new ArithmeticOperand(left, operator, right); } return new ComparisonBuilder(comparisonBuilder.constraintBuilder, leftOperand); } }
public ArithmeticOperand arithmeticOperand( javax.jcr.query.qom.DynamicOperand left, ArithmeticOperator operator, javax.jcr.query.qom.DynamicOperand right ) { DynamicOperand leftOperand = CheckArg.getInstanceOf(left, DynamicOperand.class, "left"); DynamicOperand rightOperand = CheckArg.getInstanceOf(left, DynamicOperand.class, "left"); return new ArithmeticOperand(leftOperand, operator, rightOperand); }
public ArithmeticOperand arithmeticOperand( javax.jcr.query.qom.DynamicOperand left, ArithmeticOperator operator, javax.jcr.query.qom.DynamicOperand right ) { DynamicOperand leftOperand = CheckArg.getInstanceOf(left, DynamicOperand.class, "left"); DynamicOperand rightOperand = CheckArg.getInstanceOf(left, DynamicOperand.class, "left"); return new ArithmeticOperand(leftOperand, operator, rightOperand); }
protected DynamicOperand score( String... tableNames ) { DynamicOperand operand = null; for (String tableName : tableNames) { DynamicOperand right = new FullTextSearchScore(new SelectorName(tableName)); if (operand == null) operand = right; else operand = new ArithmeticOperand(operand, ArithmeticOperator.ADD, right); } assert operand != null; return operand; }
DynamicOperand newRight = replaceAliasesWithProperties(context, arith.getRight(), propertyByAlias); if (newLeft == arith.getLeft() && newRight == arith.getRight()) return arith; return new ArithmeticOperand(newLeft, arith.operator(), newRight);
DynamicOperand newRight = replaceAliasesWithProperties(context, arith.getRight(), propertyByAlias); if (newLeft == arith.getLeft() && newRight == arith.getRight()) return arith; return new ArithmeticOperand(newLeft, arith.operator(), newRight);
DynamicOperand newLeft = replaceViewReferences(context, arith.getLeft(), mapping, node); DynamicOperand newRight = replaceViewReferences(context, arith.getRight(), mapping, node); return new ArithmeticOperand(newLeft, arith.operator(), newRight); composite = mappedScore; } else { composite = new ArithmeticOperand(composite, ArithmeticOperator.ADD, mappedScore);
DynamicOperand newLeft = replaceViewReferences(context, arith.getLeft(), mapping, node); DynamicOperand newRight = replaceViewReferences(context, arith.getRight(), mapping, node); return new ArithmeticOperand(newLeft, arith.operator(), newRight); composite = mappedScore; } else { composite = new ArithmeticOperand(composite, ArithmeticOperator.ADD, mappedScore);
DynamicOperand newLhs = new ArithmeticOperand(result, arithmeticOperator, arithRhs.getLeft()); result = arithmeticOperand(newLhs, rhsOperator, newRhs); } else {
DynamicOperand newLhs = new ArithmeticOperand(result, arithmeticOperator, arithRhs.getLeft()); result = arithmeticOperand(newLhs, rhsOperator, newRhs); } else {