Package com.dci.intellij.dbn.object

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


    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

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

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

    /*****************************************************
     *                   Configuration                   *
     *****************************************************/
    public ConfigurationEditorForm createConfigurationEditor() {
        DBDataset dataset = lookupDataset();
        return dataset == null ? null : new DatasetCustomFilterForm(dataset, this);
    }
View Full Code Here

    }

    private void handleLoadError(final SQLException e, final DatasetLoadInstructions instr) {
        new SimpleLaterInvocator() {
            public void execute() {
                DBDataset dataset = getDataset();
                if (!isDisposed() && dataset != null) {
                    focusEditor();
                    DatabaseMessageParserInterface messageParserInterface = getConnectionHandler().getInterfaceProvider().getMessageParserInterface();
                    DatasetFilterManager filterManager = DatasetFilterManager.getInstance(getProject());

                    DatasetFilter filter = filterManager.getActiveFilter(dataset);
                    String datasetName = dataset.getQualifiedNameWithType();
                    if (getConnectionHandler().isValid()) {
                        if (filter == null || filter == DatasetFilterManager.EMPTY_FILTER || filter.getError() != null) {
                            if (instr.isDeliberateAction()) {
                                String message =
                                        "Error loading data for " + datasetName + ".\n" + (
View Full Code Here

    public StructureViewTreeElement[] getChildren() {
        if (children == null) {
            if (datasetEditor.isDisposed())  {
                return EMPTY_ARRAY;
            }
            DBDataset dataset = datasetEditor.getDataset();
            if (treeNode instanceof DBObjectBundle) {
                DatasetEditorStructureViewElement schemaStructureElement =
                        new DatasetEditorStructureViewElement(dataset.getSchema(), datasetEditor);
                children = new StructureViewTreeElement[] {schemaStructureElement};
            }
            else if (treeNode instanceof DBSchema) {
                DatasetEditorStructureViewElement datasetStructureElement =
                        new DatasetEditorStructureViewElement(dataset, datasetEditor);
                children = new StructureViewTreeElement[] {datasetStructureElement};
            }
            else if (treeNode instanceof DBDataset) {
                List<DBColumn> columns = dataset.getColumns();
                children = new StructureViewTreeElement[columns.size()];
                for (int i=0; i<children.length; i++) {
                    children[i] = new DatasetEditorStructureViewElement(columns.get(i), datasetEditor);
                }
                Arrays.sort(children);
View Full Code Here

            }
        }
    }

    public void openDataEditor(DatasetFilterInput filterInput) {
        DBDataset dataset = filterInput.getDataset();
        DatasetFilterManager filterManager = DatasetFilterManager.getInstance(dataset.getProject());
        filterManager.createBasicFilter(filterInput);
        DatabaseFileSystem.getInstance().openEditor(dataset);
    }
View Full Code Here

            sortingActionGroup.add(new SortAscendingAction());
            sortingActionGroup.add(new SortDescendingAction());
            add(sortingActionGroup);
        }

        DBDataset dataset = table.getDataset();
        DBColumn column = dataset.getColumn(columnInfo.getName());
        if (columnValue != null) {
            if (column.isForeignKey()) {
                DatasetFilterInput filterInput = table.getModel().resolveForeignKeyRecord(cell);
                add(new ShowReferencedRecordAction(filterInput));
            }
View Full Code Here

            super(filterByValue ? "Filter by this value" : "Filter by column...");
            this.filterByValue = filterByValue;
        }

        public void actionPerformed(AnActionEvent e) {
            DBDataset dataset = datasetEditor.getDataset();
            DatasetFilterManager datasetFilterManager = DatasetFilterManager.getInstance(dataset.getProject());
            Object value = filterByValue ? columnValue : null;
            datasetFilterManager.createBasicFilter(dataset, columnInfo.getName(), value, ConditionOperator.EQUAL, !filterByValue);
        }
View Full Code Here

    private List<DatasetSortingColumnForm> sortingInstructionForms = new ArrayList<DatasetSortingColumnForm>();
    private SortingState sortingState;


    public DatasetEditorSortingForm(DatasetEditor datasetEditor) {
        DBDataset dataset = datasetEditor.getDataset();
        sortingState = datasetEditor.getState().getSortingState();
        this.datasetRef = DBObjectRef.from(dataset);

        BoxLayout sortingInstructionsPanelLayout = new BoxLayout(sortingInstructionsPanel, BoxLayout.Y_AXIS);
        sortingInstructionsPanel.setLayout(sortingInstructionsPanelLayout);
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.object.DBDataset

Copyright © 2018 www.massapicom. 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.