com.atlassian.jira.ofbiz
Class ChainedSQLInterceptor
java.lang.Object
com.atlassian.jira.ofbiz.ChainedSQLInterceptor
- All Implemented Interfaces:
- org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor, org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
public class ChainedSQLInterceptor
- extends Object
- implements org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
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
Constructor Summary |
ChainedSQLInterceptor(List<org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor> 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 |
onConnectionReplaced(Connection connection,
org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
|
void |
onConnectionTaken(Connection connection,
org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
|
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 |
ChainedSQLInterceptor
public ChainedSQLInterceptor(List<org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor> interceptorsList)
onConnectionTaken
public void onConnectionTaken(Connection connection,
org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
- Specified by:
onConnectionTaken
in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
onConnectionReplaced
public void onConnectionReplaced(Connection connection,
org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
- Specified by:
onConnectionReplaced
in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
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-2012 Atlassian. All Rights Reserved.