com.isomorphic.datasource

## Class SummaryFunctionType

- java.lang.Object
- - java.lang.Enum
  - - com.isomorphic.datasource.SummaryFunctionType

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable

      public class SummaryFunctionType
      extends java.lang.Enum

  Function to produce a summary value based on an array of records and a field definition. An example usage is the , where a row is shown at the bottom of the listGrid containing summary information about each column.

  SummaryFunctions may be specified in one of 2 ways:
  - as an explicit function that takes 3 parameters:
    - `records` an array of records
    - `field` the field definition for which the summary is required
  - As an predefined `SummaryFunctionType` type.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SummaryFunctionType` | `AVG` Iterates through the set of records, picking up all numeric values for the specified field and determining the mean value.
    `static SummaryFunctionType` | `CONCAT` Implemented as SQL CONCAT function.
    `static SummaryFunctionType` | `COUNT` Returns a numeric count of the total number of records passed in.
    `static SummaryFunctionType` | `FIRST` Currently behaves the same way as `SummaryFunctionType.MIN`.
    `static SummaryFunctionType` | `MAX` Iterates through the set of records, picking up all values for the specified field and finding the maximum value.
    `static SummaryFunctionType` | `MIN` Iterates through the set of records, picking up all values for the specified field and finding the minimum value.
    `static SummaryFunctionType` | `SUM` Iterates through the set of records, picking up and summing all numeric values for the specified field.

- - ### Field Detail

    - #### FIRST

          public static final SummaryFunctionType FIRST

      Currently behaves the same way as `SummaryFunctionType.MIN`.

    - #### SUM

          public static final SummaryFunctionType SUM

      Iterates through the set of records, picking up and summing all numeric values for the specified field. Returns null to indicate invalid summary value if any non numeric field values are encountered.

    - #### AVG

          public static final SummaryFunctionType AVG

      Iterates through the set of records, picking up all numeric values for the specified field and determining the mean value. Returns null to indicate invalid summary value if any non numeric field values are encountered.

    - #### MAX

          public static final SummaryFunctionType MAX

      Iterates through the set of records, picking up all values for the specified field and finding the maximum value. Handles numeric fields and date type fields only. Returns null to indicate invalid summary value if any non numeric/date field values are encountered.

    - #### MIN

          public static final SummaryFunctionType MIN

      Iterates through the set of records, picking up all values for the specified field and finding the minimum value. Handles numeric fields and date type fields only. Returns null to indicate invalid summary value if any non numeric field values are encountered.

    - #### COUNT

          public static final SummaryFunctionType COUNT

      Returns a numeric count of the total number of records passed in.

    - #### CONCAT

          public static final SummaryFunctionType CONCAT

      Implemented as SQL CONCAT function. Supported only by SQLDataSource with Oracle DB driver.