Package io.jmix.data.persistence
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.
The main goal is to convert dates and UUID.
-
Method Summary
Modifier and TypeMethodDescriptiongetJavaObject
(ResultSet resultSet, int column) Convert a JDBC ResultSet column value to a value appropriate for an entity attribute.getSqlObject
(Object value) 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 aboutjmix.data.dbmsType
andjmix.data.dbmsVersion
this bean designed for.
-
Method Details
-
getJavaObject
Convert a JDBC ResultSet column value to a value appropriate for an entity attribute.- Parameters:
resultSet
- JDBC ResultSetcolumn
- ResultSet column number, starting from 1- Returns:
- corresponding value for an entity attribute
-
getSqlObject
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
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 aboutjmix.data.dbmsType
andjmix.data.dbmsVersion
this bean designed for. Version can be empty.
-