Package org.apache.ignite.internal.jdbc.thin

## Class JdbcThinUtils

- java.lang.Object
- - org.apache.ignite.internal.jdbc.thin.JdbcThinUtils

    public class JdbcThinUtils
    extends Object

Utility methods for thin JDBC driver.

### Field Summary

Fields
`static String` `PROP_HOST` Hostname property name.
`static String` `PROP_PORT` Port number property name.
`static String` `URL_PREFIX` URL prefix.

### Constructor Summary

Constructors
`JdbcThinUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static boolean` `isPlainJdbcType​(int type)`
`static boolean` `nullable​(String name, String cls)` Determines whether type is nullable.
`static @Nullable Boolean` `nullableBooleanFromByte​(byte raw)` Converts raw byte value to the nullable Boolean.
`static byte` `nullableBooleanToByte​(@Nullable Boolean val)` Converts nullable Boolean to the raw byte.
`static int` `type​(String cls)` Converts Java class name to type from `Types`.
`static String` `typeName​(String cls)` Converts Java class name to SQL type name.

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

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

### Field Detail

#### URL_PREFIX

    public static final String URL_PREFIX

URL prefix.

See Also:
  Constant Field Values

#### PROP_PORT

    public static final String PROP_PORT

Port number property name.

See Also:
  Constant Field Values

#### PROP_HOST

    public static final String PROP_HOST

Hostname property name.

See Also:
  Constant Field Values

### Constructor Detail

#### JdbcThinUtils

    public JdbcThinUtils()

### Method Detail

#### type

    public static int type​(String cls)

Converts Java class name to type from `Types`.

Parameters:
  `cls` - Java class name.
Returns:
  Type from `Types`.

#### typeName

    public static String typeName​(String cls)

Converts Java class name to SQL type name.

Parameters:
  `cls` - Java class name.
Returns:
  SQL type name.

#### isPlainJdbcType

    public static boolean isPlainJdbcType​(int type)

Parameters:
  `type` - a value from `java.sql.Types`.
Returns:
  `true` if type is plain and supported by thin JDBC driver.

#### nullable

    public static boolean nullable​(String name,
                                   String cls)

Determines whether type is nullable.

Parameters:
  `name` - Column name.
  `cls` - Java class name.
Returns:
  `True` if nullable.

#### nullableBooleanFromByte

    @Nullable
    public static @Nullable Boolean nullableBooleanFromByte​(byte raw)

Converts raw byte value to the nullable Boolean. Useful for the deserialization in the handshake.

Parameters:
  `raw` - byte value to convert to Boolean.
Returns:
  converted value.

#### nullableBooleanToByte

    public static byte nullableBooleanToByte​(@Nullable
                                             @Nullable Boolean val)

Converts nullable Boolean to the raw byte. Useful for the serialization in the handshake.

Parameters:
  `val` - value to convert.
Returns:
  byte representation.