com.smartgwt.client.types
Enum RecordSummaryFunctionType

java.lang.Object
  extended by java.lang.Enum<RecordSummaryFunctionType>
      extended by com.smartgwt.client.types.RecordSummaryFunctionType
All Implemented Interfaces:
ValueEnum, java.io.Serializable, java.lang.Comparable<RecordSummaryFunctionType>

public enum RecordSummaryFunctionType
extends java.lang.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.

SummaryFunctions may be specified in one of 2 ways:

Note that DataSource.registerRecordSummaryFunction may be used to expand the set of registered RecordSummaryFunctions.


Enum Constant Summary
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
 java.lang.String getValue()
           
static RecordSummaryFunctionType valueOf(java.lang.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, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SUM

public static final RecordSummaryFunctionType SUM
Iterates through each field, picking up the numeric field values from the record and summing them.


AVG

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


MAX

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


MIN

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


MULTIPLIER

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

Method Detail

values

public static RecordSummaryFunctionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RecordSummaryFunctionType c : RecordSummaryFunctionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RecordSummaryFunctionType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getValue

public java.lang.String getValue()
Specified by:
getValue in interface ValueEnum