Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2014-2015 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *     http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.dbflute.hook;
The filter of SQL string.
This filter is called back before executing the SQL.
 context.setSqlStringFilter(new SqlStringFilter() {
     public String filterSelectCB(BehaviorCommandMeta meta, String executedSql) {
         // You can filter your SQL string here.
     }
     ...
 });
 
This filter does not have all SQL call-back point. For example, you cannot filter SQL of sequence next value.

Author(s):
jflute
public interface SqlStringFilter {

    
Filter the executed SQL of select by condition-bean.

Parameters:
meta The meta information of the behavior command. (NotNull)
executedSql The string of actually-executed SQL. (NotNull)
Returns:
The filtered SQL string. (NullAllowed: if null, means no filter)
    String filterSelectCB(BehaviorCommandMeta metaString executedSql);

    
Filter the executed SQL of entity update, insert and delete. (contains batch)

Parameters:
meta The meta information of the behavior command. (NotNull)
executedSql The string of actually-executed SQL. (NotNull)
Returns:
The filtered SQL string. (NullAllowed: if null, means no filter)
    String filterEntityUpdate(BehaviorCommandMeta metaString executedSql);

    
Filter the executed SQL of query update, insert and delete (by condition-bean).

Parameters:
meta The meta information of the behavior command. (NotNull)
executedSql The string of actually-executed SQL. (NotNull)
Returns:
The filtered SQL string. (NullAllowed: if null, means no filter)
    String filterQueryUpdate(BehaviorCommandMeta metaString executedSql);

    
Filter the executed SQL of outside-SQL.
Called after filtering by outside-SQL filter.

Parameters:
meta The meta information of the behavior command. (NotNull)
executedSql The string of actually-executed SQL. (NotNull)
Returns:
The filtered SQL string. (NullAllowed: if null, means no filter)
    String filterOutsideSql(BehaviorCommandMeta metaString executedSql);

    
Filter the executed SQL of procedure call.

Parameters:
meta The meta information of the behavior command. (NotNull)
executedSql The string of actually-executed SQL. (NotNull)
Returns:
The filtered SQL string. (NullAllowed: if null, means no filter)
    String filterProcedure(BehaviorCommandMeta metaString executedSql);
New to GrepCode? Check out our FAQ X