Interface JdbcPreparedStatementCsvReader

All Superinterfaces:
AutoCloseable, Closeable, org.supercsv.io.ICsvReader
All Known Implementing Classes:
PreparedStatementCsvReader

public interface JdbcPreparedStatementCsvReader extends org.supercsv.io.ICsvReader
Read a row of CSV data and set the values onto a PreparedStatement.
Since:
1.17
Version:
1.0
Author:
matt
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    read(PreparedStatement stmt, Map<String,Integer> csvColumns, org.supercsv.cellprocessor.ift.CellProcessor[] cellProcessors, Map<String,ColumnCsvMetaData> columnMetaData)
    Reads a row of CSV data into columns on a PreparedStatement.

    Methods inherited from interface java.io.Closeable

    close

    Methods inherited from interface org.supercsv.io.ICsvReader

    get, getHeader, getLineNumber, getRowNumber, getUntokenizedRow, length
  • Method Details

    • read

      boolean read(PreparedStatement stmt, Map<String,Integer> csvColumns, org.supercsv.cellprocessor.ift.CellProcessor[] cellProcessors, Map<String,ColumnCsvMetaData> columnMetaData) throws SQLException, IOException
      Reads a row of CSV data into columns on a PreparedStatement.
      Parameters:
      stmt - The statement to use.
      csvColumns - The CSV column names with associated indicies. These must match the JDBC column names.
      cellProcessors - An array of cell processors to handle each exported column. The length of the array should match the number and order of columns in the csvColumns. null values are permitted and indicate no processing should be performed on that column.
      columnMetaData - The column names with associated metadata. The names should match the column names in the PreparedStatement.
      Returns:
      true if a row of CSV data was read and values set on the provided PreparedStatement.
      Throws:
      SQLException - If any SQL error occurs.
      IOException - If any IO error occurs.