|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agimatec.sql.meta.checking.DatabaseSchemaChecker
public abstract class DatabaseSchemaChecker
Description:
User: roman.stumm
Date: 24.04.2007
Time: 14:58:47
Copyright: Agimatec GmbH
| Field Summary | |
|---|---|
protected JdbcDatabase |
database
|
protected static org.apache.commons.logging.Log |
logger
|
protected java.util.List |
myFoundErrors
|
protected java.util.Map |
unknownColumns
|
| Constructor Summary | |
|---|---|
DatabaseSchemaChecker()
|
|
| Method Summary | |
|---|---|
void |
addUnmappedColumn(java.lang.String tableName,
java.lang.String columnName)
configuration - declare a column as not mapped in the database, so that it will not be treated as an error during assertSchemaComplete(). |
void |
assertCatalogsComplete(CatalogDescription schemaConfig,
CatalogDescription databaseConfig)
|
abstract void |
assertObjectsValid()
API - check for invalid objects in the database |
protected void |
assertTrue(java.lang.String s,
boolean b)
|
void |
checkDatabaseSchema(java.net.URL[] scripts)
API - check the database for compatibility with the given XML-DDL configuration. |
protected void |
compareForeignKeyDescription(TableDescription xmlTableDescription,
TableDescription databaseTableDescription)
|
protected void |
compareIndexDescription(TableDescription xmlTableDescription,
TableDescription databaseTableDescription)
|
protected void |
compareSingleIndexDescription(IndexDescription xmlIndexDescription,
IndexDescription databaseIndexDescription)
|
static DatabaseSchemaChecker |
forDbms(java.lang.String dbms)
|
JdbcDatabase |
getDatabase()
|
protected abstract DDLScriptSqlMetaFactory |
getDDLScriptSqlMetaFactory()
|
java.util.Map |
getUnmappedColumns()
|
java.util.Collection |
getUnmappedColumns(java.lang.String tableName)
|
protected void |
log(java.lang.Object obj)
log INFO or Exception |
protected void |
print(java.lang.Object obj)
log INFO and print to console |
protected abstract CatalogDescription |
readDatabaseCatalog(java.lang.String[] tableNames)
|
void |
setDatabase(JdbcDatabase aDatabase)
|
protected void |
throwAssertions()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log logger
protected final java.util.List myFoundErrors
protected JdbcDatabase database
protected java.util.Map unknownColumns
| Constructor Detail |
|---|
public DatabaseSchemaChecker()
| Method Detail |
|---|
public static DatabaseSchemaChecker forDbms(java.lang.String dbms)
public JdbcDatabase getDatabase()
public void setDatabase(JdbcDatabase aDatabase)
public void addUnmappedColumn(java.lang.String tableName,
java.lang.String columnName)
tableName - columnName - public java.util.Map getUnmappedColumns()
public java.util.Collection getUnmappedColumns(java.lang.String tableName)
tableName -
protected void throwAssertions()
public abstract void assertObjectsValid()
throws java.lang.Exception
java.lang.Exception
public void checkDatabaseSchema(java.net.URL[] scripts)
throws java.lang.Exception
scripts - - scripts for schema (Soll-Zustand)
Der Ist-Zustand steht in der Datenbank und wird mit dem Soll-Zustand verglichen.
java.lang.Exceptionprotected abstract DDLScriptSqlMetaFactory getDDLScriptSqlMetaFactory()
protected abstract CatalogDescription readDatabaseCatalog(java.lang.String[] tableNames)
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLException
java.io.IOException
public void assertCatalogsComplete(CatalogDescription schemaConfig,
CatalogDescription databaseConfig)
protected void compareSingleIndexDescription(IndexDescription xmlIndexDescription,
IndexDescription databaseIndexDescription)
protected void compareIndexDescription(TableDescription xmlTableDescription,
TableDescription databaseTableDescription)
protected void compareForeignKeyDescription(TableDescription xmlTableDescription,
TableDescription databaseTableDescription)
protected void assertTrue(java.lang.String s,
boolean b)
protected void print(java.lang.Object obj)
protected void log(java.lang.Object obj)
obj -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||