use of org.dbflute.bhv.logging.invoke.BehaviorInvokeNameExtractor in project dbflute-core by dbflute.
the class BehaviorCommandInvoker method extractBehaviorInvoke.
// -----------------------------------------------------
// Extract BehaviorInvoke
// ----------------------
protected <RESULT> BehaviorInvokeNameResult extractBehaviorInvoke(BehaviorCommand<RESULT> behaviorCommand, StackTraceElement[] stackTrace) {
final DBMeta dbmeta = ResourceContext.provideDBMeta(behaviorCommand.getTableDbName());
if (dbmeta == null) {
// basically no way, only direct invoking
return createUnknownInvokeNameResult();
}
Class<?> outsideSqlResultType = null;
boolean outsideSqlAutoPaging = false;
if (behaviorCommand.isOutsideSql()) {
final OutsideSqlContext outsideSqlContext = getOutsideSqlContext();
outsideSqlResultType = outsideSqlContext.getResultType();
outsideSqlAutoPaging = outsideSqlContext.isAutoPagingLogging();
}
final BehaviorInvokeNameExtractor extractor = createBehaviorInvokeNameExtractor(dbmeta, outsideSqlResultType, outsideSqlAutoPaging);
return extractor.extractBehaviorInvoke(stackTrace);
}
Aggregations