org.apache.ignite.internal.sql.optimizer.affinity

## Class PartitionDataTypeUtils

- java.lang.Object
- - org.apache.ignite.internal.sql.optimizer.affinity.PartitionDataTypeUtils

    public class PartitionDataTypeUtils
    extends Object

Utility methods for partition extractor.

### Field Summary

Fields
`static Object` `CONVERTATION_FAILURE` Convertation failure marker.

### Method Summary

All Methods Static Methods Concrete Methods
`static Object` `convert(Object arg, PartitionParameterType targetType)` Convert argument to the given type.
`static Object` `stringToUUID(String s)` Utility method that helps to convert String to UUID.

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

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

### Field Detail

#### CONVERTATION_FAILURE

    public static final Object CONVERTATION_FAILURE

Convertation failure marker.

### Method Detail

#### convert

    public static Object convert(Object arg,
                                 PartitionParameterType targetType)

Convert argument to the given type.

Parameters:
  `arg` - Argument.
  `targetType` - Type.
Returns:
  Converted argument or `CONVERTATION_FAILURE` if convertation failed.

#### stringToUUID

    public static Object stringToUUID(String s)

Utility method that helps to convert String to UUID. Given method is more fault tolerant than more common `UUID.fromString()`. For example it supports String represendation of UUID-without-hyphens conversion, that is not supported by mentioned above `UUID.fromString()`.

Parameters:
  `s` - String to
Returns:
  UUID or `CONVERTATION_FAILURE` if convertation failed.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.1
Release Date | : May 21 2020