Package io.debezium.relational.mapping
Class ColumnMappers
- java.lang.Object
-
- io.debezium.relational.mapping.ColumnMappers
-
@Immutable public class ColumnMappers extends Object
A set ofColumnMapper
objects for columns.- Author:
- Randall Hauch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ColumnMappers.Builder
A builder ofSelectors
.protected static class
ColumnMappers.MapperRule
-
Field Summary
Fields Modifier and Type Field Description private List<ColumnMappers.MapperRule>
rules
-
Constructor Summary
Constructors Modifier Constructor Description private
ColumnMappers(List<ColumnMappers.MapperRule> rules)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColumnMappers.Builder
build()
Obtain a newbuilder
for a table selection predicate.static ColumnMappers
create(RelationalDatabaseConnectorConfig connectorConfig)
Builds a newColumnMappers
instance based on the given configuration.protected static ColumnMapper
instantiateMapper(Class<ColumnMapper> clazz, Configuration config)
ColumnMapper
mapperFor(TableId tableId, Column column)
Get the value mapping function for the given column.ValueConverter
mappingConverterFor(TableId tableId, Column column)
Get the value mapping function for the given column.ValueConverter
mappingConverterFor(Table table, Column column)
Get the value mapping function for the given column.
-
-
-
Field Detail
-
rules
private final List<ColumnMappers.MapperRule> rules
-
-
Constructor Detail
-
ColumnMappers
private ColumnMappers(List<ColumnMappers.MapperRule> rules)
-
-
Method Detail
-
build
public static ColumnMappers.Builder build()
Obtain a newbuilder
for a table selection predicate.- Returns:
- the builder; never null
-
create
public static ColumnMappers create(RelationalDatabaseConnectorConfig connectorConfig)
Builds a newColumnMappers
instance based on the given configuration.
-
mappingConverterFor
public ValueConverter mappingConverterFor(Table table, Column column)
Get the value mapping function for the given column.- Parameters:
table
- the table to which the column belongs; may not be nullcolumn
- the column; may not be null- Returns:
- the mapping function, or null if there is no mapping function
-
mappingConverterFor
public ValueConverter mappingConverterFor(TableId tableId, Column column)
Get the value mapping function for the given column.- Parameters:
tableId
- the identifier of the table to which the column belongs; may not be nullcolumn
- the column; may not be null- Returns:
- the mapping function, or null if there is no mapping function
-
mapperFor
public ColumnMapper mapperFor(TableId tableId, Column column)
Get the value mapping function for the given column.- Parameters:
tableId
- the identifier of the table to which the column belongs; may not be nullcolumn
- the column; may not be null- Returns:
- the mapping function, or null if there is no mapping function
-
instantiateMapper
protected static ColumnMapper instantiateMapper(Class<ColumnMapper> clazz, Configuration config)
-
-