Class CountDistinctFunction

    • Constructor Detail

      • CountDistinctFunction

        public CountDistinctFunction()
    • Method Detail

      • isIgnoreNullValues

        public boolean isIgnoreNullValues()
      • setIgnoreNullValues

        public void setIgnoreNullValues​(boolean ignoreNullValues)
      • setGroup

        public void setGroup​(String name)
        Sets the group name.

        If a group is defined, the running total is reset to zero at the start of every instance of this group.

        Specified by:
        setGroup in interface AggregationFunction
        name - the group name (null permitted).
      • getField

        public String getField()
        Returns the field used by the function. The field name corresponds to a column name in the report's data-row.
        Specified by:
        getField in interface FieldAggregationFunction
        The field name.
      • setField

        public void setField​(String field)
        Sets the field name for the function. The field name corresponds to a column name in the report's data-row.
        Specified by:
        setField in interface FieldAggregationFunction
        field - the field name.
      • reportInitialized

        public void reportInitialized​(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 ReportListener
        reportInitialized in class AbstractFunction
        event - The event.
      • getValue

        public Object getValue()
        Return the number of distint values for the given column.
        Specified by:
        getValue in interface Expression
        the value of the function.
      • 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
        getInstance in class AbstractExpression
        a copy of this function.
      • 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
        clone in class AbstractExpression
        a clone of this expression.
        CloneNotSupportedException - this should never happen.