Package org.axonframework.common.jdbc
Class Oracle11Utils
java.lang.Object
org.axonframework.common.jdbc.Oracle11Utils
Utility class with some specific hacks required to get certain features to work with Oracle v11.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PreparedStatementcreateNullStatement(Connection connection) Creates a prepared statement that acts as a null object.static voidsimulateAutoIncrement(Connection connection, String tableName, String columnName) Oracle11 does not have auto incremented values.
-
Method Details
-
simulateAutoIncrement
public static void simulateAutoIncrement(Connection connection, String tableName, String columnName) throws SQLException Oracle11 does not have auto incremented values. This method uses a sequence and a trigger to create the same behavior.- Parameters:
connection- The connection to the database that will be used to execute the queriestableName- The name of the table that contains the column that should be automatically incrementedcolumnName- The name of the column that should be automatically incremented- Throws:
SQLException- if the auto increment statement cannot be created or executed
-
createNullStatement
Creates a prepared statement that acts as a null object.- Parameters:
connection- The connection that is used to create the prepared statement- Returns:
- PreparedStatement
- Throws:
SQLException- if the null statement cannot be created
-