ValueConverter

open class ValueConverter

Used by MappedProperty annotation and JoinMany annotation to indicate a value should be converted when getting value from ResultSet and setting a parameter in PreparedStatement.

All inheritors of this class must have a no arg constructor, which will be used by this library.

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
open fun fromDb(value: Any?): Any?

Convert value taken from ResultSet.getObject before passing it into a property setter / constructor parameter.

Link copied to clipboard
open fun toDb(jdbcObjectCreator: JdbcObjectCreator, value: Any?): Any?

Convert value from a property's getter before passing that value into PreparedStatement