Search in sources :

Example 51 with DBAttribute

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

the class TableEditorPart method okPressed.

protected void okPressed() {
    if (!verifyTableName()) {
        return;
    }
    if (columnsTable.getItemCount() == 0) {
        CommonUITool.openErrorBox(Messages.noAttributes);
        return;
    }
    String message = (oldSchemaInfo == null) ? Messages.msgCreateTableConfirm : Messages.msgAlterTableConfirm;
    if (!CommonUITool.openConfirmBox(message)) {
        return;
    }
    tableName = tableNameText.getText();
    owner = ownerCombo.getText();
    String tableDesc = tableDescText.getText();
    newSchemaInfo.setClassname(tableName);
    newSchemaInfo.setOwner(owner);
    newSchemaInfo.setDescription(tableDesc);
    if (reuseOIDBtn != null) {
        newSchemaInfo.setReuseOid(reuseOIDBtn.getSelection());
    }
    DatabaseInfo dbInfo = database.getDatabaseInfo();
    CommonSQLExcuterTask commonSqlTask = new CommonSQLExcuterTask(dbInfo);
    schemaDDL.setEndLineChar("$$$$");
    String ddlStr = null;
    if (isNewTableFlag) {
        ddlStr = schemaDDL.getSchemaDDL(newSchemaInfo);
    } else {
        ddlStr = schemaDDL.getSchemaDDL(oldSchemaInfo, newSchemaInfo);
    }
    boolean isExecuteCommonSqlTask = false;
    String[] sqlStr = ddlStr.split("\\$\\$\\$\\$");
    for (String sql : sqlStr) {
        String trimSql = sql.trim();
        if (trimSql.length() > 0 && !trimSql.startsWith("--")) {
            if (dbInfo.isShard()) {
                sql = dbInfo.wrapShardQuery(sql);
            }
            commonSqlTask.addSqls(sql);
            isExecuteCommonSqlTask = true;
        }
    }
    // do with table user change
    String changeOwnerDDL = getChangeOwnerDDL();
    if (StringUtil.isNotEmpty(changeOwnerDDL)) {
        changeOwnerDDL = dbInfo.wrapShardQuery(changeOwnerDDL);
        commonSqlTask.addCallSqls(changeOwnerDDL);
        isExecuteCommonSqlTask = true;
    }
    schemaDDL.setEndLineChar(";");
    // do with column null attribute change
    List<String[]> nullAttrChangedColumnList = getNotNullChangedColumn();
    // if the column is null value, when set this column for not null,need
    // change these null value for default value
    List<String> nullToDefaultChangedColumnList = new ArrayList<String>();
    List<String> defaultValList = new ArrayList<String>();
    if (ApplicationType.CUBRID_MANAGER.equals(PerspectiveManager.getInstance().getCurrentMode())) {
        for (Iterator<String[]> it = nullAttrChangedColumnList.iterator(); it.hasNext(); ) {
            String[] column = it.next();
            if (!Boolean.parseBoolean(column[1])) {
                continue;
            }
            nullToDefaultChangedColumnList.add(column[0]);
        }
        // if the column is null value, when set this column for not null,do
        // not need change these null value for default value
        List<String> keepNullValueColList = new ArrayList<String>();
        for (Iterator<String> it = nullToDefaultChangedColumnList.iterator(); it.hasNext(); ) {
            String nullColumn = it.next();
            DBAttribute dBAttribute = newSchemaInfo.getDBAttributeByName(nullColumn, false);
            if (dBAttribute == null) {
                continue;
            }
            String defaultVal = dBAttribute.getDefault();
            boolean isUnique = dBAttribute.isUnique();
            if (isUnique) {
                keepNullValueColList.add(nullColumn);
                it.remove();
            } else {
                if (defaultVal == null) {
                    keepNullValueColList.add(nullColumn);
                    it.remove();
                    continue;
                } else {
                    FormatDataResult result = DBAttrTypeFormatter.formatForInput(dBAttribute.getType(), defaultVal, false);
                    if (result.isSuccess()) {
                        defaultValList.add(result.getFormatResult());
                    }
                }
            }
        }
        String msg = Messages.bind(Messages.confirmSetDef, nullToDefaultChangedColumnList);
        if (!nullToDefaultChangedColumnList.isEmpty() && (!CommonUITool.openConfirmBox(msg))) {
            return;
        }
        msg = Messages.bind(Messages.confirmKeepNull, keepNullValueColList);
        if (!keepNullValueColList.isEmpty() && (!CommonUITool.openConfirmBox(msg))) {
            return;
        }
    }
    TaskJobExecutor taskJobExec = new CommonTaskJobExec(this);
    boolean hasChanges = isExecuteCommonSqlTask || !nullAttrChangedColumnList.isEmpty() || !nullToDefaultChangedColumnList.isEmpty();
    if (hasChanges) {
        if (isExecuteCommonSqlTask) {
            taskJobExec.addTask(commonSqlTask);
        }
        if (database == null || newSchemaInfo == null) {
            return;
        }
        // change all table data from null value to default value
        int nullColSize = nullToDefaultChangedColumnList.size();
        for (int colIndex = 0; colIndex < nullColSize; colIndex++) {
            UpdateNullToDefault updateNullToDefault = new UpdateNullToDefault(dbInfo);
            updateNullToDefault.setTable(tableName);
            updateNullToDefault.setColumn(nullToDefaultChangedColumnList.get(colIndex));
            updateNullToDefault.setDefaultValue(defaultValList.get(colIndex));
            taskJobExec.addTask(updateNullToDefault);
        }
    }
    List<UpdateDescriptionTask> updateDescriptionTaskList = getUpdateDescriptionTaskList(dbInfo);
    for (UpdateDescriptionTask task : updateDescriptionTaskList) {
        taskJobExec.addTask(task);
    }
    if (taskJobExec.getTaskCount() > 0) {
        String serverName = database.getServer().getName();
        String dbName = database.getDatabaseInfo().getDbName();
        String title = getSite().getShell().getText();
        jobName = title + " - " + tableName + "@" + dbName;
        JobFamily jobFamily = new JobFamily();
        jobFamily.setServerName(serverName);
        jobFamily.setDbName(dbName);
        taskJobExec.schedule(jobName, jobFamily, true, Job.SHORT);
    } else {
        getSite().getWorkbenchWindow().getActivePage().closeEditor(editor, false);
    }
}
Also used : TaskJobExecutor(com.cubrid.common.ui.spi.progress.TaskJobExecutor) DatabaseInfo(com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo) CommonSQLExcuterTask(com.cubrid.cubridmanager.core.common.task.CommonSQLExcuterTask) ArrayList(java.util.ArrayList) JobFamily(com.cubrid.common.ui.spi.progress.JobFamily) Constraint(com.cubrid.common.core.common.model.Constraint) FormatDataResult(com.cubrid.cubridmanager.core.cubrid.table.model.FormatDataResult) CommonTaskJobExec(com.cubrid.common.ui.spi.progress.CommonTaskJobExec) DBAttribute(com.cubrid.common.core.common.model.DBAttribute) UpdateNullToDefault(com.cubrid.cubridmanager.core.cubrid.table.task.UpdateNullToDefault) UpdateDescriptionTask(com.cubrid.cubridmanager.core.cubrid.table.task.UpdateDescriptionTask)

Example 52 with DBAttribute

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

the class AttributeCellModifier method modify.

public void modify(Object element, String property, Object value) {
    // FIXME move this logic to core module
    final TableItem item = (TableItem) element;
    if (item == null) {
        return;
    }
    DBAttribute attr = (DBAttribute) item.getData();
    String attrName = attr.getName();
    DBAttribute oldAttribute = null;
    if (editor.getOldSchemaInfo() != null) {
        oldAttribute = editor.getOldSchemaInfo().getDBAttributeByName(attrName, false);
    }
    if (StringUtil.isEqual(property, IAttributeColumn.COL_PK)) {
        SchemaInfo schemaInfo = editor.getNewSchemaInfo();
        if (schemaInfo == null) {
            return;
        }
        boolean on = ((Boolean) value).booleanValue();
        if (on) {
            Constraint constraint = schemaInfo.getPK();
            if (constraint == null) {
                constraint = new Constraint("pk", Constraint.ConstraintType.PRIMARYKEY.getText());
                schemaInfo.addConstraint(constraint);
            }
            constraint.addAttribute(attr.getName());
        } else {
            Constraint constraint = schemaInfo.getPK();
            if (constraint == null) {
                return;
            }
            List<String> columns = constraint.getAttributes();
            if (columns == null || columns.size() == 0) {
                return;
            }
            boolean isContain = columns.remove(attr.getName());
            /*For bug TOOLS-3972 The collumn's setting in Edit Table Inconsistent with the setting in Set Primary Key*/
            if (isContain && columns.size() == 0) {
                schemaInfo.removeConstraintByName(constraint.getName(), constraint.getType());
            }
            /*For bug TOOLS-3046 : deal with edit column*/
            if (oldAttribute != null && isContain) {
                attr.setNotNull(false);
                editor.changeForEditElement(attrName, attr, oldAttribute);
            }
        }
        editor.makeChangeLogForIndex(attrName, attr, oldAttribute);
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_NAME)) {
        String newName = (String) value;
        SchemaInfo schemaInfo = editor.getNewSchemaInfo();
        if (schemaInfo == null) {
            // TODO Improve error message
            CommonUITool.openErrorBox(Messages.errEmptyNameOnEditTableColumn);
            return;
        }
        if (!StringUtil.isEmpty(newName) && !ValidateUtil.isValidIdentifier(newName)) {
            CommonUITool.openErrorBox(Messages.errColumnName);
            return;
        }
        List<DBAttribute> lastAttrs = schemaInfo.getAttributes();
        if (StringUtil.isEmpty(newName) && lastAttrs.contains(attr)) {
            CommonUITool.openErrorBox(Messages.errEmptyNameOnEditTableColumn);
            return;
        }
        for (DBAttribute lastAttr : lastAttrs) {
            if (StringUtil.isEqualIgnoreCase(lastAttr.getName(), newName) && attr != lastAttr) {
                CommonUITool.openErrorBox(Messages.errSameNameOnEditTableColumn);
                return;
            }
        }
        if (!StringUtil.isEqualIgnoreCase(attr.getName(), newName)) {
            replaceNewConstraintAttributeName(schemaInfo, attr.getName(), newName);
            DBAttribute newAttribute = attr.clone();
            if (newAttribute != null) {
                newAttribute.setName(newName);
            }
            if (attr != null) {
                attr.setName(newName);
            }
            if (!hasAddedToSchemaInfo(attr)) {
                attr.setName(newName);
                if (!StringUtil.isEmpty(newName)) {
                    if (!lastAttrs.contains(newAttribute)) {
                        newAttribute.setInherit(editor.getNewSchemaInfo().getClassname());
                        schemaInfo.addAttribute(newAttribute);
                        editor.removeElementByName(newName);
                    }
                    editor.addNewAttrLog(newName, newAttribute.isClassAttribute());
                    if (!StringUtil.isEmpty(newAttribute.getName())) {
                        editor.makeChangeLogForIndex(attrName, newAttribute, oldAttribute);
                    }
                }
            } else {
                editor.changeForEditElement(attrName, newAttribute, oldAttribute);
            }
        }
        DBAttribute lastDBAttribute = null;
        if (lastAttrs.size() > 0) {
            Table columnsTable = editor.getColumnsTable();
            lastDBAttribute = (DBAttribute) columnsTable.getItem(columnsTable.getItemCount() - 1).getData();
        }
        if (!StringUtil.isEmpty(newName) && (lastDBAttribute == null || !StringUtil.isEmpty(lastDBAttribute.getName()))) {
            editor.addNewColumn();
        }
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_DATATYPE)) {
        String dataTypeRaw = (String) value;
        if (dataTypeRaw != null && dataTypeRaw.trim().toLowerCase().startsWith("enum")) {
            int sp = dataTypeRaw.indexOf("(");
            if (sp != -1) {
                String dataType = dataTypeRaw.substring(0, sp).toLowerCase().trim();
                attr.setType(dataType);
                String enumeration = dataTypeRaw.substring(sp).trim();
                attr.setEnumeration(enumeration);
            }
        } else {
            attr.setType(dataTypeRaw);
        }
        if (!DataType.isIntegerType(attr.getType())) {
            attr.setAutoIncrement(null);
        }
        if (!DataType.canUseCollation(attr.getType())) {
            attr.setCollation("");
        }
        editor.changeForEditElement(attrName, attr, oldAttribute);
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_DEFAULT)) {
        String defaultVal = (String) value;
        boolean isStringType = DataType.isStringType(attr.getType());
        boolean isEmpty = StringUtil.isEmpty(defaultVal);
        boolean isNull = false;
        if (defaultVal == null || DataType.NULL_EXPORT_FORMAT.equals(defaultVal) || DataType.VALUE_NULL.equals(defaultVal) || (isEmpty && !isStringType)) {
            isNull = true;
        }
        if (isNull) {
            attr.setDefault(null);
        } else {
            if (attr.getAutoIncrement() != null) {
                attr.setDefault(null);
                CommonUITool.openErrorBox(Messages.errCanNotSetDefaultOnAI);
                return;
            }
            boolean isConfirmReset = "".equals(defaultVal) && oldAttribute != null && !"".equals(oldAttribute.getDefault());
            if (isConfirmReset) {
                String confirmResetDef = Messages.confirmResetDef;
                if (CommonUITool.openConfirmBox(confirmResetDef)) {
                    attr.setDefault(null);
                } else {
                    attr.setDefault(defaultVal);
                }
            } else {
                attr.setDefault(defaultVal);
            }
        }
        editor.changeForEditElement(attrName, attr, oldAttribute);
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_AUTO_INCREMENT)) {
        DBAttribute aiAttr = editor.getNewSchemaInfo().getAutoIncrementColumn();
        if (aiAttr != null && aiAttr != attr) {
            attr.setAutoIncrement(null);
            return;
        }
        String param = (String) value;
        if (StringUtil.isNotEmpty(param)) {
            if (!param.matches("\\s*[0-9]+\\s*,\\s*[0-9]+\\s*")) {
                CommonUITool.openErrorBox(Messages.errInvalidAutoIncrForm);
                return;
            }
            String defaultValue = attr.getDefault();
            if (StringUtil.isNotEmpty(defaultValue)) {
                CommonUITool.openErrorBox(Messages.errCanNotSetAIOnDefault);
                return;
            }
            String[] params = param.split(",");
            String startVal = params[0].trim();
            String incrVal = params[1].trim();
            SchemaInfo schemaInfo = editor.getNewSchemaInfo();
            SerialInfo serial = new SerialInfo();
            serial.setOwner(schemaInfo.getOwner());
            serial.setClassName(schemaInfo.getClassname());
            serial.setAttName(attrName);
            serial.setCacheCount("1");
            serial.setCurrentValue(startVal);
            serial.setCyclic(false);
            serial.setIncrementValue(incrVal);
            serial.setMaxValue(String.valueOf(Integer.MAX_VALUE));
            serial.setMinValue(startVal);
            serial.setStartedValue(startVal);
            if (attr.getAutoIncrement() != null && schemaInfo != null && schemaInfo.getAutoIncrementColumn() != null && schemaInfo.getAutoIncrementColumn().getAutoIncrement() != null) {
                String oldAI = attr.getAutoIncrement().getTableAutoIncrementString();
                String newAI = serial.getTableAutoIncrementString();
                if (StringUtil.isEqual(oldAI, newAI)) {
                    return;
                }
            }
            attr.setAutoIncrement(serial);
        } else {
            attr.setAutoIncrement(null);
        }
        editor.changeForEditElement(attrName, attr, oldAttribute);
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_NOT_NULL)) {
        boolean on = ((Boolean) value).booleanValue();
        attr.setNotNull(on);
        editor.changeForEditElement(attrName, attr, oldAttribute);
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_UK)) {
        boolean on = ((Boolean) value).booleanValue();
        if (on && attr.isShared()) {
            CommonUITool.openErrorBox(Messages.errCanNotUseUkAndSharedOnce);
            return;
        }
        attr.setUnique(on);
        editor.changeForEditElement(attrName, attr, oldAttribute);
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_SHARED)) {
        boolean on = ((Boolean) value).booleanValue();
        String defaultValue = attr.getDefault();
        if (on && StringUtil.isEmpty(defaultValue)) {
            CommonUITool.openErrorBox(Messages.msgInputSharedValue);
            return;
        }
        if (on && attr.isUnique()) {
            CommonUITool.openErrorBox(Messages.errCanNotUseUkAndSharedOnce);
            return;
        }
        attr.setShared(on);
        editor.changeForEditElement(attrName, attr, oldAttribute);
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_COLLATION)) {
        String orignCollation = attr.getCollation();
        Integer selection = StringUtil.intValue(value.toString(), 0);
        if (selection > -1) {
            String newCollation = editor.getCollationArray()[selection];
            if (!StringUtil.isEqualNotIgnoreNull(orignCollation, newCollation)) {
                attr.setCollation(newCollation);
            }
        }
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_MEMO)) {
        attr.setDescription((String) value);
    }
    editor.loadColumnData();
}
Also used : Table(org.eclipse.swt.widgets.Table) Constraint(com.cubrid.common.core.common.model.Constraint) TableItem(org.eclipse.swt.widgets.TableItem) Constraint(com.cubrid.common.core.common.model.Constraint) DBAttribute(com.cubrid.common.core.common.model.DBAttribute) List(java.util.List) SerialInfo(com.cubrid.common.core.common.model.SerialInfo) SchemaInfo(com.cubrid.common.core.common.model.SchemaInfo)

Example 53 with DBAttribute

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

the class AttributeCellModifier method getValue.

public Object getValue(Object element, String property) {
    // FIXME move this logic to core module
    DBAttribute attr = (DBAttribute) element;
    if (StringUtil.isEqual(property, IAttributeColumn.COL_PK)) {
        SchemaInfo schemaInfo = editor.getNewSchemaInfo();
        if (schemaInfo == null) {
            return false;
        }
        Constraint constraint = schemaInfo.getPK();
        if (constraint == null) {
            return false;
        }
        List<String> columns = constraint.getAttributes();
        if (columns == null || columns.size() == 0) {
            return false;
        }
        return columns.contains(attr.getName());
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_NAME)) {
        return attr.getName();
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_DATATYPE)) {
        String dataType = attr.getType();
        if (dataType == null) {
            return "";
        }
        String physicalType = getShownPhysicalType(attr);
        return physicalType;
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_DEFAULT)) {
        String defaultValue = attr.getDefault();
        if (defaultValue == null || attr.getAutoIncrement() != null || (StringUtil.isEmpty(defaultValue) && !DataType.isStringType(attr.getType()))) {
            return DataType.NULL_EXPORT_FORMAT;
        } else {
            return defaultValue;
        }
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_AUTO_INCREMENT)) {
        DBAttribute aiAttr = editor.getNewSchemaInfo().getAutoIncrementColumn();
        if (aiAttr != null && aiAttr != attr) {
            CommonUITool.openErrorBox(Messages.errCanNotAddAutoincrementAlreadyExists);
            return "";
        }
        SerialInfo serial = attr.getAutoIncrement();
        if (serial == null) {
            return "";
        }
        String defaultValue = attr.getDefault();
        if (StringUtil.isNotEmpty(defaultValue)) {
            return "";
        }
        return serial.getTableAutoIncrementString();
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_NOT_NULL)) {
        return attr.isNotNull();
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_UK)) {
        return attr.isUnique();
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_SHARED)) {
        return attr.isShared();
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_COLLATION)) {
        if (DataType.canUseCollation(attr.getType())) {
            String collation = attr.getCollation();
            return editor.getCollationIndex(collation);
        }
        return "";
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_MEMO)) {
        return attr.getDescription();
    }
    return null;
}
Also used : Constraint(com.cubrid.common.core.common.model.Constraint) DBAttribute(com.cubrid.common.core.common.model.DBAttribute) SerialInfo(com.cubrid.common.core.common.model.SerialInfo) SchemaInfo(com.cubrid.common.core.common.model.SchemaInfo)

Example 54 with DBAttribute

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

the class AttributeLabelProvider method getBackground.

public Color getBackground(Object element, int columnIndex) {
    if (schema == null || element == null || !editableMode) {
        return null;
    }
    DBAttribute attr = (DBAttribute) element;
    String property = editorAdaptor.getColumnProperty(columnIndex);
    if (StringUtil.isEqual(property, IAttributeColumn.COL_AUTO_INCREMENT)) {
        DBAttribute aiAttr = schema.getAutoIncrementColumn();
        if (aiAttr != null && aiAttr != attr) {
            return DISABLED_COLOR;
        } else if (!DataType.isIntegerType(attr.getType())) {
            return DISABLED_COLOR;
        }
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_MEMO)) {
        return editorAdaptor.isSupportTableComment() ? null : DISABLED_COLOR;
    }
    return null;
}
Also used : DBAttribute(com.cubrid.common.core.common.model.DBAttribute)

Example 55 with DBAttribute

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

the class AttributeLabelProvider method getColumnImage.

public Image getColumnImage(Object element, int columnIndex) {
    if (element == null) {
        return null;
    }
    DBAttribute dbAttribute = (DBAttribute) element;
    if (dbAttribute == null || dbAttribute.getInherit() == null || schema == null) {
        return null;
    }
    String property = editorAdaptor.getColumnProperty(columnIndex);
    if (StringUtil.isEqual(property, IAttributeColumn.COL_PK)) {
        String attrName = dbAttribute.getName();
        Constraint pk = schema.getPK(supers);
        if (null != pk && pk.getAttributes().contains(attrName)) {
            return PK_IMAGE;
        }
        return editableMode ? UNCHECK_IMAGE : null;
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_NOT_NULL)) {
        String attrName = dbAttribute.getName();
        Constraint pk = schema.getPK(supers);
        if (null != pk && pk.getAttributes().contains(attrName)) {
            return DISABLED_CHECK_IMAGE;
        }
        if (dbAttribute.isNotNull()) {
            return editableMode ? CHECK_IMAGE : DISABLED_CHECK_IMAGE;
        } else {
            return editableMode ? UNCHECK_IMAGE : null;
        }
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_UK)) {
        String attrName = dbAttribute.getName();
        Constraint pk = schema.getPK(supers);
        if (null != pk && pk.getAttributes().contains(attrName)) {
            return DISABLED_CHECK_IMAGE;
        }
        if (dbAttribute.isUnique() && schema.isAttributeUnique(dbAttribute, supers)) {
            return editableMode ? CHECK_IMAGE : DISABLED_CHECK_IMAGE;
        } else {
            return editableMode ? UNCHECK_IMAGE : DISABLED_UNCHECK_IMAGE;
        }
    } else if (StringUtil.isEqual(property, IAttributeColumn.COL_SHARED)) {
        if (dbAttribute.isShared()) {
            return editableMode ? CHECK_IMAGE : DISABLED_CHECK_IMAGE;
        } else {
            return editableMode ? UNCHECK_IMAGE : null;
        }
    }
    return null;
}
Also used : Constraint(com.cubrid.common.core.common.model.Constraint) DBAttribute(com.cubrid.common.core.common.model.DBAttribute)

Aggregations

DBAttribute (com.cubrid.common.core.common.model.DBAttribute)130 SchemaInfo (com.cubrid.common.core.common.model.SchemaInfo)57 Constraint (com.cubrid.common.core.common.model.Constraint)53 ArrayList (java.util.ArrayList)46 HashMap (java.util.HashMap)16 List (java.util.List)15 SerialInfo (com.cubrid.common.core.common.model.SerialInfo)14 TableItem (org.eclipse.swt.widgets.TableItem)13 ERTableColumn (com.cubrid.common.ui.er.model.ERTableColumn)11 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)11 GetAllAttrTask (com.cubrid.cubridmanager.core.cubrid.table.task.GetAllAttrTask)10 SchemaComment (com.cubrid.common.core.schemacomment.model.SchemaComment)8 Map (java.util.Map)8 Point (org.eclipse.swt.graphics.Point)8 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)7 SQLException (java.sql.SQLException)7 PreparedStatement (java.sql.PreparedStatement)6 DBResolution (com.cubrid.common.core.common.model.DBResolution)5 PartitionInfo (com.cubrid.common.core.common.model.PartitionInfo)5 SqlFormattingStrategy (com.cubrid.common.ui.query.format.SqlFormattingStrategy)5