org.pentaho.reporting.engine.classic.core.function
Class TotalGroupCountFunction

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.function.GroupCountFunction
              extended by org.pentaho.reporting.engine.classic.core.function.TotalGroupCountFunction
All Implemented Interfaces:
Serializable, Cloneable, EventListener, ReportListener, Expression, Function

public class TotalGroupCountFunction
extends GroupCountFunction

A report function that counts the total of groups in a report. If a null-groupname is given, all groups are counted.

A group can be defined using the property "group". If the group property is not set, all group starts get counted.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
TotalGroupCountFunction()
          Default constructor.
 
Method Summary
 Expression getInstance()
          Return a completly separated copy of this function.
 Object getValue()
          Returns the computed value.
 void groupStarted(ReportEvent event)
          Receives notification that a group has started.
 void reportInitialized(ReportEvent event)
          Receives notification that the report has started.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.GroupCountFunction
getGroup, getParentGroup, setGroup, setParentGroup
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
groupFinished, itemsAdvanced, itemsFinished, itemsStarted, reportDone, reportFinished, reportStarted
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, 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.function.Expression
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setDependencyLevel, setName, setRuntime
 

Constructor Detail

TotalGroupCountFunction

public TotalGroupCountFunction()
Default constructor.

Method Detail

reportInitialized

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

Specified by:
reportInitialized in interface ReportListener
Overrides:
reportInitialized in class GroupCountFunction
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 GroupCountFunction
Parameters:
event - the event.

getValue

public Object getValue()
Returns the computed value.

Specified by:
getValue in interface Expression
Overrides:
getValue in class GroupCountFunction
Returns:
the computed value.

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.