Interface Expression

    • Method Detail

      • getName

        String getName()
        Returns the name of the expression.

        Every expression, function and column in the datamodel within a report is required to have a unique name.

        Returns:
        the function name.
      • setName

        void setName​(String name)
        Sets the name of the expression.

        The name must not be null and must be unique within the expressions of the report, if you intend to use this as a global expression. Expressions for style-expressions or attribute-expressions can work without a name.

        Parameters:
        name - the name.
      • getValue

        Object getValue()
        Return the current expression value.

        The value depends (obviously) on the expression implementation.

        Returns:
        the value of the function.
      • isActive

        boolean isActive()
        Deprecated.
        The Active-Flag is no longer evaluated. We always assume it to be true.
        Returns true if this expression contains autoactive content and should be called by the system, regardless whether this expression is referenced in the datarow.
        Returns:
        true, if the expression is activated automaticly, false otherwise.
      • getDataRow

        DataRow getDataRow()
        Returns the DataRow used in this expression. The dataRow is set when the report processing starts and can be used to access the values of functions, expressions and the reports datasource.
        Returns:
        the assigned DataRow for this report processing.
      • clone

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

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

        Returns:
        A clone of this expression.
        Throws:
        CloneNotSupportedException - this should never happen.
      • getDependencyLevel

        int getDependencyLevel()
        The dependency level defines the level of execution for this function. Higher dependency functions are executed before lower dependency functions. For ordinary functions and expressions, the range for dependencies is defined to start from 0 (lowest dependency possible) to 2^31 (upper limit of int).

        Levels below 0 are reserved for system-functionality (printing and layouting).

        The level must not change during the report processing, or the result is invalid.

        Returns:
        the level.
      • setDependencyLevel

        void setDependencyLevel​(int level)
        Sets the dependency level for the expression.
        Parameters:
        level - the level.
      • getInstance

        Expression getInstance()
        Return a new instance of this expression. The copy is initialized and uses the same parameters as the original, but does not share any objects.
        Returns:
        a copy of this function.
      • getResourceBundleFactory

        ResourceBundleFactory getResourceBundleFactory()
        Returns the resource-bundle factory of the report. This factory encapsulates the Locale and allows to create a resource-bundle in a implementation-independent way.
        Returns:
        the resource-bundle factory.
      • getReportConfiguration

        org.pentaho.reporting.libraries.base.config.Configuration getReportConfiguration()
        Returns the report's current configuration.
        Returns:
        the configuration of the report.
      • setRuntime

        void setRuntime​(ExpressionRuntime runtime)
        Defines the DataRow used in this expression. The dataRow is set when the report processing starts and can be used to access the values of functions, expressions and the reports datasource.
        Parameters:
        runtime - the runtime information for the expression
      • getRuntime

        ExpressionRuntime getRuntime()
        Retrieves the runtime instance.
        Returns:
        the runtime, can be null, if the expression is abused outside of the report processing.
      • isDeepTraversing

        boolean isDeepTraversing()
        Checks whether this expression is a deep-traversing expression. Deep-traversing expressions receive events from all sub-reports.
        Returns:
        the deep-traversing flag.
      • isPreserve

        boolean isPreserve()
        Checks whether this expression's last value is preserved after the expression goes out of scope.
        Returns:
        true, if the expression's last value is preserved, false otherwise.