Class IndexDataGeneratorFunction

  • All Implemented Interfaces:
    Serializable, Cloneable, EventListener, org.pentaho.reporting.engine.classic.core.event.PageEventListener, org.pentaho.reporting.engine.classic.core.event.ReportListener, org.pentaho.reporting.engine.classic.core.function.Expression, org.pentaho.reporting.engine.classic.core.function.Function

    public class IndexDataGeneratorFunction
    extends org.pentaho.reporting.engine.classic.core.function.AbstractFunction
    implements org.pentaho.reporting.engine.classic.core.event.PageEventListener
    A data-collector that collects index information from the report. The information is collected on all group start, group finished and detail band events.
    Author:
    Thomas Morgner.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object clone()
      Clones the expression.
      String getDataField()  
      String getDataFormula()  
      String getIndexSeparator()  
      org.pentaho.reporting.engine.classic.core.function.Expression getInstance()
      Return a completly separated copy of this function.
      org.pentaho.reporting.engine.classic.core.util.TypedTableModel getModel()  
      Object getValue()
      Return the current expression value.
      boolean isCondensedStyle()  
      boolean isDeepTraversing()
      Checks whether this expression is a deep-traversing expression.
      void itemsAdvanced​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
      Receives notification that a row of data is being processed.
      void pageFinished​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
      Receives notification that a page is completed.
      void pageStarted​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
      Receives notification that a new page is being started.
      void reportDone​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
      Receives notification that report generation has completed, the report footer was printed, no more output is done.
      void reportInitialized​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
      Receives notification that report generation initializes the current run.
      void reportStarted​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
      Receives notification that the report has started.
      void setCondensedStyle​(boolean condensedStyle)  
      void setDataField​(String dataField)  
      void setDataFormula​(String titleFormula)  
      void setIndexSeparator​(String indexSeparator)  
      • Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction

        groupFinished, groupStarted, itemsFinished, itemsStarted, reportFinished, summaryRowSelection
      • Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression

        getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
      • Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression

        getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isPreserve, setDependencyLevel, setName, setRuntime
    • Constructor Detail

      • IndexDataGeneratorFunction

        public IndexDataGeneratorFunction()
        Creates an unnamed function. Make sure the name of the function is set using AbstractExpression.setName(java.lang.String) before the function is added to the report's function collection.
    • Method Detail

      • isCondensedStyle

        public boolean isCondensedStyle()
      • setCondensedStyle

        public void setCondensedStyle​(boolean condensedStyle)
      • getIndexSeparator

        public String getIndexSeparator()
      • setIndexSeparator

        public void setIndexSeparator​(String indexSeparator)
      • getDataFormula

        public String getDataFormula()
      • setDataFormula

        public void setDataFormula​(String titleFormula)
      • getDataField

        public String getDataField()
      • setDataField

        public void setDataField​(String dataField)
      • reportInitialized

        public void reportInitialized​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
        Receives notification that report generation initializes the current run.

        The event carries a ReportState.Started state. Use this to initialize the report.

        Specified by:
        reportInitialized in interface org.pentaho.reporting.engine.classic.core.event.ReportListener
        Overrides:
        reportInitialized in class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
        Parameters:
        event - The event.
      • reportStarted

        public void reportStarted​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
        Receives notification that the report has started.
        Specified by:
        reportStarted in interface org.pentaho.reporting.engine.classic.core.event.ReportListener
        Overrides:
        reportStarted in class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
        Parameters:
        event - the event.
      • itemsAdvanced

        public void itemsAdvanced​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
        Receives notification that a row of data is being processed.
        Specified by:
        itemsAdvanced in interface org.pentaho.reporting.engine.classic.core.event.ReportListener
        Overrides:
        itemsAdvanced in class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
        Parameters:
        event - the event.
      • pageStarted

        public void pageStarted​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
        Receives notification that a new page is being started.
        Specified by:
        pageStarted in interface org.pentaho.reporting.engine.classic.core.event.PageEventListener
        Parameters:
        event - The event.
      • pageFinished

        public void pageFinished​(org.pentaho.reporting.engine.classic.core.event.ReportEvent event)
        Receives notification that a page is completed.
        Specified by:
        pageFinished in interface org.pentaho.reporting.engine.classic.core.event.PageEventListener
        Parameters:
        event - The event.
      • reportDone

        public void reportDone​(org.pentaho.reporting.engine.classic.core.event.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 org.pentaho.reporting.engine.classic.core.event.ReportListener
        Overrides:
        reportDone in class org.pentaho.reporting.engine.classic.core.function.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 org.pentaho.reporting.engine.classic.core.function.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 org.pentaho.reporting.engine.classic.core.function.Expression
        Overrides:
        isDeepTraversing in class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
        Returns:
        false.
      • 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 org.pentaho.reporting.engine.classic.core.function.Expression
        Overrides:
        clone in class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
        Returns:
        a clone of this expression.
        Throws:
        CloneNotSupportedException - this should never happen.
      • getInstance

        public org.pentaho.reporting.engine.classic.core.function.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 org.pentaho.reporting.engine.classic.core.function.Expression
        Overrides:
        getInstance in class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
        Returns:
        a copy of this function.
      • getModel

        public org.pentaho.reporting.engine.classic.core.util.TypedTableModel getModel()