Package io.debezium.relational
Interface ValueConverter
-
- All Known Implementing Classes:
MaskStrings.HashValueConverter
,MaskStrings.MaskingValueConverter
,TruncateStrings.TruncatingValueConverter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ValueConverter
A function that converts from a column data value into another value.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ValueConverter
and(ValueConverter delegate)
Return a new converter that calls this converter and passes the result to the specified converter.Object
convert(Object data)
Convert the column's data value.default ValueConverter
nullOr()
Return a new converter that will call this converter only when the input is notnull
.default ValueConverter
or(ValueConverter fallback)
Adapt this converter to call the specified fallback converter when this converter returnsnull
for a non-null input.static ValueConverter
passthrough()
Obtain aValueConverter
that passes through values.
-
-
-
Method Detail
-
convert
Object convert(Object data)
Convert the column's data value.- Parameters:
data
- the column data value- Returns:
- the new data value
-
or
default ValueConverter or(ValueConverter fallback)
Adapt this converter to call the specified fallback converter when this converter returnsnull
for a non-null input.- Parameters:
fallback
- the converter to fall back to when this converter returnsnull
for a non-null input- Returns:
- the new converter, or this converter if
fallback
isnull
-
and
default ValueConverter and(ValueConverter delegate)
Return a new converter that calls this converter and passes the result to the specified converter.- Parameters:
delegate
- the converter to call after this converter- Returns:
- the new converter, or this converter if
delegate
isnull
-
nullOr
default ValueConverter nullOr()
Return a new converter that will call this converter only when the input is notnull
.- Returns:
- the new converter; never null
-
passthrough
static ValueConverter passthrough()
Obtain aValueConverter
that passes through values.- Returns:
- the pass-through
ValueConverter
; never null
-
-