Package net.solarnetwork.node.dao.jdbc
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 TypeMethodDescriptionbooleanread(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 aPreparedStatement.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, throws SQLException, IOExceptionColumnCsvMetaData> columnMetaData) Reads a row of CSV data into columns on aPreparedStatement.- 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 thecsvColumns. 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 thePreparedStatement.- Returns:
trueif a row of CSV data was read and values set on the providedPreparedStatement.- Throws:
SQLException- If any SQL error occurs.IOException- If any IO error occurs.
-