Package com.dci.intellij.dbn.editor.data

Examples of com.dci.intellij.dbn.editor.data.DatasetEditorError


                    dataType.setValueToResultSet(resultSet, columnIndex, userValue);
                }

                if (!row.isInsert()) resultSet.updateRow();
            } catch (Exception e) {
                DatasetEditorError error = new DatasetEditorError(getConnectionHandler(), e);

                // error may affect other cells in the row (e.g. foreign key constraint for multiple primary key)
                if (e instanceof SQLException) getRow().notifyError(error, false, !bulk);

                // if error was not notified yet on row level, notify it on cell isolation level
                if (!error.isNotified()) notifyError(error, !bulk);
            } finally {
                if (!sameValue) {
                    if (!isLargeObject) {
                        setUserValue(userValue);
                    }
View Full Code Here


    }

    public void updateUserValue(Object userValue, String errorMessage) {
        if (!CommonUtil.safeEqual(userValue, getUserValue()) || hasError()) {
            DatasetEditorModelRow row = getRow();
            DatasetEditorError error = new DatasetEditorError(errorMessage, getColumnInfo().getColumn());
            getRow().notifyError(error, true, true);
            setUserValue(userValue);
            ConnectionHandler connectionHandler = getConnectionHandler();
            if (!row.isInsert() && !connectionHandler.isAutoCommit()) {
                isModified = true;
View Full Code Here

                row.setNew(true);
                isModified = true;
                isInserting = false;
                if (rebuild) load(true, true);
            } catch (SQLException e) {
                DatasetEditorError error = new DatasetEditorError(getConnectionHandler(), e);
                row.notifyError(error, true, true);
                if (error.isNotified()) {
                    try {
                        resultSet.moveToInsertRow();
                    } catch (SQLException e1) {
                        e1.printStackTrace();
                    }
                }

                if (!error.isNotified() || propagateError) throw e;
            }
        }
    }
View Full Code Here

    private DatasetEditorModelCell cell;
    private JBPopup popup;

    public DatasetEditorErrorForm(DatasetEditorModelCell cell) {
        this.cell = cell;
        DatasetEditorError error = cell.getError();
        error.addChangeListener(this);
        errorIconLabel.setIcon(Icons.EXEC_MESSAGES_ERROR);
        errorIconLabel.setText("");
        errorMessageTextArea.setText(StringUtil.wrap(error.getMessage(), 60, ": ,."));
        Color backgroundColor = BACKGROUND_COLOR;
        errorMessageTextArea.setBackground(backgroundColor);
        errorMessageTextArea.setFont(mainPanel.getFont());
        mainPanel.setBackground(backgroundColor);
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.editor.data.DatasetEditorError

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.