Class ColumnCsvMetaData

java.lang.Object
net.solarnetwork.node.dao.jdbc.ColumnCsvMetaData

public class ColumnCsvMetaData extends Object
Metadata about a JDBC table column for use in CSV processing.
Since:
1.17
Version:
1.0
Author:
matt
  • Constructor Details

    • ColumnCsvMetaData

      public ColumnCsvMetaData(String columnName, org.supercsv.cellprocessor.ift.CellProcessor cellProcessor, int sqlType)
      Construct as a non-primary key column.
      Parameters:
      columnName - The column name.
      cellProcessor - The cell processor to use when parsing CSV data for this column.
      sqlType - The JDBC Types value to use for this column.
    • ColumnCsvMetaData

      public ColumnCsvMetaData(String columnName, org.supercsv.cellprocessor.ift.CellProcessor cellProcessor, int sqlType, boolean primaryKey)
      Constructor.
      Parameters:
      columnName - The column name.
      cellProcessor - The cell processor to use when parsing CSV data for this column.
      sqlType - The JDBC Types value to use for this column.
      primaryKey - true if this is a primary key column.
  • Method Details

    • getColumnName

      public String getColumnName()
      Get the JDBC column name.
      Returns:
      The column name.
    • getCellProcessor

      public org.supercsv.cellprocessor.ift.CellProcessor getCellProcessor()
      Get a CellProcessor to use with the associated CSV conversion.
      Returns:
      A cell processor.
    • getSqlType

      public int getSqlType()
      Get the JDBC column type, from the Types class.
      Returns:
      The JDBC column type.
    • isPrimaryKey

      public boolean isPrimaryKey()
      Flag if this column is part of the table's primary key.
      Returns:
      true if part of the table's primary key.
    • asPrimaryKeyColumn

      public ColumnCsvMetaData asPrimaryKeyColumn()
      Get a copy of this object with the primary key flag set to true.
      Returns:
      A new column metadata instance.