Package org.jdbi.v3.vavr
Class TupleMappers
java.lang.Object
org.jdbi.v3.vavr.TupleMappers
- All Implemented Interfaces:
- JdbiConfig<TupleMappers>,- MapEntryConfig<TupleMappers>
public class TupleMappers
extends Object
implements JdbiConfig<TupleMappers>, MapEntryConfig<TupleMappers>
Mappers similar to 
MapEntryMappers but map entries in vavr are in fact
 of type Tuple2.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns a copy of this configuration object.getColumn(int tupleIndex) Returns the name for a column.Names a specific column in the mapper.setKeyColumn(String keyColumn) Sets the column that map entry keys are loaded from.voidsetRegistry(ConfigRegistry registry) The registry will inject itself into the configuration object.setValueColumn(String valueColumn) Sets the column that map entry values are loaded from.
- 
Constructor Details- 
TupleMapperspublic TupleMappers()
 
- 
- 
Method Details- 
getKeyColumn- Specified by:
- getKeyColumnin interface- MapEntryConfig<TupleMappers>
 
- 
setKeyColumnDescription copied from interface:MapEntryConfigSets the column that map entry keys are loaded from. If set, keys will be loaded from the given column, using theColumnMapperregistered for the key type. If unset, keys will be loaded using theRowMapperregistered for the key type, from whichever columns that row mapper uses.- Specified by:
- setKeyColumnin interface- MapEntryConfig<TupleMappers>
- Parameters:
- keyColumn- the key column name. not null
- Returns:
- this config object, for call chaining
 
- 
getValueColumn- Specified by:
- getValueColumnin interface- MapEntryConfig<TupleMappers>
 
- 
setValueColumnDescription copied from interface:MapEntryConfigSets the column that map entry values are loaded from. If set, values will be loaded from the given column, using theColumnMapperregistered for the value type. If unset, values will be loaded using theRowMapperregistered for the value type, from whichever columns that row mapper uses.- Specified by:
- setValueColumnin interface- MapEntryConfig<TupleMappers>
- Parameters:
- valueColumn- the value column name. not null
- Returns:
- this config object, for call chaining
 
- 
setColumnNames a specific column in the mapper.- Parameters:
- tupleIndex- the 1 based index of the TupleX. as in _1, _2 etc.
- name- the column name to be mapped explicitly
- Returns:
- Config object for chaining
 
- 
getColumnReturns the name for a column.- Parameters:
- tupleIndex- the 1 based index of the TupleX. as in _1, _2 etc.
- Returns:
- the column name to be mapped explicitly
 
- 
createCopyDescription copied from interface:JdbiConfigReturns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.- Specified by:
- createCopyin interface- JdbiConfig<TupleMappers>
- Returns:
- a copy of this configuration object.
 
- 
setRegistryDescription copied from interface:JdbiConfigThe registry will inject itself into the configuration object. This can be useful if you need to look up dependencies. You will get a new registry after being copied.- Specified by:
- setRegistryin interface- JdbiConfig<TupleMappers>
- Parameters:
- registry- the registry that owns this configuration object
 
 
-