# Package org.modeshape.jcr.query.plan

This package defines the `Planner` interface, the `CanonicalPlanner` implementation, and the `PlanNode` class that is used to represent a canonical query plan.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  Planner | Interface for a query planner.

- Class Summary
  Class | Description
  --- | ---
  CanonicalPlanner | The planner that produces a canonical query plan given a `query command`.
  PlanHints |
  PlanNode | A representation of a single node within a plan tree.
  PlanUtil | Utilities for working with `PlanNode`s.
  PlanUtil.AbsentColumn |
  PlanUtil.ColumnMapping | Defines how the view columns are mapped (or resolved) into the columns from the source tables.
  PlanUtil.RequiredColumnVisitor |

- Enum Summary
  Enum | Description
  --- | ---
  JoinAlgorithm | The type of join algorithms.
  PlanNode.Property | An enumeration dictating the type of plan tree nodes.
  PlanNode.Traversal |
  PlanNode.Type | An enumeration dictating the type of plan tree nodes.

## Package org.modeshape.jcr.query.plan Description

This package defines the `Planner` interface, the `CanonicalPlanner` implementation, and the `PlanNode` class that is used to represent a canonical query plan.

The query plan is a tree of `PlanNode` objects that each represent a different aspect of the query, and is a form that is easily manipulated by subsequent stages. Any implementation of `Planner` can be used, though a `CanonicalPlanner` implementation is provided and will be sufficient for most cases. In fact, the subsequent execution steps often require the plan to be in its canonical form, so for most situations it may be best to simply reuse the CanonicalPlanner and in other simply extend it.

Note that query plans are mutable and not thread-safe, meaning that such plans are not intended to be shared or reused.

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