com.agimatec.sql.meta.oracle
Class OracleSchemaChecker

java.lang.Object
  extended by com.agimatec.sql.meta.checking.DatabaseSchemaChecker
      extended by com.agimatec.sql.meta.oracle.OracleSchemaChecker

public class OracleSchemaChecker
extends DatabaseSchemaChecker

Description: Utility class to check if a given database schema is compatible with a physical database schema: - all tables + columns that are mapped are in the database - no unknown columns are in the database - etc.

User: roman.stumm
Date: 24.04.2007
Time: 14:44:15
Copyright: Agimatec GmbH


Field Summary
 
Fields inherited from class com.agimatec.sql.meta.checking.DatabaseSchemaChecker
database, logger, myFoundErrors, unknownColumns
 
Constructor Summary
OracleSchemaChecker()
           
 
Method Summary
 void assertIndexValid()
           
 void assertObjectsValid()
          API -
protected  void assertObjectsValid(String objectType)
          Caution: Runs in own transaction, commits afterwards!
 void assertTriggersValid()
          API - check if the triggers in the database are valid.
 void assertViewsValid()
          check if the views in the database are valid.
protected  DDLScriptSqlMetaFactory getDDLScriptSqlMetaFactory()
           
protected  CatalogDescription readDatabaseCatalog(String[] tableNames)
           
 
Methods inherited from class com.agimatec.sql.meta.checking.DatabaseSchemaChecker
addUnmappedColumn, assertCatalogsComplete, assertTrue, checkDatabaseSchema, compareForeignKeyDescription, compareIndexDescription, compareSingleIndexDescription, forDbms, getDatabase, getUnmappedColumns, getUnmappedColumns, log, print, setDatabase, throwAssertions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleSchemaChecker

public OracleSchemaChecker()
Method Detail

assertObjectsValid

public void assertObjectsValid()
                        throws Exception
API -

Specified by:
assertObjectsValid in class DatabaseSchemaChecker
Throws:
Exception

getDDLScriptSqlMetaFactory

protected DDLScriptSqlMetaFactory getDDLScriptSqlMetaFactory()
Specified by:
getDDLScriptSqlMetaFactory in class DatabaseSchemaChecker

readDatabaseCatalog

protected CatalogDescription readDatabaseCatalog(String[] tableNames)
                                          throws SQLException,
                                                 IOException
Specified by:
readDatabaseCatalog in class DatabaseSchemaChecker
Throws:
SQLException
IOException

assertViewsValid

public void assertViewsValid()
                      throws Exception
check if the views in the database are valid. if not, throw assertion error with invalid views. Caution: This methods starts an own transaction and finally commits it!

Throws:
Exception

assertIndexValid

public void assertIndexValid()
                      throws Exception
Throws:
Exception

assertTriggersValid

public void assertTriggersValid()
                         throws Exception
API - check if the triggers in the database are valid. if not, throw assertion erroor with invalid trigger name. Caution: This method start an own transaction and finally commits it!

Throws:
Exception

assertObjectsValid

protected void assertObjectsValid(String objectType)
                           throws Exception
Caution: Runs in own transaction, commits afterwards!

Parameters:
objectType - - oracle object type e.g. "TRIGGER", "VIEW"
Throws:
Exception


Copyright © 2008-2012. All Rights Reserved.