@Override public int width() { return sequence.width(); }
@Override public int width() { return delegate.width(); }
@Override public int width() { return sequence.width(); }
@Override public int width() { return sequence.width(); }
@Override public int width() { return sequence.width(); }
@Override public int width() { return sequence.width(); }
@Override public int width() { return sequence.width(); }
@Override public int width() { return delegate.width(); }
protected JoinSequence( String workspaceName, NodeSequence left, NodeSequence right, ExtractFromRow leftExtractor, ExtractFromRow rightExtractor, JoinType joinType, BufferManager bufferMgr, CachedNodeSupplier nodeCache, boolean pack, boolean useHeap, boolean allowDuplicates ) { super(workspaceName, right, rightExtractor, bufferMgr, nodeCache, pack, useHeap, allowDuplicates); this.left = left; this.leftExtractor = leftExtractor; this.leftWidth = left.width(); this.joinType = joinType; this.totalWidth = left.width() + right.width(); }
@Override public int width() { initialize(); return dependentQuery.width(); }
@Override public int width() { initialize(); return dependentQuery.width(); }
protected SingleSelectorQueryResultRowIterator( JcrQueryContext context, String query, NodeSequence sequence, Columns columns ) { super(context, query, sequence, columns); int selectorIndex = columns.getSelectorIndex(columns.getSelectorNames().get(0)); if (selectorIndex >= sequence.width()) { // The columns were built on top of other columns that expose multiple selectors, but this sequence only has // one selector ... selectorIndex = 0; } this.selectorIndex = selectorIndex; }
protected SingleSelectorQueryResultRowIterator( JcrQueryContext context, String query, NodeSequence sequence, Columns columns ) { super(context, query, sequence, columns); int selectorIndex = columns.getSelectorIndex(columns.getSelectorNames().get(0)); if (selectorIndex >= sequence.width()) { // The columns were built on top of other columns that expose multiple selectors, but this sequence only has // one selector ... selectorIndex = 0; } this.selectorIndex = selectorIndex; }
@Override public Batch nextBatch() { return batchOf(first.nextBatch(), null, first.width(), secondWidth); }
@Override public Batch nextBatch() { return batchOf(null, second.nextBatch(), firstWidth, second.width()); }
@Override public Batch nextBatch() { return batchOf(first.nextBatch(), null, first.width(), secondWidth); }
protected int computeDefaultSelectorIndex() { Columns columns = results.getColumns(); List<String> selectorNames = columns.getSelectorNames(); int selectorIndex = 0; if (selectorNames.size() == 1) { selectorIndex = columns.getSelectorIndex(selectorNames.get(0)); } if (selectorIndex >= sequence.width()) { // The columns were built on top of other columns that expose multiple selectors, but this sequenc only has // one selector ... selectorIndex = 0; } return selectorIndex; }
@Override public Batch nextBatch() { return batchOf(null, second.nextBatch(), firstWidth, second.width()); }
protected int computeDefaultSelectorIndex() { Columns columns = results.getColumns(); List<String> selectorNames = columns.getSelectorNames(); int selectorIndex = 0; if (selectorNames.size() == 1) { selectorIndex = columns.getSelectorIndex(selectorNames.get(0)); } if (selectorIndex >= sequence.width()) { // The columns were built on top of other columns that expose multiple selectors, but this sequenc only has // one selector ... selectorIndex = 0; } return selectorIndex; }
@Test public void shouldCreateEmptySequenceOfVariousWidths() { for (int i = 0; i != 10; ++i) { NodeSequence seq = NodeSequence.emptySequence(i); assertThat("Incorrect width for empty sequence", seq.width(), is(i)); assertThat(seq.nextBatch(), is(nullValue())); seq.close(); } }