org.modeshape.jcr.query.plan

## Class PlanHints

- java.lang.Object
- - org.modeshape.jcr.query.plan.PlanHints

- All Implemented Interfaces:
    Serializable, Cloneable

      @NotThreadSafe
      public final class PlanHints
      extends Object
      implements Serializable, Cloneable

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `hasCriteria` This flag indicates that the plan has a criteria somewhere
    `boolean` | `hasFullTextSearch`
    `boolean` | `hasJoin` This flag indicates that the plan has a join somewhere
    `boolean` | `hasLimit`
    `boolean` | `hasOptionalJoin`
    `boolean` | `hasSetQuery` flag indicates that the plan has a union somewhere
    `boolean` | `hasSort` This flag indicates that the plan has a sort somewhere
    `boolean` | `hasSubqueries`
    `boolean` | `hasView` Flag indicates that the plan has at least one view somewhere
    `boolean` | `includeSystemContent` Flag indicates whether the content under "/jcr:system" should be included in the results.
    `boolean` | `isExistsQuery` Set when the query results are not ordered or offset but are limited to a single row, implying that the query is just trying to see if a row exists.
    `boolean` | `planOnly` Flag indicates whether the query execution can be stopped immediately after the plan is developed.
    `boolean` | `qualifyExpandedColumnNames` Flag indicates whether to fully-qualify (with the selector name) the names of columns that are expanded from wildcard projections.
    `boolean` | `restartable` Flag indicating whether iterating over the results can be done more than once.
    `int` | `rowsKeptInMemory` When ModeShape buffers results so that they can be accessed more than once, it keeps a small number of rows in memory to minimize the performance overhead.
    `boolean` | `showPlan` Flag indicates whether the query plan should be included in the `QueryResults`
    `boolean` | `useSessionContent` Flag indicates whether the Session's transient (unsaved) content should be used for the results.
    `boolean` | `validateColumnExistance` Flag indicates whether to check during validation for the existance of columns used in column selectors and criteria.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlanHints()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PlanHints` | `clone()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### hasCriteria

          public boolean hasCriteria

      This flag indicates that the plan has a criteria somewhere

    - #### hasJoin

          public boolean hasJoin

      This flag indicates that the plan has a join somewhere

    - #### hasSort

          public boolean hasSort

      This flag indicates that the plan has a sort somewhere

    - #### hasSetQuery

          public boolean hasSetQuery

      flag indicates that the plan has a union somewhere

    - #### hasLimit

          public boolean hasLimit

    - #### isExistsQuery

          public boolean isExistsQuery

      Set when the query results are not ordered or offset but are limited to a single row, implying that the query is just trying to see if a row exists.

    - #### hasOptionalJoin

          public boolean hasOptionalJoin

    - #### hasFullTextSearch

          public boolean hasFullTextSearch

    - #### hasSubqueries

          public boolean hasSubqueries

    - #### hasView

          public boolean hasView

      Flag indicates that the plan has at least one view somewhere

    - #### showPlan

          public boolean showPlan

      Flag indicates whether the query plan should be included in the `QueryResults`

    - #### planOnly

          public boolean planOnly

      Flag indicates whether the query execution can be stopped immediately after the plan is developed.

    - #### validateColumnExistance

          public boolean validateColumnExistance

      Flag indicates whether to check during validation for the existance of columns used in column selectors and criteria.

    - #### includeSystemContent

          public boolean includeSystemContent

      Flag indicates whether the content under "/jcr:system" should be included in the results.

    - #### useSessionContent

          public boolean useSessionContent

      Flag indicates whether the Session's transient (unsaved) content should be used for the results. If not, then only the persisted content will be used.

    - #### qualifyExpandedColumnNames

          public boolean qualifyExpandedColumnNames

      Flag indicates whether to fully-qualify (with the selector name) the names of columns that are expanded from wildcard projections.

    - #### restartable

          public boolean restartable

      Flag indicating whether iterating over the results can be done more than once. The query engine is optimized to only require access to the results one time. In such cases, results are pulled lazily only as they are needed by the client, and there is minimal buffering and no extra overhead of temporarily storing the results. This is also inline with the JCR 2.0 specification, which states that when `QueryResult.getRows()` or `QueryResult.getNodes()` are called a second time the implementation may throw an exception. However, this places a restriction on JCR client applications that are not always ideal. Therefore, the default is `true` so that working with results is easier but less-efficient. Where possible, set this to `false` to enforce strict "use results once" and eliminate this overhead.

    - #### rowsKeptInMemory

          public int rowsKeptInMemory

      When ModeShape buffers results so that they can be accessed more than once, it keeps a small number of rows in memory to minimize the performance overhead. Increasing this value for a query will cause the query's results to consume more memory, but for small queries this may improve how quickly the results can be accessed. Note that the value also affects performance when a lot of queries are being processed concurrently. The default value is .

  - ### Constructor Detail

    - #### PlanHints

          public PlanHints()

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### clone

          public PlanHints clone()

      Overrides:
        `clone` in class `Object`

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