csi.getRightConstraint());
if (ignoreWhereConstraints) {
rightConstraint = Constraints.or(qomFactory,
localRightContraints);
}
QueryResult rightResult = execute(null, csi.getSource().getRight(),
rightConstraint, null, 0, -1, printIndentation);
for (Row row : JcrUtils.getRows(rightResult)) {
rightRows.add(row);
}
return rightRows;
}
// the 'batch by 500' approach
Set<Row> rightRows = new TreeSet<Row>(comparator);
for (int i = 0; i < rightConstraints.size(); i += 500) {
if (log.isDebugEnabled()) {
log.debug(genString(printIndentation)
+ "SQL2 JOIN RIGHT SIDE executing batch # " + i + ".");
}
List<Constraint> localRightContraints = rightConstraints.subList(i,
Math.min(i + 500, rightConstraints.size()));
Constraint rightConstraint = Constraints.and(qomFactory,
Constraints.or(qomFactory, localRightContraints),
csi.getRightConstraint());
if (ignoreWhereConstraints) {
rightConstraint = Constraints.or(qomFactory,
localRightContraints);
}
QueryResult rightResult = execute(null, csi.getSource().getRight(),
rightConstraint, null, 0, -1, printIndentation);
for (Row row : JcrUtils.getRows(rightResult)) {
rightRows.add(row);
}
}