Class ColumnTemplate<T>

  • Type Parameters:
    T - The column data type.

    public final class ColumnTemplate<T>
    extends Object
    Description of a template column.

    A column is described by:

    • A name
    • A Usage.
    • A data type.
    • An optional description.
      It is used when sample files are generated.
    • An optional Checker.
      It can be used to add more checks to data type, for example, to check the length of string, the domain of a number, ...
    • The severity of a failed check.
    • A string to data type converter.
    • A data type to string converter.
    Author:
    Damien Carbonne
    • Method Detail

      • getName

        public String getName()
        Returns:
        The column name.
      • getUsage

        public Usage getUsage()
        Returns:
        The column usage.
      • getDataType

        public Class<T> getDataType()
        Returns:
        The column data type.
      • getPrimitive

        public Primitive getPrimitive()
        Returns:
        The Primitive type of this column, or null.
      • getDescription

        public String getDescription()
        Returns:
        The column description.
      • getCheckerOrNull

        public cdc.validation.checkers.Checker<T> getCheckerOrNull()
        Returns:
        The checker or null.
      • hasChecker

        public boolean hasChecker()
      • getCheckFailureSeverity

        public cdc.issues.IssueSeverity getCheckFailureSeverity()
        Returns:
        The severity 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.