Search in sources :

Example 26 with TableDetailInfo

use of com.cubrid.common.core.common.model.TableDetailInfo in project cubrid-manager by CUBRID.

the class TableSchemaCompareRunner method compareTableSchema.

/**
	 * Create a schema compare editor input
	 *
	 * @param sourceDatabase
	 * @param targetDatabase
	 * @return
	 */
private TableSchemaCompareEditorInput compareTableSchema(CubridDatabase sourceDatabase, CubridDatabase targetDatabase) {
    List<TableDetailInfo> lTableInfoList;
    if (sourceTableInfoList != null) {
        lTableInfoList = sourceTableInfoList;
    } else {
        lTableInfoList = TableSchemaCompareUtil.getTableInfoList(sourceDatabase);
    }
    if (dialog.isCanceled()) {
        return null;
    }
    List<TableDetailInfo> rTableInfoList = getTableInfoList(targetDatabase);
    if (dialog.isCanceled()) {
        return null;
    }
    TableSchemaCompareEditorInput CompareInput = new TableSchemaCompareEditorInput(sourceDatabase, targetDatabase, lTableInfoList, rTableInfoList);
    return CompareInput;
}
Also used : TableDetailInfo(com.cubrid.common.core.common.model.TableDetailInfo) TableSchemaCompareEditorInput(com.cubrid.common.ui.compare.schema.control.TableSchemaCompareEditorInput)

Example 27 with TableDetailInfo

use of com.cubrid.common.core.common.model.TableDetailInfo in project cubrid-manager by CUBRID.

the class TableSchemaCompareUtil method createTableSchemaModel.

public static TableSchemaModel createTableSchemaModel(List<TableDetailInfo> TableInfoList) {
    TableSchemaModel tableSchemaModel = new TableSchemaModel();
    for (TableDetailInfo tableInfo : TableInfoList) {
        tableSchemaModel.setTableSchemaMap(tableInfo.getTableName(), "");
        tableSchemaModel.setTableDetailInfoMap(tableInfo.getTableName(), tableInfo);
    }
    return tableSchemaModel;
}
Also used : TableDetailInfo(com.cubrid.common.core.common.model.TableDetailInfo) TableSchemaModel(com.cubrid.common.ui.compare.schema.model.TableSchemaModel)

Aggregations

TableDetailInfo (com.cubrid.common.core.common.model.TableDetailInfo)27 ArrayList (java.util.ArrayList)11 Connection (java.sql.Connection)6 HashMap (java.util.HashMap)6 TableSchemaCompareModel (com.cubrid.common.ui.compare.schema.model.TableSchemaCompareModel)5 InvocationTargetException (java.lang.reflect.InvocationTargetException)5 SQLException (java.sql.SQLException)5 SchemaInfo (com.cubrid.common.core.common.model.SchemaInfo)4 WrappedDatabaseInfo (com.cubrid.common.ui.cubrid.database.erwin.WrappedDatabaseInfo)4 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)4 CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)4 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)4 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)4 TableItem (org.eclipse.swt.widgets.TableItem)4 PartInitException (org.eclipse.ui.PartInitException)4 AbstractUITask (com.cubrid.common.core.task.AbstractUITask)3 ITask (com.cubrid.common.core.task.ITask)3 TableSchemaModel (com.cubrid.common.ui.compare.schema.model.TableSchemaModel)3 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)3 OpenTablesDetailInfoPartProgress (com.cubrid.common.ui.spi.progress.OpenTablesDetailInfoPartProgress)3