org.pentaho.reporting.engine.classic.core.states.crosstab
Class CrosstabProcessorFunction

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.AbstractExpression
      extended by org.pentaho.reporting.engine.classic.core.function.AbstractFunction
          extended by org.pentaho.reporting.engine.classic.core.states.crosstab.CrosstabProcessorFunction
All Implemented Interfaces:
Serializable, Cloneable, EventListener, ReportListener, Expression, Function, StructureFunction

public class CrosstabProcessorFunction
extends AbstractFunction
implements StructureFunction

Computes the column-axis values for all crosstabs in the current report and all of its subreports.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
CrosstabProcessorFunction()
           
 
Method Summary
 Object clone()
          Clones the expression.
 int getDependencyLevel()
          Returns the dependency level for the expression (controls evaluation order for expressions and functions).
 Expression getInstance()
          Return a completly separated copy of this function.
 int getProcessingPriority()
           
 Object getValue()
          Return the current expression value.
 void groupFinished(ReportEvent event)
          Receives notification that a group has finished.
 void groupStarted(ReportEvent event)
          Receives notification that a group has started.
 boolean isDeepTraversing()
          Checks whether this expression is a deep-traversing expression.
 void itemsAdvanced(ReportEvent event)
          Receives notification that a row of data is being processed.
 void reportDone(ReportEvent event)
          Receives notification that report generation has completed, the report footer was printed, no more output is done.
 void reportStarted(ReportEvent event)
          Receives notification that the report has started.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
itemsFinished, itemsStarted, reportFinished, reportInitialized
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
getDataRow, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.event.ReportListener
itemsFinished, itemsStarted, reportFinished, reportInitialized
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
getDataRow, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isPreserve, setDependencyLevel, setName, setRuntime
 

Constructor Detail

CrosstabProcessorFunction

public CrosstabProcessorFunction()
Method Detail

getProcessingPriority

public int getProcessingPriority()
Specified by:
getProcessingPriority in interface StructureFunction

reportStarted

public void reportStarted(ReportEvent event)
Receives notification that the report has started.

Specified by:
reportStarted in interface ReportListener
Overrides:
reportStarted in class AbstractFunction
Parameters:
event - the event.

reportDone

public void reportDone(ReportEvent event)
Receives notification that report generation has completed, the report footer was printed, no more output is done. This is a helper event to shut down the output service.

Specified by:
reportDone in interface ReportListener
Overrides:
reportDone in class AbstractFunction
Parameters:
event - The event.

groupStarted

public void groupStarted(ReportEvent event)
Receives notification that a group has started.

Specified by:
groupStarted in interface ReportListener
Overrides:
groupStarted in class AbstractFunction
Parameters:
event - the event.

groupFinished

public void groupFinished(ReportEvent event)
Receives notification that a group has finished.

Specified by:
groupFinished in interface ReportListener
Overrides:
groupFinished in class AbstractFunction
Parameters:
event - the event.

itemsAdvanced

public void itemsAdvanced(ReportEvent event)
Receives notification that a row of data is being processed.

Specified by:
itemsAdvanced in interface ReportListener
Overrides:
itemsAdvanced in class AbstractFunction
Parameters:
event - the event.

getValue

public Object getValue()
Return the current expression value.

The value depends (obviously) on the expression implementation.

Specified by:
getValue in interface Expression
Returns:
the value of the function.

isDeepTraversing

public boolean isDeepTraversing()
Checks whether this expression is a deep-traversing expression. Deep-traversing expressions receive events from all sub-reports. This returns false by default, as ordinary expressions have no need to be deep-traversing.

Specified by:
isDeepTraversing in interface Expression
Overrides:
isDeepTraversing in class AbstractExpression
Returns:
false.

getDependencyLevel

public int getDependencyLevel()
Returns the dependency level for the expression (controls evaluation order for expressions and functions).

Specified by:
getDependencyLevel in interface Expression
Overrides:
getDependencyLevel in class AbstractExpression
Returns:
the level.

clone

public Object clone()
             throws CloneNotSupportedException
Clones the expression. The expression should be reinitialized after the cloning.

Expressions maintain no state, cloning is done at the beginning of the report processing to disconnect the expression from any other object space.

Specified by:
clone in interface Expression
Overrides:
clone in class AbstractExpression
Returns:
a clone of this expression.
Throws:
CloneNotSupportedException - this should never happen.

getInstance

public Expression getInstance()
Return a completly separated copy of this function. The copy does no longer share any changeable objects with the original function.

Specified by:
getInstance in interface Expression
Overrides:
getInstance in class AbstractExpression
Returns:
a copy of this function.