Class Oracle11Utils

java.lang.Object
org.axonframework.common.jdbc.Oracle11Utils

public class Oracle11Utils extends Object
Utility class with some specific hacks required to get certain features to work with Oracle v11.
  • 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 queries
      tableName - The name of the table that contains the column that should be automatically incremented
      columnName - The name of the column that should be automatically incremented
      Throws:
      SQLException - if the auto increment statement cannot be created or executed
    • createNullStatement

      public static PreparedStatement createNullStatement(Connection connection) throws SQLException
      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