Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr.query.process
Class QueryEngine

    java.lang.Object
      org.modeshape.jcr.query.process.QueryEngine

Direct Known Subclasses:
  LuceneQueryEngine

    @ThreadSafe
    public class QueryEngine

extends Object

A query engine that is able to execute formal queries expressed in the Graph API's `Abstract Query Model`.

Field Summary
`protected Optimizer` | `optimizer`
`protected Planner` | `planner`
`protected Processor` | `processor`

Constructor Summary
`QueryEngine(Planner planner, Optimizer optimizer, Processor processor)` Create a new query engine given the `planner`, `optimizer`, `processor`, and `schemata`.

Method Summary
`protected QueryResultColumns` | `determineQueryResultColumns(PlanNode optimizedPlan, PlanHints hints)`
`QueryResults` | `execute(QueryContext context, QueryCommand query)` Execute the supplied query by planning, optimizing, and then processing it.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### planner

    protected final Planner planner

### optimizer

    protected final Optimizer optimizer

### processor

    protected final Processor processor

Constructor Detail

### QueryEngine

    public QueryEngine(Planner planner,
                       Optimizer optimizer,
                       Processor processor)

  Create a new query engine given the `planner`, `optimizer`, `processor`, and `schemata`.

  Parameters:
    `planner` - the planner that should be used to generate canonical query plans for the queries; may be null if the `CanonicalPlanner` should be used
    `optimizer` - the optimizer that should be used to optimize the canonical query plan; may be null if the `RuleBasedOptimizer` should be used
    `processor` - the processor implementation that should be used to process the planned query and return the results
  Throws:
    `IllegalArgumentException` - if the processor reference is null

Method Detail

### execute

    public QueryResults execute(QueryContext context,
                                QueryCommand query)

  Execute the supplied query by planning, optimizing, and then processing it.

  Parameters:
    `context` - the context in which the query should be executed
    `query` - the query that is to be executed
  Returns:
    the query results; never null
  Throws:
    `IllegalArgumentException` - if the context or query references are null

### determineQueryResultColumns

    protected QueryResultColumns determineQueryResultColumns(PlanNode optimizedPlan,
                                                             PlanHints hints)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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