public interface SQLInterceptor
SQLInterceptor is called before and after SQL is to be executed in OFBIZ.| Modifier and Type | Method and Description |
|---|---|
default void |
afterSuccessfulExecution(String sqlString,
List<String> parameterValues,
List<List<String>> parameterValuesForBatch,
Statement statement,
ResultSet resultSet,
int rowsUpdated,
int[] rowsUpdatedByBatch)
This is called after a successful (ie no
SQLException generated) JDBC query is run. |
void |
afterSuccessfulExecution(String sqlString,
List<String> parameterValues,
Statement statement,
ResultSet resultSet,
int rowsUpdated)
Deprecated.
|
default void |
beforeExecution(String sqlString,
List<String> parameterValues,
List<List<String>> parameterValuesForBatch,
Statement statement)
This is called before an JDBC query is run.
|
void |
beforeExecution(String sqlString,
List<String> parameterValues,
Statement statement)
Deprecated.
|
default void |
onException(String sqlString,
List<String> parameterValues,
List<List<String>> parameterValuesForBatch,
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, List, List, Statement, ResultSet, int, int[]) will have NOT run. |
void |
onException(String sqlString,
List<String> parameterValues,
Statement statement,
SQLException sqlException)
Deprecated.
|
void beforeExecution(String sqlString, List<String> parameterValues, Statement statement)
beforeExecution(String, List, List, 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 playdefault void beforeExecution(String sqlString, List<String> parameterValues, List<List<String>> parameterValuesForBatch, 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 parametersparameterValuesForBatch - this list of list of the Java parameters passed to this statement for batch processing. This is a simple
String.valueOf() on these parameters. In case of non batch operation this will be an empty list.statement - the JDBC Statement in playvoid afterSuccessfulExecution(String sqlString, List<String> parameterValues, Statement statement, ResultSet resultSet, int rowsUpdated)
afterSuccessfulExecution(String, List, List, Statement, ResultSet, int, int[])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 -1default void afterSuccessfulExecution(String sqlString, List<String> parameterValues, List<List<String>> parameterValuesForBatch, Statement statement, ResultSet resultSet, int rowsUpdated, int[] rowsUpdatedByBatch)
SQLException generated) JDBC query is run.
If this method runs then by design the onException(String, List, List, Statement, 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 parametersparameterValuesForBatch - this list of list of the Java parameters passed to this statement for batch processing. This is a simple
String.valueOf() on these parameters. In case of non batch operation this will be an empty list.statement - 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 -1rowsUpdatedByBatch - the number of rows updated by batch operation. In case of non batch operation it will be an empty array.void onException(String sqlString, List<String> parameterValues, Statement statement, SQLException sqlException)
onException(String, List, List, Statement, 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) 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 occurreddefault void onException(String sqlString, List<String> parameterValues, List<List<String>> parameterValuesForBatch, Statement statement, SQLException sqlException)
SQLException is thrown during the JDBC query
If this method runs then by design the afterSuccessfulExecution(String, List, List, Statement, ResultSet, int, int[]) 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 parametersparameterValuesForBatch - this list of list of the Java parameters passed to this statement for batch processing. This is a simple
String.valueOf() on these parameters. For non batched operations this will be an empty list.statement - the JDBC Statement in playsqlException - the exception that occurredCopyright © 2024 Atlassian. All rights reserved.