org.sfm.sql2o.SfmResultSetHandler 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.
package org.sfm.sql2o;
import org.sfm.jdbc.JdbcMapper;
import org.sql2o.ResultSetHandler;
import java.sql.ResultSet;
import java.sql.SQLException;
public final class SfmResultSetHandler implements ResultSetHandler {
private final JdbcMapper mapper;
public SfmResultSetHandler(JdbcMapper mapper) {
this.mapper = mapper;
}
@Override
public T handle(ResultSet resultSet) throws SQLException {
return mapper.map(resultSet);
}
}