Package org.jdbi.v3.core.codec
Interface Codec<T>
A Codec provides a convenient way for a bidirectional mapping of an attribute to a database column.
 
 Groups a ColumnMapper and an Argument mapping function for a given type.
 
Codec instances can replace existing Mapper and Argument pairs.
- 
Method Summary
Modifier and TypeMethodDescriptiongetArgumentFunction(ConfigRegistry configRegistry) default ColumnMapper<T> Returns aColumnMapperthat creates an attribute value from a database column.default ColumnMapper<T> getColumnMapper(ConfigRegistry configRegistry) Returns aColumnMapperthat creates an attribute value from a database column. 
- 
Method Details
- 
getColumnMapper
Returns aColumnMapperthat creates an attribute value from a database column.Either this method or
getColumnMapper(ConfigRegistry)must be implemented. - 
getColumnMapper
Returns aColumnMapperthat creates an attribute value from a database column.This method is optional. If it is not implemented, the result of
getColumnMapper()is returned.- Parameters:
 configRegistry- TheConfigRegistrythat this argument belongs to.
 - 
getArgumentFunction
Returns aFunctionthat creates anArgumentto map an attribute value onto the database column.Either this method or
getArgumentFunction(ConfigRegistry)must be implemented. - 
getArgumentFunction
Returns aFunctionthat creates anArgumentto map an attribute value onto the database column.This method is optional. If it is not implemented, the result of
getArgumentFunction()is returned.- Parameters:
 configRegistry- TheConfigRegistrythat this argument belongs to.
 
 -