Search in sources :

Example 11 with OutsideSqlContext

use of org.dbflute.outsidesql.OutsideSqlContext 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);
}
Also used : OutsideSqlContext(org.dbflute.outsidesql.OutsideSqlContext) TnProcedureHandler(org.dbflute.s2dao.sqlhandler.TnProcedureHandler)

Aggregations

OutsideSqlContext (org.dbflute.outsidesql.OutsideSqlContext)11 ConditionBean (org.dbflute.cbean.ConditionBean)3 FetchBean (org.dbflute.jdbc.FetchBean)3 ResultSet (java.sql.ResultSet)2 BehaviorInvokeNameResult (org.dbflute.bhv.logging.invoke.BehaviorInvokeNameResult)2 SQLException (java.sql.SQLException)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 BehaviorInvokeNameExtractor (org.dbflute.bhv.logging.invoke.BehaviorInvokeNameExtractor)1 BehaviorInvokePathResult (org.dbflute.bhv.logging.invoke.BehaviorInvokePathResult)1 FetchNarrowingBean (org.dbflute.cbean.paging.FetchNarrowingBean)1 DBMeta (org.dbflute.dbmeta.DBMeta)1 DBMetaProvider (org.dbflute.dbmeta.DBMetaProvider)1 SQLFailureException (org.dbflute.exception.SQLFailureException)1 CursorHandler (org.dbflute.jdbc.CursorHandler)1 StatementConfig (org.dbflute.jdbc.StatementConfig)1 TnFetchAssistResultSet (org.dbflute.s2dao.jdbc.TnFetchAssistResultSet)1 TnResultSetHandler (org.dbflute.s2dao.jdbc.TnResultSetHandler)1 TnBeanMetaData (org.dbflute.s2dao.metadata.TnBeanMetaData)1 TnPropertyMapping (org.dbflute.s2dao.metadata.TnPropertyMapping)1