001package org.itsallcode.jdbc;
002
003import java.sql.PreparedStatement;
004import java.sql.SQLException;
005
006/**
007 * Instances of this class allow setting values for a {@link PreparedStatement}
008 * for multiple rows.
009 * 
010 * @param <T> row type
011 */
012@FunctionalInterface
013public interface RowPreparedStatementSetter<T> {
014    /**
015     * Set values for the given prepared statement.
016     * 
017     * 
018     * @param row               the row for which to set values
019     * @param preparedStatement the prepared statement
020     * @throws SQLException if setting values fails
021     */
022    void setValues(T row, PreparedStatement preparedStatement) throws SQLException;
023}