org.guppy4j.jdbc.QueryWithResultImpl Maven / Gradle / Ivy
package org.guppy4j.jdbc;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* QueryWithResult implementation
*/
public class QueryWithResultImpl extends QueryImpl implements QueryWithResult {
private final ResultMapper mapper;
public QueryWithResultImpl(String sql, ResultMapper mapper,
ParamsSetter... paramsSetters) {
super(sql, paramsSetters);
this.mapper = mapper;
}
@Override
public T getResult(ResultSet rs) throws SQLException {
return mapper.getResult(rs);
}
}