org.sfm.jdbc.package-info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleFlatMapper Show documentation
Show all versions of simpleFlatMapper Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
/**
* {@link org.sfm.jdbc.JdbcMapper} classes to map object from a csv file. It is instantiated using the {@link org.sfm.jdbc.JdbcMapperFactory}
*
*
* JdbcMapper<MyObject> mapper = JdbcMapperFactory.newInstance().newMapper(MyObject.class);
* try (PreparedStatement ps = conn.prepareStatement("select id, email, my_property from MyTable")) {
* try (ResultSet rs = ps.executeQuery()){
* mapper.forEach(rs, (o) -> writer.append(o.toString()).append("\n"));
* }
* }
*
*
*/
package org.sfm.jdbc;