com.jn.sqlhelper.apachedbutils.resultset.ResultSetHandlerExtractorAdapter Maven / Gradle / Ivy
package com.jn.sqlhelper.apachedbutils.resultset;
import com.jn.sqlhelper.common.resultset.ResultSetExtractor;
import org.apache.commons.dbutils.ResultSetHandler;
import java.sql.ResultSet;
import java.sql.SQLException;
public class ResultSetHandlerExtractorAdapter> implements ResultSetHandler {
private E resultSetExtractor;
public ResultSetHandlerExtractorAdapter(){
}
public ResultSetHandlerExtractorAdapter(E resultSetExtractor){
setResultSetExtractor(resultSetExtractor);
}
public void setResultSetExtractor(E resultSetExtractor) {
this.resultSetExtractor = resultSetExtractor;
}
@Override
public T handle(ResultSet rs) throws SQLException {
return resultSetExtractor.extract(rs);
}
}