org.apache.ignite.internal.binary

## Class BinaryTypeProxy

- java.lang.Object
- - org.apache.ignite.internal.binary.BinaryTypeProxy

All Implemented Interfaces:
  BinaryType

    public class BinaryTypeProxy
    extends Object
    implements BinaryType

Binary type proxy. Is used to delay or completely avoid metadata lookup.

### Constructor Summary

Constructors
Constructor and Description
`BinaryTypeProxy(BinaryContext ctx, int typeId, String clsName)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`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.
`String` `toString()`
`int` `typeId()` Gets binary type ID.
`String` `typeName()` Gets binary type name.

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

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

### Constructor Detail

#### BinaryTypeProxy

    public BinaryTypeProxy(BinaryContext ctx,
                           int typeId,
                           @Nullable
                           String clsName)

Constructor.

Parameters:
  `ctx` - Context.
  `typeId` - Type ID.
  `clsName` - Class name.

### Method Detail

#### typeId

    public int typeId()

Gets binary type ID.

Specified by:
  `typeId` in interface `BinaryType`
Returns:
  Binary type ID.

#### field

    public 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`.

Specified by:
  `field` in interface `BinaryType`
Parameters:
  `fieldName` - Field name.
Returns:
  Binary field.

#### typeName

    public String typeName()

Gets binary type name.

Specified by:
  `typeName` in interface `BinaryType`
Returns:
  Binary type name.

#### fieldNames

    public Collection<String> fieldNames()

Gets collection of all field names for this binary type.

Specified by:
  `fieldNames` in interface `BinaryType`
Returns:
  Collection of all field names for this binary type.

#### fieldTypeName

    public String fieldTypeName(String fieldName)

Gets name of the field type for a given field.

Specified by:
  `fieldTypeName` in interface `BinaryType`
Parameters:
  `fieldName` - Field name.
Returns:
  Field type name.

#### affinityKeyFieldName

    public 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.

Specified by:
  `affinityKeyFieldName` in interface `BinaryType`
Returns:
  Affinity key field name.

#### isEnum

    public boolean isEnum()

Check whether type represents enum or not.

Specified by:
  `isEnum` in interface `BinaryType`
Returns:
  `True` if type is enum.

#### enumValues

    public Collection<BinaryObject> enumValues()

Specified by:
  `enumValues` in interface `BinaryType`
Returns:
  Collection of enum values.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018