Class ColumnAverageExpression

  • All Implemented Interfaces:
    Serializable, Cloneable, Expression

    public class ColumnAverageExpression
    extends ColumnAggregationExpression
    Deprecated.
    the same can be achived with a formula "AVG([column1], [column2], [column3])"
    Computes the horizontal average over all columns specified in the field-list. The average will be computed over all fields of the current data-row, it will not be computed for all rows in the group. For that use the ItemAvgFunction instead.

    Non numeric and null-columns will be treated as zero for the task of summing up all members. Whether these fields are used counted as valid fields can be controlled with the 'onlyValidFields' flag.

    Author:
    Thomas Morgner
    See Also:
    Serialized Form
    • Constructor Detail

      • ColumnAverageExpression

        public ColumnAverageExpression()
        Deprecated.
        Default Constructor.
    • Method Detail

      • getRoundingMode

        public int getRoundingMode()
        Deprecated.
        Returns the defined rounding mode. This influences the precision of the divide-operation.
        Returns:
        the rounding mode.
        See Also:
        BigDecimal.divide(java.math.BigDecimal, int)
      • setRoundingMode

        public void setRoundingMode​(int roundingMode)
        Deprecated.
        Defines the rounding mode. This influences the precision of the divide-operation.
        Parameters:
        roundingMode - the rounding mode.
        See Also:
        BigDecimal.divide(java.math.BigDecimal, int)
      • getScale

        public int getScale()
        Deprecated.
        Returns the scale for the divide-operation. The scale influences the precision of the division.
        Returns:
        the scale.
      • setScale

        public void setScale​(int scale)
        Deprecated.
        Defines the scale for the divide-operation. The scale influences the precision of the division.
        Parameters:
        scale - the scale.
      • isReturnInfinity

        public boolean isReturnInfinity()
        Deprecated.
        Returns, whether the expression returns infinity if there are no valid fields. If set to false, this expression returns null instead.
        Returns:
        true, if infinity is returned, false otherwise.
      • setReturnInfinity

        public void setReturnInfinity​(boolean returnInfinity)
        Deprecated.
        Defines, whether the expression returns infinity if there are no valid fields. If set to false, this expression returns null instead.
        Parameters:
        returnInfinity - true, if infinity is returned, false otherwise.
      • isOnlyValidFields

        public boolean isOnlyValidFields()
        Deprecated.
        Returns, whether non-numeric and null-values are ignored for the average-computation.
        Returns:
        true, if the invalid fields will be ignored, false if they count as valid zero-value fields.
      • setOnlyValidFields

        public void setOnlyValidFields​(boolean onlyValidFields)
        Deprecated.
        Defines, whether non-numeric and null-values are ignored for the average-computation.
        Parameters:
        onlyValidFields - true, if the invalid fields will be ignored, false if they count as valid zero-value fields.
      • getValue

        public Object getValue()
        Deprecated.
        Computes the horizontal average of all field in the field-list. The average will be computed over all fields of the current data-row, it will not be computed for all rows in the group. For that use the ItemAvgFunction instead.
        Returns:
        the value of the function.