org.itsallcode.jdbc.ParamConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simple-jdbc Show documentation
Show all versions of simple-jdbc Show documentation
Library to simplify using JDBC
package org.itsallcode.jdbc;
/**
* This converts a domain object to types supported by the database when
* inserting rows.
*
* @param row type
*/
@FunctionalInterface
public interface ParamConverter {
/**
* Converts a domain object to a row that can be inserted into the database.
*
* @param row domain object to convert
* @return converted row
*/
Object[] map(T row);
/**
* Identity parameter convert that returns object arrays unchanged.
*
* @return a new identity parameter converter
*/
public static ParamConverter