public class DBModelChecker extends Object
Modifier and Type | Field and Description |
---|---|
protected DBModelParser |
modelParser |
protected DBDatabase |
remoteDb |
Constructor and Description |
---|
DBModelChecker(DBModelParser modelParser)
Creates a new Model Checker
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkAutoIncColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkBlobColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkBoolColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkCharColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkClobColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkColumnNullable(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkColumnSize(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkColumnType(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkDateColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkDecimalColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkFloatColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkForeignKeys(DBTable table,
DBTable remoteTable,
DBModelErrorHandler handler) |
protected void |
checkIntegerColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
void |
checkModel(DBDatabase db,
Connection conn,
DBModelErrorHandler handler)
Populates the remote database and compares it against the given database
|
protected void |
checkPrimaryKey(DBTable table,
DBTable remoteTable,
DBModelErrorHandler handler) |
void |
checkRemoteAgainst(DBDatabase db,
DBModelErrorHandler handler)
Check the remote database against an existing model
|
protected void |
checkTable(DBTable table,
DBModelErrorHandler handler) |
protected void |
checkTextColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkUniqueIdColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler) |
protected void |
checkUnknownColumn(DBColumn column,
DBColumn remoteColumn,
DBModelErrorHandler handler)
empire-db DataType-specific checker
|
protected void |
checkView(DBView view,
DBModelErrorHandler handler) |
DBDatabase |
getRemoteDatabase()
Returns the RemoteDatabase
Only available after parseModel() is called
|
protected final DBModelParser modelParser
protected DBDatabase remoteDb
public DBModelChecker(DBModelParser modelParser)
modelParser
- the model parserpublic DBDatabase getRemoteDatabase()
public void checkModel(DBDatabase db, Connection conn, DBModelErrorHandler handler)
db
- the Database to be checkedconn
- the connection for retrieving the remote database metadatahandler
- the handler that is called to handle inconsistenciespublic void checkRemoteAgainst(DBDatabase db, DBModelErrorHandler handler)
db
- the database to check the remote againsthandler
- protected void checkTable(DBTable table, DBModelErrorHandler handler)
protected void checkView(DBView view, DBModelErrorHandler handler)
protected void checkPrimaryKey(DBTable table, DBTable remoteTable, DBModelErrorHandler handler)
protected void checkForeignKeys(DBTable table, DBTable remoteTable, DBModelErrorHandler handler)
protected void checkColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkColumnType(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkColumnNullable(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkColumnSize(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkUnknownColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkIntegerColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkAutoIncColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkTextColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkDateColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkCharColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkFloatColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkDecimalColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkBoolColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkBlobColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkClobColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
protected void checkUniqueIdColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.