protected Between between( DynamicOperand operand, StaticOperand lowerBound, StaticOperand upperBound, boolean lowerInclusive, boolean upperInclusive ) { return new Between(operand, lowerBound, upperBound, lowerInclusive, upperInclusive); }
protected Between between( DynamicOperand operand, StaticOperand lowerBound, StaticOperand upperBound, boolean lowerInclusive, boolean upperInclusive ) { return new Between(operand, lowerBound, upperBound, lowerInclusive, upperInclusive); }
/** * Define the upper boundary value of a range. * * @param subquery the subquery * @return the constraint builder; never null */ public ConstraintBuilder subquery( Subquery subquery ) { return comparisonBuilder.constraintBuilder.setConstraint(new Between(comparisonBuilder.left, lowerBound, subquery)); }
/** * Define the upper boundary value of a range. * * @param subquery the subquery * @return the constraint builder; never null */ public ConstraintBuilder subquery( Subquery subquery ) { return comparisonBuilder.constraintBuilder.setConstraint(new Between(comparisonBuilder.left, lowerBound, subquery)); }
/** * Define the upper boundary value of a range. * * @param variableName the name of the variable * @return the constraint builder; never null */ public ConstraintBuilder variable( String variableName ) { return comparisonBuilder.constraintBuilder.setConstraint(new Between(comparisonBuilder.left, lowerBound, new BindVariableName(variableName))); }
@Override public Between between( javax.jcr.query.qom.DynamicOperand operand, javax.jcr.query.qom.StaticOperand lowerBound, javax.jcr.query.qom.StaticOperand upperBound, boolean includeLowerBound, boolean includeUpperBound ) { DynamicOperand jcrOperand = CheckArg.getInstanceOf(operand, DynamicOperand.class, "operand"); StaticOperand lower = CheckArg.getInstanceOf(lowerBound, StaticOperand.class, "lowerBound"); StaticOperand upper = CheckArg.getInstanceOf(upperBound, StaticOperand.class, "upperBound"); return new Between(jcrOperand, lower, upper, includeLowerBound, includeUpperBound); }
/** * Define the upper boundary value of a range. * * @param variableName the name of the variable * @return the constraint builder; never null */ public ConstraintBuilder variable( String variableName ) { return comparisonBuilder.constraintBuilder.setConstraint(new Between(comparisonBuilder.left, lowerBound, new BindVariableName(variableName))); }
@Override public Between between( javax.jcr.query.qom.DynamicOperand operand, javax.jcr.query.qom.StaticOperand lowerBound, javax.jcr.query.qom.StaticOperand upperBound, boolean includeLowerBound, boolean includeUpperBound ) { DynamicOperand jcrOperand = CheckArg.getInstanceOf(operand, DynamicOperand.class, "operand"); StaticOperand lower = CheckArg.getInstanceOf(lowerBound, StaticOperand.class, "lowerBound"); StaticOperand upper = CheckArg.getInstanceOf(upperBound, StaticOperand.class, "upperBound"); return new Between(jcrOperand, lower, upper, includeLowerBound, includeUpperBound); }
/** * Define the right-hand-side of the constraint using the supplied operator. * * @param lowerBoundLiteral the literal value that represents the lower bound of the range (inclusive); may be a subquery * @param upperBoundLiteral the literal value that represents the upper bound of the range (inclusive); may be a subquery * @return the builder used to create the constraint clause, ready to be used to create other constraints clauses or * complete already-started clauses; never null */ public ConstraintBuilder isBetween( Object lowerBoundLiteral, Object upperBoundLiteral ) { assert lowerBoundLiteral != null; assert upperBoundLiteral != null; return this.constraintBuilder.setConstraint(new Between(left, adapt(lowerBoundLiteral), adapt(upperBoundLiteral))); }
/** * Define the right-hand-side of the constraint using the supplied operator. * * @param lowerBoundLiteral the literal value that represents the lower bound of the range (inclusive); may be a subquery * @param upperBoundLiteral the literal value that represents the upper bound of the range (inclusive); may be a subquery * @return the builder used to create the constraint clause, ready to be used to create other constraints clauses or * complete already-started clauses; never null */ public ConstraintBuilder isBetween( Object lowerBoundLiteral, Object upperBoundLiteral ) { assert lowerBoundLiteral != null; assert upperBoundLiteral != null; return this.constraintBuilder.setConstraint(new Between(left, adapt(lowerBoundLiteral), adapt(upperBoundLiteral))); }
result = new Between(lessThan.getOperand1(), greaterThan.getOperand2(), lessThan.getOperand2(), lowerInclusive, upperInclusive); notNeeded.add(lessThan);
result = new Between(lessThan.getOperand1(), greaterThan.getOperand2(), lessThan.getOperand2(), lowerInclusive, upperInclusive); notNeeded.add(lessThan);
DynamicOperand newOperand = rewrite(context, operand); if (newOperand != operand) { return new Between(newOperand, between.getLowerBound(), between.getUpperBound(), between.isLowerBoundIncluded(), between.isUpperBoundIncluded());
DynamicOperand newOperand = rewrite(context, operand); if (newOperand != operand) { return new Between(newOperand, between.getLowerBound(), between.getUpperBound(), between.isLowerBoundIncluded(), between.isUpperBoundIncluded());
/** * Test of reindexNode method, of class EsIndexImpl. */ @Test public void shouldSupportBetweenConstraint() { //range including bounds Between c1 = new Between(propertyValue(def2), new Literal(2), new Literal(4)); validate(c1, "key2", "key3", "key4"); //range excluding bounds Between c2 = new Between(propertyValue(def2), new Literal(2), new Literal(4), false, false); validate(c2, "key3"); }
return new Between(newLhs, lower, upper, between.isLowerBoundIncluded(), between.isUpperBoundIncluded());
StaticOperand newUpper = replaceSubqueriesWithBindVariables(context, upper, subqueriesByVariableName); if (lower == newLower && upper == newUpper) return between; return new Between(lhs, newLower, newUpper, between.isLowerBoundIncluded(), between.isUpperBoundIncluded());
return new Between(lhs, lower, upper, between.isLowerBoundIncluded(), between.isUpperBoundIncluded());
return new Between(lhs, lower, upper, between.isLowerBoundIncluded(), between.isUpperBoundIncluded());
DynamicOperand operand = between.getOperand(); if (isPathOriented(operand)) { return new Between(operand, between.getLowerBound(), between.getUpperBound(), between.isLowerBoundIncluded(), between.isUpperBoundIncluded());