Package org.apache.ignite.table.mapper
Interface TypeConverter<ObjectT,ColumnT>
- Type Parameters:
ObjectT- Object type.ColumnT- Column type.
public interface TypeConverter<ObjectT,ColumnT>
Type converter interface provides methods for additional data transformation of the field type to a type
compatible with the column type, and vice versa.
The converter can be used to convert objects (or their fields) whose type is incompatible with the schema. E.g., serialize an arbitrary object to a byte[] for storing is a BLOB column.
-
Method Summary
Modifier and TypeMethodDescriptiontoColumnType(ObjectT obj) Converts a given object to a column type.toObjectType(ColumnT data) Transforms to an object of the target type; called after the data is read from a column.
-
Method Details
-
toColumnType
Converts a given object to a column type.- Parameters:
obj- Object to transform.- Returns:
- Object of column type.
- Throws:
Exception- If transformation failed.
-
toObjectType
Transforms to an object of the target type; called after the data is read from a column.- Parameters:
data- Column data.- Returns:
- Object of the target type.
- Throws:
Exception- If transformation failed.
-