Package io.debezium.relational.mapping
Class ColumnMappers
- java.lang.Object
-
- io.debezium.relational.mapping.ColumnMappers
-
@Immutable public class ColumnMappers extends Object
A set ofColumnMapperobjects for columns.- Author:
- Randall Hauch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColumnMappers.BuilderA builder ofSelectors.protected static classColumnMappers.MapperRule
-
Field Summary
Fields Modifier and Type Field Description private List<ColumnMappers.MapperRule>rules
-
Constructor Summary
Constructors Modifier Constructor Description privateColumnMappers(List<ColumnMappers.MapperRule> rules)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColumnMappers.Builderbuild()Obtain a newbuilderfor a table selection predicate.static ColumnMapperscreate(RelationalDatabaseConnectorConfig connectorConfig)Builds a newColumnMappersinstance based on the given configuration.protected static ColumnMapperinstantiateMapper(Class<ColumnMapper> clazz, Configuration config)ColumnMappermapperFor(TableId tableId, Column column)Get the value mapping function for the given column.ValueConvertermappingConverterFor(TableId tableId, Column column)Get the value mapping function for the given column.ValueConvertermappingConverterFor(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 newbuilderfor a table selection predicate.- Returns:
- the builder; never null
-
create
public static ColumnMappers create(RelationalDatabaseConnectorConfig connectorConfig)
Builds a newColumnMappersinstance 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)
-
-