Package cdc.impex.api.templates
Class ColumnTemplate<T>
- java.lang.Object
-
- cdc.impex.api.templates.ColumnTemplate<T>
-
- Type Parameters:
T- The column data type.
public class ColumnTemplate<T> extends Object
Description of a template column.- Author:
- Damien Carbonne
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColumnTemplate.Builder<T>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ColumnTemplate.Builder<T>builder(String name, Class<T> dataType)cdc.util.validation.checkers.Checker<T>getCheckerOrNull()cdc.issues.api.IssueLevelgetCheckFailureLevel()StringgetComment()Class<T>getDataType()StringgetDescription()Function<T,String>getExportConverter()Function<String,T>getImportConverter()StringgetName()UsagegetUsage()StringtoString()
-
-
-
Method Detail
-
getName
public String getName()
- Returns:
- The column name.
-
getUsage
public Usage getUsage()
- Returns:
- The column usage.
-
getDescription
public String getDescription()
-
getCheckerOrNull
public cdc.util.validation.checkers.Checker<T> getCheckerOrNull()
- Returns:
- The optional column checker.
-
getCheckFailureLevel
public cdc.issues.api.IssueLevel getCheckFailureLevel()
- Returns:
- The level of a check failure.
-
getImportConverter
public Function<String,T> getImportConverter()
- Returns:
- the converter used to convert a string to data type.
-
getExportConverter
public Function<T,String> getExportConverter()
- Returns:
- the converter used to convert a data type to a string.
-
getComment
public String getComment()
- Returns:
- The comment that should be used to describe this column.
-
builder
public static <T> ColumnTemplate.Builder<T> builder(String name, Class<T> dataType)
-
-