Package 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, and any runtime exceptions thrown by one of the chained interceptors will be caught and logged but otherwise ignored.
For example, if we add 'one' and 'two', then it will call:
one.beforeExecution(...) two.beforeExecution(...) two.afterSuccessfulExecution(...) one.afterSuccessfulExecution(...)
- Since:
- v4.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidafterSuccessfulExecution(String sqlString, List<String> parameterValues, Statement statement, ResultSet resultSet, int rowsUpdated) voidbeforeExecution(String sqlString, List<String> parameterValues, Statement statement) voidonConnectionReplaced(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState) voidonConnectionTaken(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState) voidonException(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, waitMethods inherited from interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
afterSuccessfulExecution, beforeExecution, onException
-
Method Details
-
onConnectionTaken
public void onConnectionTaken(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState) - Specified by:
onConnectionTakenin interfaceorg.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
-
onConnectionReplaced
public void onConnectionReplaced(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState) - Specified by:
onConnectionReplacedin interfaceorg.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
-
beforeExecution
- Specified by:
beforeExecutionin interfaceorg.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
-
afterSuccessfulExecution
public void afterSuccessfulExecution(String sqlString, List<String> parameterValues, Statement statement, ResultSet resultSet, int rowsUpdated) - Specified by:
afterSuccessfulExecutionin interfaceorg.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
-
onException
public void onException(String sqlString, List<String> parameterValues, Statement statement, SQLException sqlException) - Specified by:
onExceptionin interfaceorg.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
-