org.usergrid.persistence.query.ir
Class SearchVisitor

java.lang.Object
  extended by org.usergrid.persistence.query.ir.SearchVisitor
All Implemented Interfaces:
NodeVisitor

public abstract class SearchVisitor
extends Object
implements NodeVisitor

Simple search visitor that performs all the joining in memory for results. Subclasses will want to implement visiting SliceNode and WithinNode to actually perform the search on the Cassandra indexes. This class can perform joins on all index entries that conform to the Results object

Author:
tnine

Field Summary
protected  Query query
           
protected  QueryProcessor queryProcessor
           
protected  Stack<Results> results
           
 
Constructor Summary
SearchVisitor(Query query, QueryProcessor queryProcessor)
           
 
Method Summary
 Results getResults()
          Return the results if they exist, null otherwise
 void visit(AndNode node)
           
 void visit(NotNode node)
           
 void visit(OrNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.usergrid.persistence.query.ir.NodeVisitor
visit, visit, visit
 

Field Detail

query

protected Query query

queryProcessor

protected QueryProcessor queryProcessor

results

protected Stack<Results> results
Constructor Detail

SearchVisitor

public SearchVisitor(Query query,
                     QueryProcessor queryProcessor)
Parameters:
query -
Method Detail

getResults

public Results getResults()
Return the results if they exist, null otherwise

Returns:

visit

public void visit(AndNode node)
           throws Exception
Specified by:
visit in interface NodeVisitor
Throws:
Exception

visit

public void visit(NotNode node)
           throws Exception
Specified by:
visit in interface NodeVisitor
Throws:
Exception

visit

public void visit(OrNode node)
           throws Exception
Specified by:
visit in interface NodeVisitor
Throws:
Exception


Copyright © 2013. All Rights Reserved.