public interface SQLInterceptor
SQLInterceptor is called before and after SQL is to be executed in OFBIZ.| Modifier and Type | Method and Description |
|---|---|
void |
afterSuccessfulExecution(String sqlString,
List<String> parameterValues,
Statement statement,
ResultSet resultSet,
int rowsUpdated)
This is called after a successful (ie no
SQLException generated) JDBC query is run. |
void |
beforeExecution(String sqlString,
List<String> parameterValues,
Statement statement)
This is called before an JDBC query is run.
|
void |
onException(String sqlString,
List<String> parameterValues,
Statement statement,
SQLException sqlException)
This is called if an
SQLException is thrown during the JDBC query
If this method runs then by design the afterSuccessfulExecution(String, java.util.List,
java.sql.Statement, java.sql.ResultSet, int) (String, java.util.List, java.sql.Statement,
java.sql.SQLException)} will have NOT run. |
void beforeExecution(String sqlString, List<String> parameterValues, Statement statement)
sqlString - thw SQL string in playparameterValues - this list of the Java parameters passed to this statement. This is a simple
String.valueOf() on these parametersstatement - the JDBC Statement in playvoid afterSuccessfulExecution(String sqlString, List<String> parameterValues, Statement statement, ResultSet resultSet, int rowsUpdated)
SQLException generated) JDBC query is run.
If this method runs then by design the onException(String, java.util.List, java.sql.Statement,
java.sql.SQLException) will NOT run.sqlString - the SQL string in playparameterValues - this list of the Java parameters passed to this statement. This is a simple
String.valueOf() on these parametersstatement - the JDBC Statement in playresultSet - a JDBC ResultSet. In the case of an update, this will be NULL.rowsUpdated - the number of rows updated. In the case of a SELECT, this will be -1void onException(String sqlString, List<String> parameterValues, Statement statement, SQLException sqlException)
SQLException is thrown during the JDBC query
If this method runs then by design the afterSuccessfulExecution(String, java.util.List,
java.sql.Statement, java.sql.ResultSet, int) (String, java.util.List, java.sql.Statement,
java.sql.SQLException)} will have NOT run.sqlString - thw SQL string in playparameterValues - this list of the Java parameters passed to this statement. This is a simple
String.valueOf() on these parametersstatement - the JDBC Statement in playsqlException - the exception that occurredCopyright © 2016 Atlassian. All rights reserved.