org.apache.ignite.internal.portable.api

## Class PortableTypeConfiguration

- java.lang.Object
- - org.apache.ignite.internal.portable.api.PortableTypeConfiguration

    public class PortableTypeConfiguration
    extends Object

Defines configuration properties for a specific portable type. Providing per-type configuration is optional, as it is generally enough, and also optional, to provide global portable configuration using `PortableMarshaller.setClassNames(Collection)`. However, this class allows you to change configuration properties for a specific portable type without affecting configuration for other portable types.

Per-type portable configuration can be specified in `PortableMarshaller.getTypeConfigurations()` method.

### Constructor Summary

Constructors
Constructor and Description
`PortableTypeConfiguration()`
`PortableTypeConfiguration(String clsName)`

### Method Summary

Methods
`String` `getAffinityKeyFieldName()` Gets affinity key field name.
`String` `getClassName()` Gets type name.
`PortableIdMapper` `getIdMapper()` Gets ID mapper.
`PortableSerializer` `getSerializer()` Gets serializer.
`Boolean` `isKeepDeserialized()` Defines whether `PortableObject` should cache deserialized instance.
`Boolean` `isMetaDataEnabled()` Defines whether meta data is collected for this type.
`Boolean` `isUseTimestamp()` If `true` then date values converted to `Timestamp` during unmarshalling.
`void` `setAffinityKeyFieldName(String affKeyFieldName)` Sets affinity key field name.
`void` `setClassName(String clsName)` Sets type name.
`void` `setIdMapper(PortableIdMapper idMapper)` Sets ID mapper.
`void` `setKeepDeserialized(Boolean keepDeserialized)`
`void` `setMetaDataEnabled(Boolean metaDataEnabled)`
`void` `setSerializer(PortableSerializer serializer)` Sets serializer.
`void` `setUseTimestamp(Boolean useTs)`
`String` `toString()`

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

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

### Constructor Detail

#### PortableTypeConfiguration

    public PortableTypeConfiguration()

#### PortableTypeConfiguration

    public PortableTypeConfiguration(String clsName)

Parameters:
  `clsName` - Class name.

### Method Detail

#### getClassName

    public String getClassName()

Gets type name.

Returns:
  Type name.

#### setClassName

    public void setClassName(String clsName)

Sets type name.

Parameters:
  `clsName` - Type name.

#### getIdMapper

    public PortableIdMapper getIdMapper()

Gets ID mapper.

Returns:
  ID mapper.

#### setIdMapper

    public void setIdMapper(PortableIdMapper idMapper)

Sets ID mapper.

Parameters:
  `idMapper` - ID mapper.

#### getSerializer

    public PortableSerializer getSerializer()

Gets serializer.

Returns:
  Serializer.

#### setSerializer

    public void setSerializer(PortableSerializer serializer)

Sets serializer.

Parameters:
  `serializer` - Serializer.

#### isUseTimestamp

    public Boolean isUseTimestamp()

If `true` then date values converted to `Timestamp` during unmarshalling.

Returns:
  Flag indicating whether date values converted to `Timestamp` during unmarshalling.

#### setUseTimestamp

    public void setUseTimestamp(Boolean useTs)

Parameters:
  `useTs` - Flag indicating whether date values converted to `Timestamp` during unmarshalling.

#### isMetaDataEnabled

    public Boolean isMetaDataEnabled()

Defines whether meta data is collected for this type. If provided, this value will override `PortableMarshaller.isMetaDataEnabled()` property.

Returns:
  Whether meta data is collected.

#### setMetaDataEnabled

    public void setMetaDataEnabled(Boolean metaDataEnabled)

Parameters:
  `metaDataEnabled` - Whether meta data is collected.

#### isKeepDeserialized

    public Boolean isKeepDeserialized()

Defines whether `PortableObject` should cache deserialized instance. If provided, this value will override `PortableMarshaller.isKeepDeserialized()` property.

Returns:
  Whether deserialized value is kept.

#### setKeepDeserialized

    public void setKeepDeserialized(Boolean keepDeserialized)

Parameters:
  `keepDeserialized` - Whether deserialized value is kept.

#### getAffinityKeyFieldName

    public String getAffinityKeyFieldName()

Gets affinity key field name.

Returns:
  Affinity key field name.

#### setAffinityKeyFieldName

    public void setAffinityKeyFieldName(String affKeyFieldName)

Sets affinity key field name.

Parameters:
  `affKeyFieldName` - Affinity key field name.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015