com.holonplatform.datastore.jdbc.composer

## Interface SQLTypeConverter

-     public interface SQLTypeConverter

  Converter to perform SQL type to Java type conversions and back.

  The `Void` class should be used to represent a `null` type.

  Since:
    5.1.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SQLTypeConverter` | `getDefault()` Get the default `SQLTypeConverter`.
    `Optional<Class<?>>` | `getJavaType(SQLContext context, SQLType sqlType)` Get the Java type which corresponds to given SQL type.
    `Optional<SQLType>` | `getSqlType(SQLContext context, Class<?> javaType)` Get the SQL type which corresponds to given Java type.

- - ### Method Detail

    - #### getJavaType

          Optional<Class<?>> getJavaType(SQLContext context,
                                         SQLType sqlType)

      Get the Java type which corresponds to given SQL type.
      Parameters:
        `context` - SQL context
        `sqlType` - The sql type (not null)
      Returns:
        Optional Java type, empty if it cannot be resolved

    - #### getSqlType

          Optional<SQLType> getSqlType(SQLContext context,
                                       Class<?> javaType)

      Get the SQL type which corresponds to given Java type.
      Parameters:
        `context` - SQL context
        `javaType` - The sql type (not null)
      Returns:
        Optional SQL type, empty if it cannot be resolved

    - #### getDefault

          static SQLTypeConverter getDefault()

      Get the default `SQLTypeConverter`.
      Returns:
        the default `SQLTypeConverter`

Copyright © 2019 The Holon Platform. All rights reserved.