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
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
planner
protected final Planner planner
optimizer
protected final Optimizer optimizer
processor
protected final Processor processor
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 usedoptimizer
- the optimizer that should be used to optimize the canonical query plan; may be null if the
RuleBasedOptimizer
should be usedprocessor
- the processor implementation that should be used to process the planned query and return the results
- Throws:
IllegalArgumentException
- if the processor reference is null
execute
public QueryResults execute(QueryContext context,
QueryCommand query)
throws QueryCancelledException,
RepositoryException
- Execute the supplied query by planning, optimizing, and then processing it.
- Parameters:
context
- the context in which the query should be executedquery
- the query that is to be executed
- Returns:
- the query results; never null
- Throws:
IllegalArgumentException
- if the context or query references are null
QueryCancelledException
- if the query was cancelled
RepositoryException
- if there was a problem executing the query
determineQueryResultColumns
protected QueryResultColumns determineQueryResultColumns(PlanNode optimizedPlan,
PlanHints hints)
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.