Package org.apache.empire.db.validation
Class DBModelChecker
java.lang.Object
org.apache.empire.db.validation.DBModelChecker
- Direct Known Subclasses:
OracleDBModelChecker
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckAutoIncColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckBlobColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckBoolColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckCharColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckClobColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckColumnNullable(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckColumnSize(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckColumnType(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckDateColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckDecimalColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckFloatColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckForeignKeys(DBTable table, DBTable remoteTable, DBModelErrorHandler handler) protected voidcheckIntegerColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) voidcheckModel(DBDatabase db, Connection conn, DBModelErrorHandler handler) Populates the remote database and compares it against the given databaseprotected voidcheckPrimaryKey(DBTable table, DBTable remoteTable, DBModelErrorHandler handler) voidcheckRemoteAgainst(DBDatabase db, DBModelErrorHandler handler) Check the remote database against an existing modelprotected voidcheckTable(DBTable table, DBModelErrorHandler handler) protected voidcheckTextColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckUniqueIdColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) protected voidcheckUnknownColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) empire-db DataType-specific checkerprotected voidcheckView(DBView view, DBModelErrorHandler handler) Returns the RemoteDatabase Only available after parseModel() is called
-
Field Details
-
modelParser
-
remoteDb
-
-
Constructor Details
-
DBModelChecker
Creates a new Model Checker- Parameters:
modelParser- the model parser
-
-
Method Details
-
getRemoteDatabase
Returns the RemoteDatabase Only available after parseModel() is called- Returns:
- the remote Database
-
checkModel
Populates the remote database and compares it against the given database- Parameters:
db- the Database to be checkedconn- the connection for retrieving the remote database metadatahandler- the handler that is called to handle inconsistencies
-
checkRemoteAgainst
Check the remote database against an existing model- Parameters:
db- the database to check the remote againsthandler-
-
checkTable
-
checkView
-
checkPrimaryKey
-
checkForeignKeys
-
checkColumn
-
checkColumnType
-
checkColumnNullable
protected void checkColumnNullable(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) -
checkColumnSize
-
checkUnknownColumn
protected void checkUnknownColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) empire-db DataType-specific checker -
checkIntegerColumn
protected void checkIntegerColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) -
checkAutoIncColumn
protected void checkAutoIncColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) -
checkTextColumn
-
checkDateColumn
-
checkCharColumn
-
checkFloatColumn
protected void checkFloatColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) -
checkDecimalColumn
protected void checkDecimalColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler) -
checkBoolColumn
-
checkBlobColumn
-
checkClobColumn
-
checkUniqueIdColumn
protected void checkUniqueIdColumn(DBColumn column, DBColumn remoteColumn, DBModelErrorHandler handler)
-