public class ChainedSQLInterceptor extends Object implements org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
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(..)
Modifier and Type | Class and Description |
---|---|
static class |
ChainedSQLInterceptor.Builder |
Constructor and Description |
---|
ChainedSQLInterceptor(List<org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor> interceptorsList) |
Modifier and Type | Method and Description |
---|---|
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) |
public ChainedSQLInterceptor(List<org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor> interceptorsList)
public void onConnectionTaken(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
onConnectionTaken
in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
public void onConnectionReplaced(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
onConnectionReplaced
in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
public void beforeExecution(String sqlString, List<String> parameterValues, Statement statement)
beforeExecution
in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
public void afterSuccessfulExecution(String sqlString, List<String> parameterValues, Statement statement, ResultSet resultSet, int rowsUpdated)
afterSuccessfulExecution
in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
public void onException(String sqlString, List<String> parameterValues, Statement statement, SQLException sqlException)
onException
in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
Copyright © 2002-2015 Atlassian. All Rights Reserved.