use of org.dbflute.s2dao.sqlhandler.TnProcedureHandler in project dbflute-core by dbflute.
the class TnProcedureCommand method createProcedureHandler.
protected TnProcedureHandler createProcedureHandler(Object pmb) {
final String sql = filterExecutedSql(buildSql(pmb));
TnProcedureResultSetHandlerProvider provider = createProcedureResultSetHandlerProvider();
return new TnProcedureHandler(_dataSource, _statementFactory, sql, _procedureMetaData, provider);
}
use of org.dbflute.s2dao.sqlhandler.TnProcedureHandler in project dbflute-core by dbflute.
the class TnProcedureCommand method execute.
// ===================================================================================
// Execute
// =======
public Object execute(final Object[] args) {
// the args is unused because of getting from context
// (actually the args has same parameter as context)
final OutsideSqlContext outsideSqlContext = OutsideSqlContext.getOutsideSqlContextOnThread();
// basically implements ProcedurePmb
final Object pmb = outsideSqlContext.getParameterBean();
final TnProcedureHandler handler = createProcedureHandler(pmb);
final Object[] onlyPmbArgs = new Object[] { pmb };
// The method that builds display SQL is overridden for procedure
// so it can set arguments which have only parameter bean
handler.setExceptionMessageSqlArgs(onlyPmbArgs);
return handler.execute(onlyPmbArgs);
}
Aggregations