Search in sources :

Example 6 with SqlStringFilter

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

the class TnAbstractEntityDynamicCommand method doFilterExecutedSqlByCallbackFilter.

protected String doFilterExecutedSqlByCallbackFilter(String executedSql) {
    final SqlStringFilter sqlStringFilter = getSqlStringFilter();
    if (sqlStringFilter != null) {
        final BehaviorCommandMeta meta = ResourceContext.behaviorCommand();
        final String filteredSql = sqlStringFilter.filterEntityUpdate(meta, executedSql);
        return filteredSql != null ? filteredSql : executedSql;
    }
    return executedSql;
}
Also used : SqlStringFilter(org.dbflute.hook.SqlStringFilter) BehaviorCommandMeta(org.dbflute.bhv.core.BehaviorCommandMeta)

Example 7 with SqlStringFilter

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

the class TnAbstractQueryDynamicCommand method filterSqlStringByCallbackFilter.

protected String filterSqlStringByCallbackFilter(String executedSql) {
    final SqlStringFilter sqlStringFilter = getSqlStringFilter();
    if (sqlStringFilter != null) {
        final BehaviorCommandMeta meta = ResourceContext.behaviorCommand();
        final String filteredSql = sqlStringFilter.filterQueryUpdate(meta, executedSql);
        return filteredSql != null ? filteredSql : executedSql;
    }
    return executedSql;
}
Also used : SqlStringFilter(org.dbflute.hook.SqlStringFilter) BehaviorCommandMeta(org.dbflute.bhv.core.BehaviorCommandMeta)

Aggregations

SqlStringFilter (org.dbflute.hook.SqlStringFilter)7 BehaviorCommandMeta (org.dbflute.bhv.core.BehaviorCommandMeta)5 CallbackContext (org.dbflute.hook.CallbackContext)2 RomanticTraceableSqlStringFilter (org.lastaflute.db.dbflute.callbackcontext.traceablesql.RomanticTraceableSqlStringFilter)2 BehaviorCommandHook (org.dbflute.bhv.core.BehaviorCommandHook)1 ExecutedSqlCounter (org.dbflute.bhv.proposal.callback.ExecutedSqlCounter)1 SqlFireHook (org.dbflute.hook.SqlFireHook)1 SqlLogHandler (org.dbflute.hook.SqlLogHandler)1 SqlResultHandler (org.dbflute.hook.SqlResultHandler)1 RomanticTraceableSqlFireHook (org.lastaflute.db.dbflute.callbackcontext.traceablesql.RomanticTraceableSqlFireHook)1 RomanticTraceableSqlResultHandler (org.lastaflute.db.dbflute.callbackcontext.traceablesql.RomanticTraceableSqlResultHandler)1