com.smartgwt.client.data

## Class SimpleType

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.data.SimpleType

-     public class SimpleType
      extends BaseClass

  An atomic type such as a string or number, that is generally stored, displayed and manipulated as a single value.

  SimpleTypes can be created at any time, and subsequently referred to as a `field type` in `DataSources` and `DataBoundComponents`. This allows you to define `validation`, `formatting` and `editing` behaviors for a type to be reused across all `DataBoundComponents`.

  The SimpleType class also allows data to be stored in some opaque format but treated as simple atomic values as far as Smart GWT components are concerned by implementing `SimpleType.getAtomicValue` and `SimpleType.updateAtomicValue` methods. For example, if some record has a field value set to a javascript object with the following properties:

        { stringValue:"A String", length: 9 }

  this value could be treated as a simple string by defining a SimpleType with `inheritsFrom` set to `"text"` and a custom `getAtomicValue()` method that simply extracted the "stringValue" attribute from the data object. DataBoundComponents would then display the string value, and use it for sorting and other standard databinding features.

  Note that the term "simpleType" is used in the same sense as in http://www.w3.org/TR/xmlschema-0/, and `XMLTools.loadXMLSchema` will create new SimpleType definitions.

  When using the Smart GWT Server, SimpleTypes can be defined server-side, and should be defined server-side if validators are going to be declared so that the server will enforce validation. To define server-side SimpleTypes using Component XML you should create file {typeName}.type.xml in the following format:

          <SimpleType name="{typeName}" inheritsFrom="{otherSimpleType}"
                         editorType="{FormItemClassName}">
            <validators>
              <!-- validator definition just like DataSourceField -->
            </validators>
          </SimpleType>

  .. and place this file alongside your DataSource files (.ds.xml) files - in any of folders listed in `project.datasources` property in `server.properties`.

  SimpleTypes can be loaded via DataSourceLoader or `loadDS JSP tags` and should be loaded before the definitions of any DataSources that use them (so generally put all SimpleType definitions first).

  Define validators in the server-side type definition, for example:

          <SimpleType name="countryCodeType" inheritsFrom="text">
            <validators>
              <validator type="lengthRange" min="2" max="2"
                errorMessage="Length of country code should be equals to 2." />
              <validator type="regexp" expression="[A-Z][A-Z]"
                errorMessage="CountryCode should have only uppercase letters." />
            </validators>
          </SimpleType>

  For client-side formatters, add these to the type definition after loading it from the server, for example:

            SimpleType.getType("independenceDateType").setShortDisplayFormatter(new SimpleTypeFormatter() {
              public String format(Object value, DataClass field, DataBoundComponent component, Record record) {
                if (value == null) return null;
                return "<i>" + (((java.util.Date) value).getYear() + 1900) + "</i>";
              }
            });

  Note that formatters must be added to the SimpleType definition before any DataBoundComponent binds to a DataSource that uses the SimpleType.

  An @see example is here.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SimpleType.SimpleTypeValueExtractor`
    `static class` | `SimpleType.SimpleTypeValueUpdater`

  - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.BaseClass

      `config, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleType()` Create a new simple type.
    `SimpleType(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `SimpleType(java.lang.String name, FieldType inheritsFrom)` Create a new simple type.
    `SimpleType(java.lang.String name, SimpleType inheritsFrom)` Create a new simple type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.Object` | `applySummaryFunction(Record[] records, ListGridField field, java.lang.String functionName)` Apply a registered summary function to a set of records and a field.
    `static java.lang.Object` | `applySummaryFunction(Record[] records, ListGridField field, SummaryFunctionType summaryFunction)` Apply a standard `SummaryFunctionType` to a set of records and a field.
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `DataSourceField` | `getFieldProperties()` These are properties that are essentially copied onto any DataSourceField where the property is applied.
    `java.lang.String` | `getInheritsFrom()` Name of another SimpleType from which this type should inherit.
    `com.google.gwt.core.client.JavaScriptObject` | `getJsObj()`
    `java.lang.String` | `getName()` Name of the type, used to refer to the type from `field.type`.
    `static SimpleType` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `static SimpleType` | `getType(java.lang.String typeName)` Retrieve a simpleType definition by type name
    `boolean` | `isCreated()`
    `void` | `register()` Explicitly register this SimpleType with the system so that it can be used / referenced by remote DataSources.
    `static void` | `registerSummaryFunction(java.lang.String functionName, SummaryFunction summaryFunction)` Registers a new SummaryFunction by name.
    `static void` | `setDefaultSummaryFunction(java.lang.String typeName, java.lang.String functionName)` Set a default summary function for some field type.
    `static void` | `setDefaultSummaryFunction(java.lang.String typeName, SummaryFunctionType summaryFunction)` Set a default summary function for some field type.
    `void` | `setEditFormatter(SimpleTypeFormatter formatter)` Formatter for values of this type when displayed in a freeform text editor such as a `TextItem`
    `void` | `setEditorProperties(FormItem editorProperties)` Default `FormItem` configuration for editing values of this type.
    `void` | `setEditorType(java.lang.Class<? extends FormItem> editorType)` Set the default `FormItem` class to be used whenever a value of this type is edited (whether in a grid, form, or other component).
    `void` | `setEditorType(FormItem editorType)` Deprecated. Renamed to `setEditorProperties(FormItem)`. You can also consider using `setEditorType(Class)` or `setEditorType(String)` instead.
    `void` | `setEditorType(java.lang.String editorType)` Set the default `FormItem` class to be used whenever a value of this type is edited (whether in a grid, form, or other component).
    `java.lang.Object` | `setEditParser(SimpleTypeParser parser)` Specify a parser to convert some user-edited value to an underlying data value of this type.
    `void` | `setFieldProperties(DataSourceField fieldProperties)` These are properties that are essentially copied onto any DataSourceField where the property is applied.
    `void` | `setInheritsFrom(FieldType inheritsFrom)` Name of another SimpleType from which this type should inherit.
    `void` | `setInheritsFrom(java.lang.String inheritsFrom)` Name of another SimpleType from which this type should inherit.
    `void` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `void` | `setName(java.lang.String name)` Name of the type, used to refer to the type from `field.type`.
    `void` | `setNormalDisplayFormatter(SimpleTypeFormatter formatter)` Normal formatter for values of this type used in a `StaticTextItem` or `DetailViewer`.
    `void` | `setReadOnlyEditorProperties(FormItem editorProperties)` FormItem properties to be applied when editing values of this type in a read-only context.
    `void` | `setReadOnlyEditorType(java.lang.Class<? extends FormItem> editorType)` Set the default `FormItem` class to be used whenever a value of this type is edited in a read-only context (whether in a grid, form, or other component).
    `void` | `setReadOnlyEditorType(FormItem editorType)` Deprecated. Renamed to `setReadOnlyEditorProperties(FormItem)`. You can also consider using `setReadOnlyEditorType(Class)` or `setReadOnlyEditorType(String)` instead.
    `void` | `setReadOnlyEditorType(java.lang.String editorType)` Set the default `FormItem` class to be used whenever a value of this type is edited in a read-only context (whether in a grid, form, or other component).
    `void` | `setShortDisplayFormatter(SimpleTypeFormatter formatter)` Formatter for values of this type when compact display is required, for example, in a `ListGrid` or `TreeGrid`.
    `java.lang.Object` | `setSimpleTypeValueExtractor(SimpleType.SimpleTypeValueExtractor extractor)` Specify an extractor to extract an atomic value (such as a string or number) from some arbitrary live data value.
    `java.lang.Object` | `setSimpleTypeValueUpdater(SimpleType.SimpleTypeValueUpdater updater)` Specify an updater to update a live data value with an edited atomic value (such as a string or number).
    `void` | `setValidators(Validator... validators)` Validators to apply to value of this type.
    `void` | `setValidOperators(OperatorId... operators)` Set of search operators valid for this type.
    `void` | `setValueMap(java.util.Map valueMap)` List of legal values for this type, like `valueMap`.
    `void` | `setValueMap(java.lang.String... valueMap)` List of legal values for this type, like `valueMap`.

    - ### Methods inherited from class com.smartgwt.client.core.BaseClass

      `asSGWTComponent, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getOrCreateJsObj, getRef, getScClassName, internalSetID, internalSetID, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setID, setProperty, setProperty, setProperty, setProperty, setScClassName`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleType

          public SimpleType(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### SimpleType

          public SimpleType()

      Create a new simple type.
      Parameters:
        `name` - the name of the simple type
        `inheritsFrom` - the type it inherits from

    - #### SimpleType

          public SimpleType(java.lang.String name,
                    FieldType inheritsFrom)

      Create a new simple type.
      Parameters:
        `name` - the name of the simple type
        `inheritsFrom` - the type it inherits from

    - #### SimpleType

          public SimpleType(java.lang.String name,
                    SimpleType inheritsFrom)

      Create a new simple type.
      Parameters:
        `name` - the name of the simple type
        `inheritsFrom` - the type it inherits from

  - ### Method Detail

    - #### getOrCreateRef

          public static SimpleType getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setJavaScriptObject

          public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### create

          public com.google.gwt.core.client.JavaScriptObject create()

      Specified by:
        `create` in class `BaseClass`

    - #### setFieldProperties

          public void setFieldProperties(DataSourceField fieldProperties)
                                  throws java.lang.IllegalStateException

      These are properties that are essentially copied onto any DataSourceField where the property is applied. The supported properties are only client-side properties.
      Parameters:
        `fieldProperties` - fieldProperties Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getFieldProperties

          public DataSourceField getFieldProperties()

      These are properties that are essentially copied onto any DataSourceField where the property is applied. The supported properties are only client-side properties.
      Returns:
        DataSourceField

    - #### setInheritsFrom

          public void setInheritsFrom(java.lang.String inheritsFrom)
                               throws java.lang.IllegalStateException

      Name of another SimpleType from which this type should inherit.

      Validators, if any, will be combined. All other SimpleType properties default to the inherited type's value.

      Parameters:
        `inheritsFrom` - . See `String`. Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created
      See Also:
        DataType Reuse Example

    - #### getInheritsFrom

          public java.lang.String getInheritsFrom()

      Name of another SimpleType from which this type should inherit.

      Validators, if any, will be combined. All other SimpleType properties default to the inherited type's value.

      Returns:
        . See `String`
      See Also:
        DataType Reuse Example

    - #### setName

          public void setName(java.lang.String name)
                       throws java.lang.IllegalStateException

      Name of the type, used to refer to the type from `field.type`.
      Parameters:
        `name` - . See `String`. Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getName

          public java.lang.String getName()

      Name of the type, used to refer to the type from `field.type`.
      Returns:
        . See `String`

    - #### getType

          public static SimpleType getType(java.lang.String typeName)

      Retrieve a simpleType definition by type name
      Parameters:
        `typeName` - the `name` of the simpleType to return
      Returns:
        simple type object

    - #### register

          public void register()

      Explicitly register this SimpleType with the system so that it can be used / referenced by remote DataSources.

    - #### setValidators

          public void setValidators(Validator... validators)
                             throws java.lang.IllegalStateException

      Validators to apply to value of this type.
      Parameters:
        `validators` - validators Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setValueMap

          public void setValueMap(java.lang.String... valueMap)
                           throws java.lang.IllegalStateException

      List of legal values for this type, like `valueMap`.
      Parameters:
        `valueMap` - valueMap Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setValueMap

          public void setValueMap(java.util.Map valueMap)
                           throws java.lang.IllegalStateException

      List of legal values for this type, like `valueMap`.
      Parameters:
        `valueMap` - valueMap Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setEditorProperties

          public void setEditorProperties(FormItem editorProperties)
                                   throws java.lang.IllegalStateException

      Default `FormItem` configuration for editing values of this type.

      You can create a simple custom FormItem by adding default `icons` that launch custom value picking dialogs (an example is in the QuickStart Guide, Chapter 9, Extending Smart GWT). By setting simpleType.editorProperties to an instance of your custom FormItem, forms will automatically use the custom FormItem, as will grids performing `grid editing`.

      Note: When you supply a custom FormItem via setEditorProperties(), you're really providing properties which are then used to create multiple FormItems (eg, in grids, forms and trees) and there's an underlying limitation here where event handlers have to be written to dynamically receive the actual FormItem rather than relying on "this" (because there's more than one "this"). This means you need to follow the special rules indicated for `DataSourceField.setEditorProperties(FormItem)`. As an alternative, you can use `setEditorType(String)` or `setEditorType(Class)` to avoid these limitations, if you register the FormItem subclass with the `reflection mechanism`.

      Parameters:
        `editorProperties` - FormItem with default properties to use when editing
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setEditorType

          public void setEditorType(FormItem editorType)
                             throws java.lang.IllegalStateException

      Deprecated. Renamed to `setEditorProperties(FormItem)`. You can also consider using `setEditorType(Class)` or `setEditorType(String)` instead.
      Synonym for `setEditorProperties(FormItem)`.
      Parameters:
        `editorType` - FormItem with default properties to be applied when editing
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setEditorType

          public void setEditorType(java.lang.String editorType)

      Set the default `FormItem` class to be used whenever a value of this type is edited (whether in a grid, form, or other component).

      If unset, a FormItem will be automatically chosen.

      Note: The editorType must be registered for use with the `reflection mechanism`. By doing so, you avoid the limitations of `setEditorProperties(FormItem)`.

      Parameters:
        `editorType` - the fully-qualified class name of a `FormItem` subclass, which must have been registered with the `reflection mechanism`.
      Throws:
        `java.lang.IllegalArgumentException` - if the editorType class has not beeen registered for use with the `reflection mechanism`, or if it does not inherit from `FormItem`.

    - #### setEditorType

          public void setEditorType(java.lang.Class<? extends FormItem> editorType)

      Set the default `FormItem` class to be used whenever a value of this type is edited (whether in a grid, form, or other component).

      If unset, a FormItem will be automatically chosen.

      Note: The editorType must be registered for use with the `reflection mechanism`. By doing so, you avoid the limitations of `setEditorProperties(FormItem)`.

      Parameters:
        `editorType` - a `FormItem` subclass, which must have been registered with the `reflection mechanism`.
      Throws:
        `java.lang.IllegalArgumentException` - if the editorType class has not beeen registered for use with the `reflection mechanism`, or if it does not inherit from `FormItem`.

    - #### setReadOnlyEditorProperties

          public void setReadOnlyEditorProperties(FormItem editorProperties)
                                           throws java.lang.IllegalStateException

      FormItem properties to be applied when editing values of this type in a read-only context.

      Note: The FormItem passed to setReadOnlyEditorProperties() is used as a "template" to create a FormItem whenever a `DataBoundComponent` needs to show an interface for editing this field (and the field is marked read-only). This means you need to follow special rules indicated for `DataSourceField.setEditorProperties(FormItem)`. As an alternative, you can use `setReadOnlyEditorType(String)` or `setReadOnlyEditorType(Class)` to avoid these limitations, if you register the FormItem subclass with the `reflection mechanism`.

      Parameters:
        `editorProperties` - FormItem with properties to be applied when editing values of this type in a read-only context.
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setReadOnlyEditorType

          public void setReadOnlyEditorType(FormItem editorType)

      Deprecated. Renamed to `setReadOnlyEditorProperties(FormItem)`. You can also consider using `setReadOnlyEditorType(Class)` or `setReadOnlyEditorType(String)` instead.
      Synonym for `setReadOnlyEditorProperties(FormItem)`.
      Parameters:
        `editorType` - FormItem with default properties to be applied when editing

    - #### setReadOnlyEditorType

          public void setReadOnlyEditorType(java.lang.String editorType)

      Set the default `FormItem` class to be used whenever a value of this type is edited in a read-only context (whether in a grid, form, or other component).

      If unset, a FormItem will be automatically chosen.

      By using the `reflection mechanism`, this method avoids the limitations described in `setReadOnlyEditorProperties(FormItem)`.

      Parameters:
        `editorType` - the fully-qualified class name of a `FormItem` subclass, which must have been registered with the `reflection mechanism`.
      Throws:
        `java.lang.IllegalArgumentException` - if the editorType class has not beeen registered for use with the `reflection mechanism`, or if it does not inherit from `FormItem`.

    - #### setReadOnlyEditorType

          public void setReadOnlyEditorType(java.lang.Class<? extends FormItem> editorType)

      Set the default `FormItem` class to be used whenever a value of this type is edited in a read-only context (whether in a grid, form, or other component).

      If unset, a FormItem will be automatically chosen.

      By using the `reflection mechanism`, this method avoids the limitations described in `setReadOnlyEditorProperties(FormItem)`.

      Parameters:
        `editorType` - a `FormItem` subclass, which must have been registered with the `reflection mechanism`.
      Throws:
        `java.lang.IllegalArgumentException` - if the editorType class has not beeen registered for use with the `reflection mechanism`, or if it does not inherit from `FormItem`.

    - #### setValidOperators

          public void setValidOperators(OperatorId... operators)
                                 throws java.lang.IllegalStateException

      Set of search operators valid for this type.

      If not specified, the `inheritsFrom` type's operators will be used, finally defaulting to the default operators for the basic types (eg integer).

      Parameters:
        `operators` - validOperators Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setInheritsFrom

          public void setInheritsFrom(FieldType inheritsFrom)
                               throws java.lang.IllegalStateException

      Name of another SimpleType from which this type should inherit.

      Validators, if any, will be combined. All other SimpleType properties default to the inherited type's value.

      Parameters:
        `inheritsFrom` - inheritsFrom Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setNormalDisplayFormatter

          public void setNormalDisplayFormatter(SimpleTypeFormatter formatter)

      Normal formatter for values of this type used in a `StaticTextItem` or `DetailViewer`.

      A formatter can make itself configurable on a per-component or per-field basis by checking properties on the component or field. For example, a formatter for account IDs may want to omit a prefix in views where it is redundant, and could check a flag detailViewer.omitAccountIdPrefix for this purpose.

      Parameters:
        `formatter` - the formatter

    - #### setShortDisplayFormatter

          public void setShortDisplayFormatter(SimpleTypeFormatter formatter)

      Formatter for values of this type when compact display is required, for example, in a `ListGrid` or `TreeGrid`.

      A formatter can make itself configurable on a per-component or per-field basis by checking properties on the component or field. For example, a formatter for account IDs may want to omit a prefix in views where it is redundant, and could check a flag listGridField.omitAccountIdPrefix for this purpose.

      Parameters:
        `formatter` - the formatter

    - #### setEditFormatter

          public void setEditFormatter(SimpleTypeFormatter formatter)

      Formatter for values of this type when displayed in a freeform text editor such as a `TextItem`

      See also `#parseInput` for parsing an edited text value back to a data value.

      Parameters:
        `formatter` - the formatter

    - #### setEditParser

          public java.lang.Object setEditParser(SimpleTypeParser parser)

      Specify a parser to convert some user-edited value to an underlying data value of this type. This parser is called when storing out values edited in a freeform editor such as a `TextItem`. Typically this will convert from the format produced by `#editFormatter` back to a data value.
      Parameters:
        `parser` - the parser

    - #### setSimpleTypeValueExtractor

          public java.lang.Object setSimpleTypeValueExtractor(SimpleType.SimpleTypeValueExtractor extractor)

      Specify an extractor to extract an atomic value (such as a string or number) from some arbitrary live data value. If defined this method will be called for every field value of the specified type in order to convert from the raw data value to an atomic type to be used for standard DataBinding features such as sorting and editing.
      Parameters:
        `extractor` - the extractor

    - #### setSimpleTypeValueUpdater

          public java.lang.Object setSimpleTypeValueUpdater(SimpleType.SimpleTypeValueUpdater updater)

      Specify an updater to update a live data value with an edited atomic value (such as a string or number). If defined this updater's updateAtomicValue method will be called when the user edits data in a field of this type, allowing the developer to convert from the atomic type to a raw data value for storage.
      Parameters:
        `extractor` - the updater

    - #### isCreated

          public boolean isCreated()

      Overrides:
        `isCreated` in class `BaseClass`

    - #### getJsObj

          public com.google.gwt.core.client.JavaScriptObject getJsObj()

      Overrides:
        `getJsObj` in class `BaseClass`

    - #### registerSummaryFunction

          public static void registerSummaryFunction(java.lang.String functionName,
                                     SummaryFunction summaryFunction)

      Registers a new SummaryFunction by name. After calling this method, developers may specify the name passed in as a standard summaryFunction (for example in ListGridField.setSummaryFunction()). Note that if the specified name conflicts with one of the built in SummaryFunctionType values, a RuntimeException will be thrown.
      Parameters:
        `functionName` - name for the SummaryFunction
        `summaryFunction` - new SummaryFunction implementation

    - #### applySummaryFunction

          public static java.lang.Object applySummaryFunction(Record[] records,
                                              ListGridField field,
                                              SummaryFunctionType summaryFunction)

      Apply a standard `SummaryFunctionType` to a set of records and a field.
      Parameters:
        `records` - records to obtain the summary value for
        `field` - field on which the summary function is being run
        `summaryFunction` - standard summary function identifier
      Returns:
        result of the summary function.

    - #### applySummaryFunction

          public static java.lang.Object applySummaryFunction(Record[] records,
                                              ListGridField field,
                                              java.lang.String functionName)

      Apply a registered summary function to a set of records and a field.
      Parameters:
        `records` - records to obtain the summary value for
        `field` - field on which the summary function is being run
        `functionName` - name under which the summary function is registered. See {@link #registerSummaryFunction(String, SummaryFunction)
      Returns:
        result of the summary function.

    - #### setDefaultSummaryFunction

          public static void setDefaultSummaryFunction(java.lang.String typeName,
                                       SummaryFunctionType summaryFunction)

      Set a default summary function for some field type.
      Parameters:
        `typeName` - name of the field type. If this is the name of a custom SimpleType, the developer may need to ensure the type is `#register(),registered`.
        `summaryFunction` - standard summary function type for this data type

    - #### setDefaultSummaryFunction

          public static void setDefaultSummaryFunction(java.lang.String typeName,
                                       java.lang.String functionName)

      Set a default summary function for some field type.
      Parameters:
        `typeName` - name of the field type. If this is the name of a custom SimpleType, the developer may need to ensure the type is `#register(),registered`.
        `summaryFunction` - name under whithc the summary function is registered. See `registerSummaryFunction(String, SummaryFunction)`