@Override public RowIterator getRows() throws RepositoryException { if (accessed) { if (restartable) { if (sequence instanceof Restartable) { ((Restartable)sequence).restart(); } else { assert sequence.isEmpty(); } } else if (!sequence.isEmpty()) { throw new RepositoryException(JcrI18n.multipleCallsToGetRowsOrNodesIsNotAllowed.text(queryStatement)); } } accessed = true; final Columns columns = results.getColumns(); if (columns.getSelectorNames().size() == 1) { // Then we know that there is only one selector in the results ... return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence, columns); } // There may be 1 or more selectors in the columns, but the results definitely have more than one selector ... return new QueryResultRowIterator(context, queryStatement, sequence, results.getColumns()); }
@Override public RowIterator getRows() throws RepositoryException { if (accessed) { if (restartable) { if (sequence instanceof Restartable) { ((Restartable)sequence).restart(); } else { assert sequence.isEmpty(); } } else if (!sequence.isEmpty()) { throw new RepositoryException(JcrI18n.multipleCallsToGetRowsOrNodesIsNotAllowed.text(queryStatement)); } } accessed = true; final Columns columns = results.getColumns(); if (columns.getSelectorNames().size() == 1) { // Then we know that there is only one selector in the results ... return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence, columns); } // There may be 1 or more selectors in the columns, but the results definitely have more than one selector ... return new QueryResultRowIterator(context, queryStatement, sequence, results.getColumns()); }
@Override public RowIterator getRows() { return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence(), results.getColumns()); } }
@Override public RowIterator getRows() { return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence(), results.getColumns()); } }
@Override public RowIterator getRows() { return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence(), results.getColumns()); } }
@Override public RowIterator getRows() { return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence(), results.getColumns()); } }