Package com.dci.intellij.dbn.common.message

Examples of com.dci.intellij.dbn.common.message.MessageBundle


    }

    @Override
    public StatementGeneratorResult generateStatement() {
        StatementGeneratorResult result = new StatementGeneratorResult();
        MessageBundle messages = result.getMessages();

        StringBuilder statement = new StringBuilder();
        statement.append("insert into ");
        statement.append(table.getName());
        statement.append(" (\n");
View Full Code Here


    }

    @Override
    public StatementGeneratorResult generateStatement() {
        StatementGeneratorResult result = new StatementGeneratorResult();
        MessageBundle messages = result.getMessages();

        Set<DBDataset> datasets = new TreeSet<DBDataset>(DATASET_COMPARATOR);
        Set<DBColumn> columns = new TreeSet<DBColumn>(COLUMN_COMPARATOR);

        for (DBObject object : objects) {
            if (object instanceof DBColumn) {
                DBColumn column = (DBColumn) object;
                columns.add(column);
                datasets.add(column.getDataset());
            } else if (object instanceof DBDataset) {
                DBDataset dataset = (DBDataset) object;
                datasets.add(dataset);
                columns.addAll(dataset.getColumns());
            } else {
                messages.addErrorMessage(
                        "Only objects of type DATASET and COLUMN are supported for select statement generation.\n" +
                        "Please review your selection and try again.");
            }
        }

        DatasetJoinBundle joinBundle = null;
        if (datasets.size() > 1) {
            joinBundle = new DatasetJoinBundle(datasets, true);
            for (DBDataset dataset : datasets) {
                if (!joinBundle.contains(dataset)) {
                    messages.addWarningMessage("Could not join table " +
                            dataset.getName() + ". No references found to the other tables.");
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.common.message.MessageBundle

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.