org.modeshape.jcr.query.engine.process

## Class DelegatingSequence

- java.lang.Object
- - org.modeshape.jcr.query.NodeSequence
  - - org.modeshape.jcr.query.engine.process.DelegatingSequence

- Direct Known Subclasses:
    BufferingSequence, DistinctSequence

      public abstract class DelegatingSequence
      extends NodeSequence

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.modeshape.jcr.query.NodeSequence

      `NodeSequence.AlternateSizeBatch, NodeSequence.Batch, NodeSequence.LimitBatch, NodeSequence.MultiWidthBatch, NodeSequence.Restartable, NodeSequence.RowAccessor, NodeSequence.RowFilter, NodeSequence.SingleWidthBatch`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected NodeSequence` | `delegate`

    - ### Fields inherited from class org.modeshape.jcr.query.NodeSequence

      `LOGGER, NO_PASS_ROW_FILTER, PASS_ROW_FILTER`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DelegatingSequence(NodeSequence delegate)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Signal that this node sequence is no longer needed.
    `long` | `getRowCount()` Get the number of rows in this sequence.
    `boolean` | `isEmpty()` Determine whether this results is known to be empty.
    `NodeSequence.Batch` | `nextBatch()` Get the next batch of `NodeKey` instances.
    `int` | `width()` Get the number of nodes in each row.

    - ### Methods inherited from class org.modeshape.jcr.query.NodeSequence

      `append, batchFilteredWith, batchOf, batchOf, batchOf, batchOfKeys, batchOfKeys, batchOfKeys, batchOfKeys, batchWithCount, copy, emptyBatch, emptySequence, filter, keyFor, limit, limit, merging, requireBoth, requireEither, skip, withBatch, withBatches, withBatches, withNode, withNodeKeys, withNodeKeys, withNodeKeys, withNodeKeys, withNodes, withNodes`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### delegate

          protected final NodeSequence delegate

  - ### Constructor Detail

    - #### DelegatingSequence

          protected DelegatingSequence(NodeSequence delegate)

  - ### Method Detail

    - #### width

          public int width()

      Description copied from class: `NodeSequence`
      Get the number of nodes in each row.
      Specified by:
        `width` in class `NodeSequence`
      Returns:
        the width of each row; always positive

    - #### getRowCount

          public long getRowCount()

      Description copied from class: `NodeSequence`
      Get the number of rows in this sequence. If the actual number of rows is not known, this method returns -1.
      Specified by:
        `getRowCount` in class `NodeSequence`
      Returns:
        the number of rows, or -1 if the number of rows is not known or cannot be found with significant overhead

    - #### isEmpty

          public boolean isEmpty()

      Description copied from class: `NodeSequence`
      Determine whether this results is known to be empty.
      Specified by:
        `isEmpty` in class `NodeSequence`
      Returns:
        the true if there are no results, or false if there is at least some or if the number of rows is not known

    - #### nextBatch

          public NodeSequence.Batch nextBatch()

      Description copied from class: `NodeSequence`
      Get the next batch of `NodeKey` instances.
      Specified by:
        `nextBatch` in class `NodeSequence`
      Returns:
        the next batch, or null if there are no more batches.

    - #### close

          public void close()

      Description copied from class: `NodeSequence`
      Signal that this node sequence is no longer needed.
      Specified by:
        `close` in class `NodeSequence`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.