Package org.apache.ignite.binary

## Interface BinaryType

-     public interface BinaryType

  Binary type meta data. Metadata for binary types can be accessed from any of the `IgniteBinary.type(String)` methods. Having metadata also allows for proper formatting of `BinaryObject#toString()` method, even when binary objects are kept in binary format only, which may be necessary for audit reasons.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `affinityKeyFieldName()` | Binary objects can optionally specify custom key-affinity mapping in the configuration.
    `Collection<BinaryObject>` | `enumValues()` |
    `BinaryField` | `field​(String fieldName)` | Get `BinaryField` for the given field name.
    `Collection<String>` | `fieldNames()` | Gets collection of all field names for this binary type.
    `String` | `fieldTypeName​(String fieldName)` | Gets name of the field type for a given field.
    `boolean` | `isEnum()` | Check whether type represents enum or not.
    `int` | `typeId()` | Gets binary type ID.
    `String` | `typeName()` | Gets binary type name.

- - ### Method Detail

    - #### typeName

          String typeName()

      Gets binary type name.
      Returns:
        Binary type name.

    - #### typeId

          int typeId()

      Gets binary type ID.
      Returns:
        Binary type ID.

    - #### fieldNames

          Collection<String> fieldNames()

      Gets collection of all field names for this binary type.
      Returns:
        Collection of all field names for this binary type.

    - #### fieldTypeName

          String fieldTypeName​(String fieldName)

      Gets name of the field type for a given field.
      Parameters:
        `fieldName` - Field name.
      Returns:
        Field type name.

    - #### field

          BinaryField field​(String fieldName)

      Get `BinaryField` for the given field name. Later this field can be used for fast field's value retrieval from concrete `BinaryObject`.
      Parameters:
        `fieldName` - Field name.
      Returns:
        Binary field.

    - #### affinityKeyFieldName

          String affinityKeyFieldName()

      Binary objects can optionally specify custom key-affinity mapping in the configuration. This method returns the name of the field which should be used for the key-affinity mapping.
      Returns:
        Affinity key field name.

    - #### isEnum

          boolean isEnum()

      Check whether type represents enum or not.
      Returns:
        `True` if type is enum.

    - #### enumValues

          Collection<BinaryObject> enumValues()

      Returns:
        Collection of enum values.