com.flexive.shared.search.query
Class MaxNodeIdVisitor

java.lang.Object
  extended by com.flexive.shared.search.query.MaxNodeIdVisitor
All Implemented Interfaces:
QueryNodeVisitor

public class MaxNodeIdVisitor
extends java.lang.Object
implements QueryNodeVisitor

Query tree node visitor that returns the maximum ID of the tree.

Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Constructor Summary
MaxNodeIdVisitor()
           
 
Method Summary
 int getMaxId()
           
 void setCurrentParent(QueryOperatorNode operatorNode)
          Sets the parent node of the visited node.
 void visit(QueryOperatorNode operatorNode)
          Visit an operator node, i.e.
 void visit(QueryValueNode valueNode)
          Visit a value node, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxNodeIdVisitor

public MaxNodeIdVisitor()
Method Detail

setCurrentParent

public void setCurrentParent(QueryOperatorNode operatorNode)
Sets the parent node of the visited node.

Specified by:
setCurrentParent in interface QueryNodeVisitor
Parameters:
operatorNode - the parent node of the next visited node

visit

public void visit(QueryOperatorNode operatorNode)
Visit an operator node, i.e. a node in the tree with a query operator (usually AND/OR).

Specified by:
visit in interface QueryNodeVisitor
Parameters:
operatorNode - the operator node visited

visit

public void visit(QueryValueNode valueNode)
Visit a value node, i.e. a leaf node with some kind of value attached.

Specified by:
visit in interface QueryNodeVisitor
Parameters:
valueNode - the value node visited

getMaxId

public int getMaxId()