Package com.smartgwt.client.types

# Enum RecordSummaryFunctionType

java.lang.Object
java.lang.Enum<RecordSummaryFunctionType>
com.smartgwt.client.types.RecordSummaryFunctionType

All Implemented Interfaces:
  `ValueEnum`, `Serializable`, `Comparable<RecordSummaryFunctionType>`, `Constable`

public enum RecordSummaryFunctionType extends Enum<RecordSummaryFunctionType> implements ValueEnum
Function to produce a summary value based on field values within a record. Example usage is record-level summaries in `"summary" type ListGrid fields`.

Record summary functions may be specified in one of two ways:

- as an explicit function or executable `StringMethod`. Takes 3 parameters:
  `record` the record for which the value is being calculated
  `fields` Array of listGridFields from which summaries should be calculated
  `summaryField` pointer to the summary type field on which the summary function is being run.
- The identifier of such a function or string method, either built-in or registered via `DataSource.registerRecordSummaryFunction()`

`DataSource.registerRecordSummaryFunction()` may be used to expand the set of registered record summary functions.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `AVG`
  Iterates through each field, picking up the numeric field values from the record and calculating the mean value.
  `MAX`
  Iterates through each field, picking up the numeric field values from the record and calculating the maximum value.
  `MIN`
  Iterates through each field, picking up the numeric field values from the record and calculating the minimum value.
  `MULTIPLIER`
  Iterates through each field, picking up the numeric field values from the record and multiplying them together.
  `SUM`
  Iterates through each field, picking up the numeric field values from the record and summing them.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getValue()`
  `static RecordSummaryFunctionType`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static RecordSummaryFunctionType[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### SUM

    public static final RecordSummaryFunctionType SUM
    Iterates through each field, picking up the numeric field values from the record and summing them. This is the default if `ListGridField.recordSummaryFunction` is not specified and `ListGridField.getRecordSummary()` is not implemented.

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "sum".

  - ### AVG

    public static final RecordSummaryFunctionType AVG
    Iterates through each field, picking up the numeric field values from the record and calculating the mean value.

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "avg".

  - ### MAX

    public static final RecordSummaryFunctionType MAX
    Iterates through each field, picking up the numeric field values from the record and calculating the maximum value.

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "max".

  - ### MIN

    public static final RecordSummaryFunctionType MIN
    Iterates through each field, picking up the numeric field values from the record and calculating the minimum value.

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "min".

  - ### MULTIPLIER

    public static final RecordSummaryFunctionType MULTIPLIER
    Iterates through each field, picking up the numeric field values from the record and multiplying them together.

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "multiplier".

- ## Method Details

  - ### values

    public static RecordSummaryFunctionType[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static RecordSummaryFunctionType valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getValue

    public String getValue()
    Specified by:
      `getValue` in interface `ValueEnum`