com.tibbo.aggregate.common.datatable.converter

## Class AbstractFormatConverter<T>

- java.lang.Object
- - com.tibbo.aggregate.common.datatable.converter.AbstractFormatConverter<T>

- All Implemented Interfaces:
    FormatConverter<T>
  Direct Known Subclasses:
    ChoicesConverter, DefaultFormatConverter, SimpleFormatConverter

      public abstract class AbstractFormatConverter<T>
      extends java.lang.Object
      implements FormatConverter<T>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.util.LinkedHashSet<java.lang.String>` | `FIELDS_TO_SKIP`
    `static java.lang.String` | `VF_IS_NULL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractFormatConverter(java.lang.Class valueClass)`
    `AbstractFormatConverter(java.lang.Class valueClass, TableFormat format)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addFiledToNullableFormat(TableFormat format, FieldFormat field)`
    `T` | `clone(T value, boolean useConversion)`
    `java.lang.Object` | `convertToTable(T value)`
    `FieldFormat` | `createFieldFormat(java.lang.String name)`
    `static TableFormat` | `deriveNullable(TableFormat format)` Adds null-value trigger to format.
    `TableFormat` | `getFormat()`
    `java.lang.Class<T>` | `getValueClass()`
    `T` | `instantiate(DataRecord source)`
    `static void` | `removeFiledFromNullableFormat(TableFormat format, java.lang.String fieldName)`
    `void` | `setValueClass(java.lang.Class<T> valueClass)`
    `protected static java.lang.Object` | `simpleToTable(java.lang.Object value, TableFormat format)`

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

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

    - ### Methods inherited from interface com.tibbo.aggregate.common.datatable.converter.FormatConverter

      `convertToBean, convertToTable`

- - ### Field Detail

    - #### VF_IS_NULL

          public static final java.lang.String VF_IS_NULL

      See Also:
        Constant Field Values

    - #### FIELDS_TO_SKIP

          public static final java.util.LinkedHashSet<java.lang.String> FIELDS_TO_SKIP

  - ### Constructor Detail

    - #### AbstractFormatConverter

          public AbstractFormatConverter(java.lang.Class valueClass,
                                         TableFormat format)

    - #### AbstractFormatConverter

          public AbstractFormatConverter(java.lang.Class valueClass)

  - ### Method Detail

    - #### deriveNullable

          public static TableFormat deriveNullable(TableFormat format)

      Adds null-value trigger to format. Must be called after adding all fields thus it adds a disable binding to all previous added fields
      Parameters:
        `format` - Format
      Returns:
        Format with null value trigger

    - #### addFiledToNullableFormat

          public static void addFiledToNullableFormat(TableFormat format,
                                                      FieldFormat field)

    - #### removeFiledFromNullableFormat

          public static void removeFiledFromNullableFormat(TableFormat format,
                                                           java.lang.String fieldName)

    - #### getValueClass

          public java.lang.Class<T> getValueClass()

      Specified by:
        `getValueClass` in interface `FormatConverter<T>`

    - #### setValueClass

          public void setValueClass(java.lang.Class<T> valueClass)

    - #### getFormat

          public TableFormat getFormat()

      Specified by:
        `getFormat` in interface `FormatConverter<T>`

    - #### createFieldFormat

          public FieldFormat createFieldFormat(java.lang.String name)

      Specified by:
        `createFieldFormat` in interface `FormatConverter<T>`

    - #### instantiate

          public T instantiate(DataRecord source)
                        throws java.lang.InstantiationException

      Specified by:
        `instantiate` in interface `FormatConverter<T>`
      Throws:
        `java.lang.InstantiationException`

    - #### clone

          public T clone(T value,
                         boolean useConversion)

      Specified by:
        `clone` in interface `FormatConverter<T>`

    - #### convertToTable

          public java.lang.Object convertToTable(T value)

      Specified by:
        `convertToTable` in interface `FormatConverter<T>`

    - #### simpleToTable

          protected static java.lang.Object simpleToTable(java.lang.Object value,
                                                          TableFormat format)