Class StatisticDefinition


  • public final class StatisticDefinition
    extends Object
    Defines a statistic type and field to be used for statistics query in the FeatureTable.
    Since:
    100.2.0
    • Constructor Detail

      • StatisticDefinition

        public StatisticDefinition​(String fieldName,
                                   StatisticType statisticType)
        Creates a statistic definition based on a field name and statistic type.
        Parameters:
        fieldName - the name of the field in the table containing values for the statistic
        statisticType - the statistic type to calculate
        Throws:
        IllegalArgumentException - if fieldName or statisticType is null
        Since:
        100.2.0
      • StatisticDefinition

        public StatisticDefinition​(String fieldName,
                                   StatisticType statisticType,
                                   String outputAlias)
        Creates a statistic definition for given field name, statistic type and optional output alias name.
        Parameters:
        fieldName - the name of the field in the table containing values for the statistic
        statisticType - the statistic type to calculate
        outputAlias - the optional name for the statistic in the results, can be null. If it is null, the output alias will be composed as Type+"_"+fieldName
        Throws:
        IllegalArgumentException - if fieldName or statisticType is null
        Since:
        100.2.0
    • Method Detail

      • getFieldName

        public String getFieldName()
        Gets the name of the field in the table containing values on which the statistic should be computed.
        Returns:
        the field name
        Since:
        100.2.0
      • setFieldName

        public void setFieldName​(String fieldName)
        Sets the name of the field in the table containing values on which the statistic should be computed.
        Parameters:
        fieldName - the name of the field
        Throws:
        IllegalArgumentException - if the value is null or an empty string
        Since:
        100.4.0
      • getOutputAlias

        public String getOutputAlias()
        Gets the alias name for this statistic in the results.
        If an output alias is not specified, a default name that identifies the statistic type and input field name will be used for the result.
        Returns:
        the output alias
        Since:
        100.2.0
      • setOutputAlias

        public void setOutputAlias​(String outputAlias)
        Sets the alias name for this statistic in the results.
        If an output alias is not specified, a default name that identifies the statistic type and input field name will be used for the result.
        Parameters:
        outputAlias - the output alias
        Since:
        100.4.0
      • getStatisticType

        public StatisticType getStatisticType()
        Gets the statistic type.
        Returns:
        the statistic type
        Since:
        100.2.0
      • setStatisticType

        public void setStatisticType​(StatisticType statisticType)
        Sets the statistic type.
        Parameters:
        statisticType - the statistic type
        Throws:
        IllegalArgumentException - if statisticType is null
        Since:
        100.4.0