Package org.apache.cassandra.cdc.avro
Class TypeConversion.ListConversion
- java.lang.Object
-
- org.apache.cassandra.cdc.avro.TypeConversion.ListConversion
-
- All Implemented Interfaces:
TypeConversion<java.util.List<?>>
- Enclosing interface:
- TypeConversion<T>
public static class TypeConversion.ListConversion extends java.lang.Object implements TypeConversion<java.util.List<?>>
ConvertsGenericData.Array(, which is aList,) intoListThe conversion is identity. It is basically from list to list. The conversion is done recursively, meaning the elements of the input are converted too.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.cdc.avro.TypeConversion
TypeConversion.DateConversion, TypeConversion.DecimalConversion, TypeConversion.InetAddressConversion, TypeConversion.ListConversion, TypeConversion.MapConversion, TypeConversion.Registry, TypeConversion.SetConversion, TypeConversion.TimestampConversion, TypeConversion.TypeMapping, TypeConversion.UdtConversion, TypeConversion.UUIDConversion, TypeConversion.VarIntConversion
-
-
Field Summary
Fields Modifier and Type Field Description static TypeConversion.TypeMappingLIST_IDENTITY_MAPPING
-
Constructor Summary
Constructors Constructor Description ListConversion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<?>convert(org.apache.avro.Schema fieldSchema, java.lang.Object fieldValue)Convert value from the source type to the target type.TypeConversion.TypeMappingtypeMapping()Type mapping from the source type to the target type.
-
-
-
Field Detail
-
LIST_IDENTITY_MAPPING
public static final TypeConversion.TypeMapping LIST_IDENTITY_MAPPING
-
-
Method Detail
-
typeMapping
public TypeConversion.TypeMapping typeMapping()
Description copied from interface:TypeConversionType mapping from the source type to the target type.- Specified by:
typeMappingin interfaceTypeConversion<java.util.List<?>>- Returns:
- the type mapping.
-
convert
public java.util.List<?> convert(org.apache.avro.Schema fieldSchema, @NotNull java.lang.Object fieldValue)Description copied from interface:TypeConversionConvert value from the source type to the target type. Runtime exceptions are thrown on invalid argument or conversion failure.- Specified by:
convertin interfaceTypeConversion<java.util.List<?>>- Parameters:
fieldSchema- avro schema to loop up the source schemafieldValue- value in the source type. The value cannot be null.- Returns:
- the converted value
-
-