Class StatisticDefinition


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

      Constructors 
      Constructor Description
      StatisticDefinition​(java.lang.String fieldName, StatisticType statisticType)
      Creates a statistic definition based on a field name and statistic type.
      StatisticDefinition​(java.lang.String fieldName, StatisticType statisticType, java.lang.String outputAlias)
      Creates a statistic definition for given field name, statistic type and optional output alias name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFieldName()
      Gets the name of the field in the table containing values on which the statistic should be computed.
      java.lang.String getOutputAlias()
      Gets the alias name for this statistic in the results.
      StatisticType getStatisticType()
      Gets the statistic type.
      void setFieldName​(java.lang.String fieldName)
      Sets the name of the field in the table containing values on which the statistic should be computed.
      void setOutputAlias​(java.lang.String outputAlias)
      Sets the alias name for this statistic in the results.
      void setStatisticType​(StatisticType statisticType)
      Sets the statistic type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StatisticDefinition

        public StatisticDefinition​(java.lang.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:
        java.lang.IllegalArgumentException - if fieldName or statisticType is null
        Since:
        100.2.0
      • StatisticDefinition

        public StatisticDefinition​(java.lang.String fieldName,
                                   StatisticType statisticType,
                                   java.lang.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:
        java.lang.IllegalArgumentException - if fieldName or statisticType is null
        Since:
        100.2.0
    • Method Detail

      • getFieldName

        public java.lang.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​(java.lang.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:
        java.lang.IllegalArgumentException - if the value is null or an empty string
        Since:
        100.4.0
      • getOutputAlias

        public java.lang.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​(java.lang.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:
        java.lang.IllegalArgumentException - if statisticType is null
        Since:
        100.4.0