org.modeshape.jcr.query.engine

## Class ScanningQueryEngine.DynamicOperandFilter

- java.lang.Object
- - org.modeshape.jcr.query.engine.ScanningQueryEngine.DynamicOperandFilter

- All Implemented Interfaces:
    NodeSequence.RowFilter
  Enclosing class:
    ScanningQueryEngine

      protected abstract static class ScanningQueryEngine.DynamicOperandFilter
      extends Object
      implements NodeSequence.RowFilter

  Interface for evaluating a `DynamicOperand` against the current row in a `NodeSequence.Batch` and returning the corresponding value.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ScanningQueryEngine.DynamicOperandFilter(RowExtractors.ExtractFromRow extractor)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract boolean` | `evaluate(Object leftHandValue)` Determine whether the left hand side of the expression (as computed by the dynamic operation) will result in this row being included in the results.
    `boolean` | `isCurrentRowValid(NodeSequence.Batch batch)` Determine if the current row in the given batch satisfies the filter and should be included in the results.

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

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

- - ### Constructor Detail

    - #### ScanningQueryEngine.DynamicOperandFilter

          protected ScanningQueryEngine.DynamicOperandFilter(RowExtractors.ExtractFromRow extractor)

  - ### Method Detail

    - #### isCurrentRowValid

          public boolean isCurrentRowValid(NodeSequence.Batch batch)

      Description copied from interface: `NodeSequence.RowFilter`
      Determine if the current row in the given batch satisfies the filter and should be included in the results.

      Implementations should never call `NodeSequence.Batch.hasNext()` or `NodeSequence.Batch.nextRow()`.

      Specified by:
        `isCurrentRowValid` in interface `NodeSequence.RowFilter`
      Parameters:
        `batch` - the batch that is at a valid row
      Returns:
        true if the current row is acceptable, or false if it should be excluded

    - #### evaluate

          protected abstract boolean evaluate(Object leftHandValue)

      Determine whether the left hand side of the expression (as computed by the dynamic operation) will result in this row being included in the results. Note that implementations will compare this left hand side for the row with a fixed right hand side value.
      Parameters:
        `leftHandValue` - the left hand side of the current row; may be null
      Returns:
        true if the left hand value satisfies this filter, or false otherwise

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