final NodeState index = indexMeta.getChildNode(indexStorageNodeName);
if (pr.first != null && !pr.first.equals(pr.last)) {
// '>' & '>=' use case
ChildNodeEntry firstValueableItem = seek(index,
new PredicateGreaterThan(pr.first.getValue(Type.STRING), pr.firstIncluding));
Iterable<String> it = Collections.emptyList();
if (firstValueableItem != null) {
Iterable<ChildNodeEntry> childrenIterable = (pr.last == null) ? new SeekedIterable(
index, firstValueableItem) : new BetweenIterable(index, firstValueableItem,
pr.last.getValue(Type.STRING), pr.lastIncluding);
it = new QueryResultsWrapper(filter, indexName, childrenIterable);
}
return it;
} else if (pr.last != null && !pr.last.equals(pr.first)) {
// '<' & '<=' use case
ChildNodeEntry firstValueableItem = seek(index,
new PredicateLessThan(pr.last.getValue(Type.STRING), pr.lastIncluding));
Iterable<String> it = Collections.emptyList();
if (firstValueableItem != null) {
it = new QueryResultsWrapper(filter, indexName, new SeekedIterable(index,
firstValueableItem));