org.modeshape.jcr.query.engine.process

## Class DistinctSequence

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

-     public class DistinctSequence
      extends DelegatingSequence

  A `NodeSequence` that wraps another `NodeSequence` and returns only those rows that are seen for the first time.

- - ### 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 RowExtractors.ExtractFromRow` | `keyExtractor`
    `protected static Logger` | `LOGGER`
    `protected boolean` | `trace`

    - ### Fields inherited from class org.modeshape.jcr.query.engine.process.DelegatingSequence

      `delegate`

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

      `NO_PASS_ROW_FILTER, PASS_ROW_FILTER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DistinctSequence(NodeSequence delegate, TypeSystem types, BufferManager bufferMgr, boolean useHeap)` Create a new distinct sequence given the type system and buffer manager.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NodeSequence.Batch` | `nextBatch()` Get the next batch of `NodeKey` instances.
    `String` | `toString()`

    - ### Methods inherited from class org.modeshape.jcr.query.engine.process.DelegatingSequence

      `close, getRowCount, isEmpty, width`

    - ### 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, slice, slicingBatch, withBatch, withBatches, withBatches, withNode, withNodeKeys, withNodeKeys, withNodeKeys, withNodeKeys, withNodes, withNodes`

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

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

- - ### Field Detail

    - #### LOGGER

          protected static final Logger LOGGER

    - #### keyExtractor

          protected final RowExtractors.ExtractFromRow keyExtractor

    - #### trace

          protected final boolean trace

  - ### Constructor Detail

    - #### DistinctSequence

          public DistinctSequence(NodeSequence delegate,
                          TypeSystem types,
                          BufferManager bufferMgr,
                          boolean useHeap)

      Create a new distinct sequence given the type system and buffer manager.
      Parameters:
        `delegate` - the node sequence that is to be wrapped; may not be null
        `types` - the system of type factories; may not be null
        `bufferMgr` - the buffer manager that should be used to create a temporary buffer into which records of the rows can be kept; may not be null
        `useHeap` - true if the temporary buffer should use the heap, or false if it should store data off-heap

  - ### Method Detail

    - #### nextBatch

          public NodeSequence.Batch nextBatch()

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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