com.atlassian.jira.ofbiz
Class ChainedSQLInterceptor

java.lang.Object
  extended by com.atlassian.jira.ofbiz.ChainedSQLInterceptor
All Implemented Interfaces:
org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

public class ChainedSQLInterceptor
extends Object
implements org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

A SQLInterceptor that can chain together multiple SQLInterceptors. It will call them in an enveloping order.

  eg if we add 'sqlI1' and 'sqlI2' then it will call

 sqlI1.beforeExecution(..)
 sqlI2.beforeExecution(..)

 sqlI2.afterSuccessfulExecution(..)
 sqlI1.afterSuccessfulExecution(..)
 

Since:
v4.0

Nested Class Summary
static class ChainedSQLInterceptor.Builder
           
 
Constructor Summary
ChainedSQLInterceptor(List<org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor> interceptorsList)
           
 
Method Summary
 void afterSuccessfulExecution(String sqlString, List<String> parameterValues, Statement statement, ResultSet resultSet, int rowsUpdated)
           
 void beforeExecution(String sqlString, List<String> parameterValues, Statement statement)
           
 void onException(String sqlString, List<String> parameterValues, Statement statement, SQLException sqlException)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainedSQLInterceptor

public ChainedSQLInterceptor(List<org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor> interceptorsList)
Method Detail

beforeExecution

public void beforeExecution(String sqlString,
                            List<String> parameterValues,
                            Statement statement)
Specified by:
beforeExecution in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

afterSuccessfulExecution

public void afterSuccessfulExecution(String sqlString,
                                     List<String> parameterValues,
                                     Statement statement,
                                     ResultSet resultSet,
                                     int rowsUpdated)
Specified by:
afterSuccessfulExecution in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

onException

public void onException(String sqlString,
                        List<String> parameterValues,
                        Statement statement,
                        SQLException sqlException)
Specified by:
onException in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor


Copyright © 2002-2010 Atlassian. All Rights Reserved.