Examples of DBDataset


Examples of com.dci.intellij.dbn.object.DBDataset

            for (DBConstraint constraint : column.getConstraints()) {
                constraint = (DBConstraint) constraint.getUndisposedElement();
                if (constraint != null && constraint.isForeignKey()) {
                    DBConstraint foreignKeyConstraint = constraint.getForeignKeyConstraint();
                    if (foreignKeyConstraint != null) {
                        DBDataset foreignKeyDataset = foreignKeyConstraint.getDataset();
                        DatasetFilterInput filterInput = new DatasetFilterInput(foreignKeyDataset);

                        for (DBColumn constraintColumn : constraint.getColumns()) {
                            DBColumn foreignKeyColumn = ((DBColumn) constraintColumn.getUndisposedElement()).getForeignKeyColumn();
                            Object value = cell.getRow().getCellForColumn(constraintColumn).getUserValue();
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

                        notifyRowUpdated(index);
                    }
                }
                isModified = true;
            }
            DBDataset dataset = getDataset();
            if (dataset != null) {
                getConnectionHandler().notifyChanges(dataset.getVirtualFile());
            }
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

    }

    public void insertRecord(int rowIndex) {
        DatasetEditorTable editorTable = getEditorTable();
        if (editorTable != null) {
            DBDataset dataset = getDataset();
            try {
                editorTable.stopCellEditing();
                resultSet.moveToInsertRow();
                DatasetEditorModelRow newRow = createRow(getRowCount()+1);
                newRow.setInsert(true);
                addRowAtIndex(rowIndex, newRow);
                notifyRowsInserted(rowIndex, rowIndex);

                editorTable.selectCell(rowIndex, editorTable.getSelectedColumn() == -1 ? 0 : editorTable.getSelectedColumn());
                isInserting = true;
                if (dataset != null) {
                    getConnectionHandler().notifyChanges(dataset.getVirtualFile());
                }
            } catch (SQLException e) {
                if (dataset != null) {
                    MessageUtil.showErrorDialog("Could not insert record for " + dataset.getQualifiedNameWithType() + ".", e);
                }
            }
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

    }

    public void duplicateRecord(int rowIndex) {
        DatasetEditorTable editorTable = getEditorTable();
        if (editorTable != null) {
            DBDataset dataset = getDataset();
            try {
                editorTable.stopCellEditing();
                int insertIndex = rowIndex + 1;
                resultSet.moveToInsertRow();
                DatasetEditorModelRow oldRow = getRowAtIndex(rowIndex);
                DatasetEditorModelRow newRow = createRow(getRowCount() + 1);
                newRow.setInsert(true);
                newRow.updateDataFromRow(oldRow);
                addRowAtIndex(insertIndex, newRow);
                notifyRowsInserted(insertIndex, insertIndex);

                editorTable.selectCell(insertIndex, editorTable.getSelectedColumn());
                isInserting = true;
                if (dataset != null) {
                    getConnectionHandler().notifyChanges(dataset.getVirtualFile());
                }
            } catch (SQLException e) {
                if (dataset != null) {
                    MessageUtil.showErrorDialog("Could not duplicate record in " + dataset.getQualifiedNameWithType() + ".", e);
                }
            }
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

   /****************************************************
    *                   Configuration                  *
    ****************************************************/
    public DatasetBasicFilterConditionForm createConfigurationEditor() {
        DBDataset dataset = filter.lookupDataset();
        return new DatasetBasicFilterConditionForm(dataset, this);
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

        setActiveFilter(dataset, filter);
        DatasetEditorManager.getInstance(getProject()).reloadEditorData(dataset);
    }

    public void createBasicFilter(DatasetFilterInput filterInput) {
        DBDataset dataset = filterInput.getDataset();
        DatasetFilterGroup filterGroup = getFilterGroup(dataset);
        DatasetBasicFilter filter = null;

        for (DBColumn column : filterInput.getColumns()) {
            Object value = filterInput.getColumnValue(column);
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

        new SimpleLaterInvocator() {
            public void execute() {
                if (!isDisposed()) {
                    DatasetEditorModel model = getRow().getModel();
                    if (!model.getEditorTable().isShowing()) {
                        DBDataset dataset = getDataset();
                        DatabaseFileSystem.getInstance().openEditor(dataset);
                    }
                    if (error != null) {
                        DatasetEditorErrorForm errorForm = new DatasetEditorErrorForm(DatasetEditorModelCell.this);
                        errorForm.show();
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

    private JPanel headerPanel;
    private CheckBoxList<ColumnStateSelectable> columnList;
    private DatasetColumnSetup columnSetup;

    public DatasetColumnSetupForm(DatasetEditor datasetEditor) {
        DBDataset dataset = datasetEditor.getDataset();
        this.columnSetup = datasetEditor.getState().getColumnSetup();
        List<DatasetColumnState> columnStates = columnSetup.getColumnStates();
        List<ColumnStateSelectable> columnStateSel = new ArrayList<ColumnStateSelectable>();
        for (DatasetColumnState columnState : columnStates) {
            columnStateSel.add(new ColumnStateSelectable(dataset, columnState));
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

    public DBDataset getDataset() {
        return getModel().getDataset();
    }

    public String getName() {
        DBDataset dataset = getDataset();
        return dataset == null ? "Disposed" : dataset.getName();
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBDataset

    /*****************************************************
     *                   Configuration                   *
     *****************************************************/
    public ConfigurationEditorForm createConfigurationEditor() {
        DBDataset dataset = lookupDataset();
        return dataset == null ? null : new DatasetCustomFilterForm(dataset, this);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.