Search in sources :

Example 1 with SqlFireResultInfo

use of org.dbflute.hook.SqlFireResultInfo in project dbflute-core by dbflute.

the class TnAbstractBasicSqlHandler method hookSqlFireFinally.

protected void hookSqlFireFinally(Object nativeResult, SQLException nativeCause) {
    if (!hasSqlFireHook()) {
        return;
    }
    final SqlLogInfo sqlLogInfo = InternalMapContext.getHookSqlLogInfo();
    final Long sqlBefore = InternalMapContext.getSqlBeforeTimeMillis();
    final Long sqlAfter = InternalMapContext.getSqlAfterTimeMillis();
    final ExecutionTimeInfo timeInfo = new ExecutionTimeInfo(null, null, sqlBefore, sqlAfter);
    final SqlFireResultInfo fireResultInfo = new SqlFireResultInfo(nativeResult, sqlLogInfo, timeInfo, nativeCause);
    getSqlFireHook().hookFinally(ResourceContext.behaviorCommand(), fireResultInfo);
}
Also used : SqlLogInfo(org.dbflute.hook.SqlLogInfo) ExecutionTimeInfo(org.dbflute.jdbc.ExecutionTimeInfo) SqlFireResultInfo(org.dbflute.hook.SqlFireResultInfo)

Aggregations

SqlFireResultInfo (org.dbflute.hook.SqlFireResultInfo)1 SqlLogInfo (org.dbflute.hook.SqlLogInfo)1 ExecutionTimeInfo (org.dbflute.jdbc.ExecutionTimeInfo)1