protected And and( Constraint constraint1, Constraint constraint2 ) { return new And(constraint1, constraint2); }
protected And and( Constraint constraint1, Constraint constraint2 ) { return new And(constraint1, constraint2); }
protected And and( Constraint left, Constraint right ) { return new And(left, right); }
@Override public javax.jcr.query.qom.And and( javax.jcr.query.qom.Constraint constraint1, javax.jcr.query.qom.Constraint constraint2 ) { Constraint jcrConstraint1 = CheckArg.getInstanceOf(constraint1, Constraint.class, "constraint1"); Constraint jcrConstraint2 = CheckArg.getInstanceOf(constraint2, Constraint.class, "constraint2"); return new And(jcrConstraint1, jcrConstraint2); }
@Override public javax.jcr.query.qom.And and( javax.jcr.query.qom.Constraint constraint1, javax.jcr.query.qom.Constraint constraint2 ) { Constraint jcrConstraint1 = CheckArg.getInstanceOf(constraint1, Constraint.class, "constraint1"); Constraint jcrConstraint2 = CheckArg.getInstanceOf(constraint2, Constraint.class, "constraint2"); return new And(jcrConstraint1, jcrConstraint2); }
protected ConstraintBuilder buildLogicalConstraint() { if (negateConstraint && constraint != null) { constraint = new Not(constraint); negateConstraint = false; } if (left != null && constraint != null) { if (and) { // If the left constraint is an OR, we need to rearrange things since AND is higher precedence ... if (left instanceof Or && implicitParentheses) { Or previous = (Or)left; constraint = new Or(previous.left(), new And(previous.right(), constraint)); } else { constraint = new And(left, constraint); } } else { constraint = new Or(left, constraint); } left = null; } return this; }
protected ConstraintBuilder buildLogicalConstraint() { if (negateConstraint && constraint != null) { constraint = new Not(constraint); negateConstraint = false; } if (left != null && constraint != null) { if (and) { // If the left constraint is an OR, we need to rearrange things since AND is higher precedence ... if (left instanceof Or && implicitParentheses) { Or previous = (Or)left; constraint = new Or(previous.left(), new And(previous.right(), constraint)); } else { constraint = new And(left, constraint); } } else { constraint = new Or(left, constraint); } left = null; } return this; }
Constraint newRight = rewrite(context, right); if (newLeft != left || newRight != right) { return new And(newLeft, newRight);
Constraint newRight = rewrite(context, right); if (newLeft != left || newRight != right) { return new And(newLeft, newRight);
constraint = new And(rewriteConstraint(and.left()), rewriteConstraint(and.right())); } else if (constraint instanceof Or) { Or or = (Or)constraint;
constraint = new And(rewriteConstraint(and.left()), rewriteConstraint(and.right())); } else if (constraint instanceof Or) { Or or = (Or)constraint;
@Test public void testAndConstraint() { Comparison gt = new Comparison(propertyValue(def2), Operator.GREATER_THAN, new Literal(2)); Comparison lt = new Comparison(propertyValue(def2), Operator.LESS_THAN, new Literal(4)); validate(new And(gt, lt), "key3"); }
Constraint right = replaceReferencesToRemovedSource(context, and.right(), rewrittenSelectors); if (left == and.left() && right == and.right()) return and; return new And(left, right);
Constraint right = replaceSubqueriesWithBindVariables(context, and.right(), subqueriesByVariableName); if (left == and.left() && right == and.right()) return and; return new And(left, right);
Constraint right = replaceAliasesWithProperties(context, and.right(), propertyByAlias); if (left == and.left() && right == and.right()) return and; return new And(left, right);
Constraint right = replaceAliasesWithProperties(context, and.right(), propertyByAlias); if (left == and.left() && right == and.right()) return and; return new And(left, right);
Constraint right = replaceReferences(context, and.right(), mapping, node); if (left == and.left() && right == and.right()) return and; return new And(left, right);
Constraint right = replaceReferences(context, and.right(), mapping, node); if (left == and.left() && right == and.right()) return and; return new And(left, right);