use of org.dbflute.jdbc.CursorHandler in project dbflute-core by dbflute.
the class OutsideSqlSelectCursorCommand method createOutsideSqlSelectResultSetHandler.
// ===================================================================================
// SqlExecution Handling
// =====================
@Override
protected TnResultSetHandler createOutsideSqlSelectResultSetHandler() {
return new TnResultSetHandler() {
public Object handle(ResultSet rs) throws SQLException {
if (!OutsideSqlContext.isExistOutsideSqlContextOnThread()) {
String msg = "The context of outside SQL should be required here!";
throw new IllegalStateException(msg);
}
OutsideSqlContext context = OutsideSqlContext.getOutsideSqlContextOnThread();
CursorHandler cursorHandler = context.getCursorHandler();
return cursorHandler.handle(rs);
}
};
}
Aggregations