org.modeshape.jcr.query

## Interface QueryResults

- All Known Implementing Classes:
    Results

      @Immutable
      public interface QueryResults

  The resulting output of a query.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `QueryResults.Columns` Definition of the columns that are available in the results.
    `static class` | `QueryResults.Statistics`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ThreadLocal<DecimalFormat>` | `FORMATTER`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CachedNodeSupplier` | `getCachedNodes()` Get the supplier with which a node can be found by key.
    `QueryResults.Columns` | `getColumns()` Get the description of the columns contained in these results.
    `String` | `getPlan()` Get a description of the query plan, if requested.
    `Problems` | `getProblems()` Get the problems encountered during execution.
    `long` | `getRowCount()` Get the number of rows in the results, if that information is available.
    `NodeSequence` | `getRows()` Get the rows that make up these query results.
    `QueryResults.Statistics` | `getStatistics()` Get the statistics that describe the time metrics for this query.
    `boolean` | `hasErrors()` Return true if there is at least one error recorded in the `problems`.
    `boolean` | `hasWarnings()` Return true if there is at least one warning recorded in the `problems`.
    `boolean` | `isEmpty()` Determine whether this results is known to be empty.

- - ### Field Detail

    - #### FORMATTER

          static final ThreadLocal<DecimalFormat> FORMATTER

  - ### Method Detail

    - #### getColumns

          QueryResults.Columns getColumns()

      Get the description of the columns contained in these results.
      Returns:
        the column descriptions; never null

    - #### getRows

          NodeSequence getRows()

      Get the rows that make up these query results.
      Returns:
        the sequence of rows; never null

    - #### getCachedNodes

          CachedNodeSupplier getCachedNodes()

      Get the supplier with which a node can be found by key.
      Returns:
        the supplier of `CachedNode` instances; never null

    - #### getRowCount

          long getRowCount()

      Get the number of rows in the results, if that information is available.
      Returns:
        the number of rows; may be equal to -1 if the number of rows is not known without significant overhead

    - #### isEmpty

          boolean isEmpty()

      Determine whether this results is known to be empty.
      Returns:
        the true if there are no results, or false if there is at least some rows or if the number of rows is not known

    - #### getPlan

          String getPlan()

      Get a description of the query plan, if requested.
      Returns:
        the query plan, or null if the plan was not requested

    - #### getProblems

          Problems getProblems()

      Get the problems encountered during execution.
      Returns:
        the problems; never null but possibly empty

    - #### hasErrors

          boolean hasErrors()

      Return true if there is at least one error recorded in the `problems`.
      Returns:
        true if there is one or more errors associated with the query, or false otherwise

    - #### hasWarnings

          boolean hasWarnings()

      Return true if there is at least one warning recorded in the `problems`.
      Returns:
        true if there is one or more warnings associated with the query, or false otherwise

    - #### getStatistics

          QueryResults.Statistics getStatistics()

      Get the statistics that describe the time metrics for this query.
      Returns:
        the statistics; never null

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