org.outerj.grouping
Class CalculateSummariesVisitor

java.lang.Object
  extended byorg.outerj.grouping.CalculateSummariesVisitor
All Implemented Interfaces:
GroupVisitor

public class CalculateSummariesVisitor
extends java.lang.Object
implements GroupVisitor

This visitor will calculate the summaries for each group. In case an error occurs during evaluation of a summary-expression, then these errors are reported to an ErrorListener set with setErrorListener(org.outerj.grouping.ErrorListener).


Field Summary
protected  SummaryExpressionContextWrapper contextWrapper
           
protected  ErrorListener errorListener
           
protected  GroupDefinition[] groupDefinitions
           
protected  int groupNestingLevel
           
protected  Table table
           
 
Constructor Summary
CalculateSummariesVisitor(Table table, ExpressionContext expressionContext, GroupDefinition[] groupDefinitions)
           
 
Method Summary
 void endVisitGroup(Group group)
           
protected  void reportError(java.lang.String message, java.lang.Exception e)
           
 void setErrorListener(ErrorListener errorListener)
           
 void startVisitGroup(Group group)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupNestingLevel

protected int groupNestingLevel

table

protected Table table

groupDefinitions

protected GroupDefinition[] groupDefinitions

contextWrapper

protected SummaryExpressionContextWrapper contextWrapper

errorListener

protected ErrorListener errorListener
Constructor Detail

CalculateSummariesVisitor

public CalculateSummariesVisitor(Table table,
                                 ExpressionContext expressionContext,
                                 GroupDefinition[] groupDefinitions)
Method Detail

startVisitGroup

public void startVisitGroup(Group group)
                     throws java.lang.Exception
Specified by:
startVisitGroup in interface GroupVisitor
Throws:
java.lang.Exception

endVisitGroup

public void endVisitGroup(Group group)
                   throws java.lang.Exception
Specified by:
endVisitGroup in interface GroupVisitor
Throws:
java.lang.Exception

setErrorListener

public void setErrorListener(ErrorListener errorListener)

reportError

protected void reportError(java.lang.String message,
                           java.lang.Exception e)