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.
 
Alpha: this interface is still evolving! It might eventually replace the existing Mappers and Arguments.
- 
Method SummaryModifier 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- 
getColumnMapperReturns aColumnMapperthat creates an attribute value from a database column.Either this method or getColumnMapper(ConfigRegistry)must be implemented.
- 
getColumnMapperReturns 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- The- ConfigRegistrythat this argument belongs to.
 
- 
getArgumentFunctionReturns aFunctionthat creates anArgumentto map an attribute value onto the database column.Either this method or getArgumentFunction(ConfigRegistry)must be implemented.
- 
getArgumentFunctionReturns 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- The- ConfigRegistrythat this argument belongs to.
 
 
-