org.sql2o.DelegatingResultSetHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anima Show documentation
Show all versions of anima Show documentation
Operate the database like a stream
package org.sql2o;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* User: dimzon
* Date: 4/7/14
* Time: 11:06 PM
*/
public class DelegatingResultSetHandler implements ResultSetHandler {
private volatile ResultSetHandler inner = null;
private final ResultSetHandlerFactory factory;
public DelegatingResultSetHandler(ResultSetHandlerFactory factory) {
this.factory = factory;
}
public E handle(ResultSet resultSet) throws SQLException {
if(inner==null) inner = factory.newResultSetHandler(resultSet.getMetaData());
return inner.handle(resultSet);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy