org.modeshape.jcr.query.engine.process

## Class HashJoinSequence.HashJoinBatch

- java.lang.Object
- - org.modeshape.jcr.query.engine.process.HashJoinSequence.HashJoinBatch

- All Implemented Interfaces:
    NodeSequence.Batch, NodeSequence.RowAccessor
  Direct Known Subclasses:
    HashJoinSequence.HashCrossJoinBatch, HashJoinSequence.HashJoinRangeBatch
  Enclosing class:
    HashJoinSequence

      protected class HashJoinSequence.HashJoinBatch
      extends Object
      implements NodeSequence.Batch

  A batch that contains rows that will have a left value and a right value.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `HashJoinSequence.HashJoinBatch(NodeSequence.Batch currentLeft)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CachedNode` | `getNode()` Get the first node in the current row.
    `CachedNode` | `getNode(int index)` Get the node at the specified index in the current row.
    `protected Iterator<BufferedRows.BufferedRow>` | `getRightRowsFor(Object leftValue)`
    `float` | `getScore()` Get the score for the first node in the current row.
    `float` | `getScore(int index)` Get the score for the specified node in the current row.
    `String` | `getWorkspaceName()` Get the name of the workspace in which exists all nodes in this batch.
    `boolean` | `hasNext()` Determine if there are more rows in this batch.
    `boolean` | `isEmpty()` Determine whether this batch is empty.
    `void` | `nextRow()` Move to the next row in this batch.
    `protected void` | `recordRightRowsMatched(Object rightKey)`
    `long` | `rowCount()` Get the number of rows in the batch, if that information is available.
    `int` | `width()` Get the number of nodes in each row.

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

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

- - ### Constructor Detail

    - #### HashJoinSequence.HashJoinBatch

          protected HashJoinSequence.HashJoinBatch(NodeSequence.Batch currentLeft)

  - ### Method Detail

    - #### width

          public int width()

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

    - #### getWorkspaceName

          public String getWorkspaceName()

      Description copied from interface: `NodeSequence.Batch`
      Get the name of the workspace in which exists all nodes in this batch.
      Specified by:
        `getWorkspaceName` in interface `NodeSequence.Batch`
      Returns:
        the workspace name; never null

    - #### isEmpty

          public boolean isEmpty()

      Description copied from interface: `NodeSequence.Batch`
      Determine whether this batch is empty.
      Specified by:
        `isEmpty` in interface `NodeSequence.Batch`
      Returns:
        the true if there are no results, or false if there is at least some

    - #### rowCount

          public long rowCount()

      Description copied from interface: `NodeSequence.Batch`
      Get the number of rows in the batch, if that information is available.
      Specified by:
        `rowCount` in interface `NodeSequence.Batch`
      Returns:
        the number of rows; may be equal to -1 if the number of rows is not known without significant overhead

    - #### hasNext

          public boolean hasNext()

      Description copied from interface: `NodeSequence.Batch`
      Determine if there are more rows in this batch.
      Specified by:
        `hasNext` in interface `NodeSequence.Batch`
      Returns:
        true if there are more rows, or false otherwise

    - #### getRightRowsFor

          protected Iterator<BufferedRows.BufferedRow> getRightRowsFor(Object leftValue)

    - #### recordRightRowsMatched

          protected void recordRightRowsMatched(Object rightKey)

    - #### nextRow

          public void nextRow()

      Description copied from interface: `NodeSequence.Batch`
      Move to the next row in this batch.
      Specified by:
        `nextRow` in interface `NodeSequence.Batch`

    - #### getNode

          public CachedNode getNode()

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the first node in the current row. This is a convenience method that is equivalent to `getNode(0)`.
      Specified by:
        `getNode` in interface `NodeSequence.RowAccessor`
      Returns:
        the first node in the current row; may be null if there is no node at the first position in this row

    - #### getNode

          public CachedNode getNode(int index)

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the node at the specified index in the current row.
      Specified by:
        `getNode` in interface `NodeSequence.RowAccessor`
      Parameters:
        `index` - the 0-based index for the node in the row; must be less than `NodeSequence.RowAccessor.width()`.
      Returns:
        the specified node in the current row; may be null if there is no node at the valid index in this row

    - #### getScore

          public float getScore()

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the score for the first node in the current row. This is a convenience method that is equivalent to `getScore(0)`.
      Specified by:
        `getScore` in interface `NodeSequence.RowAccessor`
      Returns:
        the score for the first node in the current row; always 0.0f if there is no corresponding node at the valid index in this row

    - #### getScore

          public float getScore(int index)

      Description copied from interface: `NodeSequence.RowAccessor`
      Get the score for the specified node in the current row.
      Specified by:
        `getScore` in interface `NodeSequence.RowAccessor`
      Parameters:
        `index` - the 0-based index for the node in the row; must be less than `NodeSequence.RowAccessor.width()`.
      Returns:
        the score for the specified node in the current row; always 0.0f if there is no corresponding node at the valid index in this row

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