Interface DbTypeConverter

All Known Implementing Classes:
HsqlDbTypeConverter, MysqlDbTypeConverter, OracleDbTypeConverter, PostgresqlDbTypeConverter, SqlServerDbTypeConverter

public interface DbTypeConverter
Interface defining methods to convert data between Java objects and JDBC params and results depending on the current DBMS type.
The main goal is to convert dates and UUID.
  • Method Summary

    Modifier and Type
    Method
    Description
    getJavaObject(ResultSet resultSet, int column)
    Convert a JDBC ResultSet column value to a value appropriate for an entity attribute.
    Convert an entity attribute value to a value appropriate for a JDBC parameter.
    int
    getSqlType(Class<?> javaClass)
    Get a JDBC type corresponding to an entity attribute type.
    Provides information about jmix.data.dbmsType and jmix.data.dbmsVersion this bean designed for.
  • Method Details

    • getJavaObject

      @Nullable Object getJavaObject(ResultSet resultSet, int column)
      Convert a JDBC ResultSet column value to a value appropriate for an entity attribute.
      Parameters:
      resultSet - JDBC ResultSet
      column - ResultSet column number, starting from 1
      Returns:
      corresponding value for an entity attribute
    • getSqlObject

      Object getSqlObject(Object value)
      Convert an entity attribute value to a value appropriate for a JDBC parameter.
      Parameters:
      value - an entity attribute value
      Returns:
      corresponding value for a JDBC parameter
    • getSqlType

      int getSqlType(Class<?> javaClass)
      Get a JDBC type corresponding to an entity attribute type.
      Parameters:
      javaClass - entity attribute type
      Returns:
      corresponding JDBC type
      See Also:
    • getTypeAndVersion

      String getTypeAndVersion()
      Provides information about jmix.data.dbmsType and jmix.data.dbmsVersion this bean designed for. Version can be empty.