Class AvgFunctionStateObject

  • All Implemented Interfaces:
    StateObject

    public class AvgFunctionStateObject
    extends AggregateFunctionStateObject
    One of the aggregate functions. The arguments must be numeric. AVG returns Double.
    BNF: expression ::= AVG([DISTINCT] state_field_path_expression)

    Version:
    2.4
    See Also:
    AvgFunction
    Author:
    Pascal Filion
    Since:
    2.4
    • Constructor Detail

      • AvgFunctionStateObject

        public AvgFunctionStateObject​(StateObject parent)
        Creates a new AvgFunctionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • AvgFunctionStateObject

        public AvgFunctionStateObject​(StateObject parent,
                                      boolean distinct,
                                      StateObject stateObject)
        Creates a new AvgFunctionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        distinct - true to add DISTINCT to the query in order to have distinct values; false if it is not required
        stateObject - The StateObject representing the encapsulated expression
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • AvgFunctionStateObject

        public AvgFunctionStateObject​(StateObject parent,
                                      boolean distinct,
                                      java.lang.String path)
        Creates a new AvgFunctionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        distinct - true to add DISTINCT to the query in order to have distinct values; false if it is not required
        path - Either the identification variable or the state field path expression
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • AvgFunctionStateObject

        public AvgFunctionStateObject​(StateObject parent,
                                      StateObject stateObject)
        Creates a new AvgFunctionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        stateObject - The StateObject representing the encapsulated expression
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • AvgFunctionStateObject

        public AvgFunctionStateObject​(StateObject parent,
                                      java.lang.String path)
        Creates a new AvgFunctionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        path - Either the identification variable or the state field path expression
        Throws:
        java.lang.NullPointerException - The given parent cannot be null