Class OracleSqlTransactionWrapper

java.lang.Object
ch.ergon.adam.oracle.OracleSqlTransactionWrapper
All Implemented Interfaces:
ch.ergon.adam.core.db.interfaces.SchemaSink, ch.ergon.adam.core.db.interfaces.SchemaSource, ch.ergon.adam.core.db.interfaces.SqlExecutor, AutoCloseable

public class OracleSqlTransactionWrapper extends Object implements ch.ergon.adam.core.db.interfaces.SchemaSource, ch.ergon.adam.core.db.interfaces.SchemaSink, ch.ergon.adam.core.db.interfaces.SqlExecutor
  • Constructor Details

    • OracleSqlTransactionWrapper

      public OracleSqlTransactionWrapper(String url, String schema, Runnable closeHandler)
  • Method Details

    • increaseClientCount

      public void increaseClientCount()
    • decreaseClientCount

      public void decreaseClientCount()
    • getClientCount

      public int getClientCount()
    • beginTransaction

      public void beginTransaction()
    • commitTransaction

      public void commitTransaction()
    • rollbackTransaction

      public void rollbackTransaction()
    • setTargetSchema

      public void setTargetSchema(ch.ergon.adam.core.db.schema.Schema targetSchema)
      Specified by:
      setTargetSchema in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • commitChanges

      public void commitChanges()
      Specified by:
      commitChanges in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • rollback

      public void rollback()
      Specified by:
      rollback in interface ch.ergon.adam.core.db.interfaces.SchemaSink
      Specified by:
      rollback in interface ch.ergon.adam.core.db.interfaces.SqlExecutor
    • dropForeignKey

      public void dropForeignKey(ch.ergon.adam.core.db.schema.ForeignKey foreignKey)
      Specified by:
      dropForeignKey in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • createForeignKey

      public void createForeignKey(ch.ergon.adam.core.db.schema.ForeignKey foreignKey)
      Specified by:
      createForeignKey in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropIndex

      public void dropIndex(ch.ergon.adam.core.db.schema.Index index)
      Specified by:
      dropIndex in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • createIndex

      public void createIndex(ch.ergon.adam.core.db.schema.Index index)
      Specified by:
      createIndex in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • addField

      public void addField(ch.ergon.adam.core.db.schema.Field field)
      Specified by:
      addField in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropField

      public void dropField(ch.ergon.adam.core.db.schema.Field field, ch.ergon.adam.core.db.schema.Table table)
      Specified by:
      dropField in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • setDefault

      public void setDefault(ch.ergon.adam.core.db.schema.Field field)
      Specified by:
      setDefault in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropDefault

      public void dropDefault(ch.ergon.adam.core.db.schema.Field field)
      Specified by:
      dropDefault in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • createTable

      public void createTable(ch.ergon.adam.core.db.schema.Table table)
      Specified by:
      createTable in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropTable

      public void dropTable(ch.ergon.adam.core.db.schema.Table table)
      Specified by:
      dropTable in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • renameTable

      public void renameTable(ch.ergon.adam.core.db.schema.Table oldTable, String targetTableName)
      Specified by:
      renameTable in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • copyData

      public void copyData(ch.ergon.adam.core.db.schema.Table sourceTable, ch.ergon.adam.core.db.schema.Table targetTable, String sourceTableName)
      Specified by:
      copyData in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • createView

      public void createView(ch.ergon.adam.core.db.schema.View view)
      Specified by:
      createView in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropView

      public void dropView(ch.ergon.adam.core.db.schema.View view)
      Specified by:
      dropView in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropEnum

      public void dropEnum(ch.ergon.adam.core.db.schema.DbEnum dbEnum)
      Specified by:
      dropEnum in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • createEnum

      public void createEnum(ch.ergon.adam.core.db.schema.DbEnum dbEnum)
      Specified by:
      createEnum in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • changeFieldType

      public void changeFieldType(ch.ergon.adam.core.db.schema.Field oldField, ch.ergon.adam.core.db.schema.Field newField, ch.ergon.adam.core.db.schema.DataType targetDataType)
      Specified by:
      changeFieldType in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropConstraint

      public void dropConstraint(ch.ergon.adam.core.db.schema.Constraint constraint)
      Specified by:
      dropConstraint in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • createConstraint

      public void createConstraint(ch.ergon.adam.core.db.schema.Constraint constraint)
      Specified by:
      createConstraint in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropSequence

      public void dropSequence(ch.ergon.adam.core.db.schema.Sequence sequence)
      Specified by:
      dropSequence in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • createSequence

      public void createSequence(ch.ergon.adam.core.db.schema.Sequence sequence)
      Specified by:
      createSequence in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • dropSequencesAndDefaults

      public void dropSequencesAndDefaults(ch.ergon.adam.core.db.schema.Table table)
      Specified by:
      dropSequencesAndDefaults in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • adjustSequences

      public void adjustSequences(ch.ergon.adam.core.db.schema.Table table)
      Specified by:
      adjustSequences in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • executeScript

      public void executeScript(String script)
      Specified by:
      executeScript in interface ch.ergon.adam.core.db.interfaces.SqlExecutor
    • queryResult

      public Object queryResult(String query, Object... params)
      Specified by:
      queryResult in interface ch.ergon.adam.core.db.interfaces.SqlExecutor
    • dropSchema

      public void dropSchema()
      Specified by:
      dropSchema in interface ch.ergon.adam.core.db.interfaces.SqlExecutor
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • reallyClose

      public void reallyClose()
    • isClosed

      public boolean isClosed()
    • supportAlterAndDropField

      public boolean supportAlterAndDropField()
      Specified by:
      supportAlterAndDropField in interface ch.ergon.adam.core.db.interfaces.SchemaSink
    • getSchema

      public ch.ergon.adam.core.db.schema.Schema getSchema()
      Specified by:
      getSchema in interface ch.ergon.adam.core.db.interfaces.SchemaSource
    • getConnection

      public Connection getConnection()