org.apache.ignite.internal.portable

## Class BinaryMetadata

- java.lang.Object
- - org.apache.ignite.internal.portable.BinaryMetadata

All Implemented Interfaces:
  Externalizable, Serializable

    public class BinaryMetadata
    extends Object
    implements Externalizable

Portable metadata which is passed over a wire.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`BinaryMetadata()` For `Externalizable`.
`BinaryMetadata(int typeId, String typeName, Map<String,Integer> fields, String affKeyFieldName, Collection<PortableSchema> schemas, boolean isEnum)` Constructor.

### Method Summary

Methods
`String` `affinityKeyFieldName()`
`Collection<String>` `fields()`
`Map<String,Integer>` `fieldsMap()`
`String` `fieldTypeName(String fieldName)`
`boolean` `isEnum()`
`void` `readExternal(ObjectInput in)`
`Collection<PortableSchema>` `schemas()`
`String` `toString()`
`int` `typeId()`
`String` `typeName()`
`BinaryTypeImpl` `wrap(PortableContext ctx)` Wrap metadata into binary type.
`void` `writeExternal(ObjectOutput out)`

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

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

### Constructor Detail

#### BinaryMetadata

    public BinaryMetadata()

For `Externalizable`.

#### BinaryMetadata

    public BinaryMetadata(int typeId,
                  String typeName,
                  @Nullable
                  Map<String,Integer> fields,
                  @Nullable
                  String affKeyFieldName,
                  @Nullable
                  Collection<PortableSchema> schemas,
                  boolean isEnum)

Constructor.

Parameters:
  `typeId` - Type ID.
  `typeName` - Type name.
  `fields` - Fields map.
  `affKeyFieldName` - Affinity key field name.
  `schemas` - Schemas.
  `isEnum` - Enum flag.

### Method Detail

#### typeId

    public int typeId()

Returns:
  Type ID.

#### typeName

    public String typeName()

Returns:
  Type name.

#### fields

    public Collection<String> fields()

Returns:
  Fields.

#### fieldsMap

    public Map<String,Integer> fieldsMap()

Returns:
  Fields.

#### fieldTypeName

    @Nullable
    public String fieldTypeName(String fieldName)

Parameters:
  `fieldName` - Field name.
Returns:
  Field type name.

#### affinityKeyFieldName

    @Nullable
    public String affinityKeyFieldName()

Returns:
  Affinity key field name.

#### schemas

    public Collection<PortableSchema> schemas()

Returns:
  Schemas.

#### isEnum

    public boolean isEnum()

Returns:
  `True` if this is enum type.

#### wrap

    public BinaryTypeImpl wrap(PortableContext ctx)

Wrap metadata into binary type.

Parameters:
  `ctx` - Portable context.
Returns:
  Binary type.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0-b1
Release Date | : December 1 2015