org.xcmis.search.content.interceptors
Class QueryProcessorInterceptor

java.lang.Object
  extended by org.xcmis.search.content.interceptors.AbstractVisitor
      extended by org.xcmis.search.content.interceptors.CommandInterceptor
          extended by org.xcmis.search.content.interceptors.QueryProcessorInterceptor
All Implemented Interfaces:
Visitor, Startable

public class QueryProcessorInterceptor
extends CommandInterceptor

A query engine that is able to execute formal queries expressed in the Abstract Query Model.


Constructor Summary
QueryProcessorInterceptor(QueryExecutionPlaner planner, Optimizer optimizer)
          Create a new query engine given the planner, optimizer, processor.
 
Method Summary
 List<ScoredRow> execute(InvocationContext ctx, QueryExecutionContext context, org.xcmis.search.model.Query query)
          Execute the supplied query by planning, optimizing, and then processing it.
 Object visitProcessQueryCommand(InvocationContext ctx, ProcessQueryCommand command)
           
 
Methods inherited from class org.xcmis.search.content.interceptors.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext, start, stop
 
Methods inherited from class org.xcmis.search.content.interceptors.AbstractVisitor
visitChildEntriesCommand, visitExecuteSelectorCommand, visitGetContentEntryCommand, visitGetUnfiledEntriesCommand, visitModifyIndexCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryProcessorInterceptor

public QueryProcessorInterceptor(QueryExecutionPlaner planner,
                                 Optimizer optimizer)
Create a new query engine given the planner, optimizer, processor.

Parameters:
planner - the planner that should be used to generate canonical query plans for the queries;
optimizer - the optimizer that should be used to optimize the canonical query plan
Throws:
IllegalArgumentException - if the processor reference is null
Method Detail

visitProcessQueryCommand

public Object visitProcessQueryCommand(InvocationContext ctx,
                                       ProcessQueryCommand command)
                                throws Throwable
Specified by:
visitProcessQueryCommand in interface Visitor
Overrides:
visitProcessQueryCommand in class AbstractVisitor
Returns:
Throws:
Throwable
See Also:
AbstractVisitor.visitProcessQueryCommand(org.xcmis.search.content.command.InvocationContext, org.xcmis.search.content.command.query.ProcessQueryCommand)

execute

public List<ScoredRow> execute(InvocationContext ctx,
                               QueryExecutionContext context,
                               org.xcmis.search.model.Query query)
Execute the supplied query by planning, optimizing, and then processing it.

Parameters:
ctx -
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


Copyright © 2010 eXo Platform SAS. All Rights Reserved.