use of org.apache.jackrabbit.commons.query.qom.JoinType in project jackrabbit by apache.
the class Parser method parseSource.
private Source parseSource() throws RepositoryException {
Selector selector = parseSelector();
selectors.add(selector);
Source source = selector;
while (true) {
JoinType type;
if (readIf("RIGHT")) {
read("OUTER");
type = JoinType.RIGHT;
} else if (readIf("LEFT")) {
read("OUTER");
type = JoinType.LEFT;
} else if (readIf("INNER")) {
type = JoinType.INNER;
} else {
break;
}
read("JOIN");
selector = parseSelector();
selectors.add(selector);
read("ON");
JoinCondition on = parseJoinCondition();
source = type.join(factory, source, selector, on);
}
return source;
}
Aggregations