com.smartgwt.client.data

## Class SimpleType.SimpleTypeValueExtractor

- java.lang.Object
- - com.smartgwt.client.data.SimpleType.SimpleTypeValueExtractor

- Enclosing class:
    SimpleType

      public abstract static class SimpleType.SimpleTypeValueExtractor
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleType.SimpleTypeValueExtractor()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract java.lang.Object` | `getAtomicValue(java.lang.Object value)` Method to extract an atomic value (such as a string or number) from some arbitrary live data value.
    `java.lang.Object` | `getAtomicValue(java.lang.Object value, java.lang.String reason)` Method to extract an atomic value (such as a string or number) from some arbitrary live data value.

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

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

- - ### Constructor Detail

    - #### SimpleType.SimpleTypeValueExtractor

          public SimpleType.SimpleTypeValueExtractor()

  - ### Method Detail

    - #### getAtomicValue

          public abstract java.lang.Object getAtomicValue(java.lang.Object value)

      Method to extract an atomic value (such as a string or number) from some arbitrary live data value. 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:
        `value` - Raw data value to convert. Typically this would be a field value for some record.
      Returns:
        Atomic value. This should match the underlying atomic type specified by the `#inheritsFrom` attribute.

    - #### getAtomicValue

          public java.lang.Object getAtomicValue(java.lang.Object value,
                                        java.lang.String reason)

      Method to extract an atomic value (such as a string or number) from some arbitrary live data value. 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:
        `value` - Raw data value to convert. Typically this would be a field value for some record. Note, you only need to override this method if you have a need for the additional context provided by the "reason" attribute. The default implementation just ignores the reason and calls the single-param version of getAtomicValue().
        `value` - Raw data value to convert. Typically this would be a field value for some record.
        `reason` - A string passed by the framework to indicate why it is asking for the atomic value. Possible values are: "format", "edit", "filter", "sort", "group", "formula" and "hilite". Your method can use this value to affects the atoic value that is returned - for example, if the reason is "sort" you could return the atomic value converted to upper-case, to impose case-insensitive sorting
      Returns:
        Atomic value. This should match the underlying atomic type specified by the `#inheritsFrom` attribute.