Package org.jitterbit.integration.database.info

Examples of org.jitterbit.integration.database.info.DatabaseObject


    @Override
    public void setStructureToEdit(StructureToEdit toEdit) {
        // If the user has selected another object than the original one when editing the
        // structure, we do not do anything:
        DatabaseObject o = getObjectToEdit(toEdit);
        if (o != null) {
            ui.setSelectedColumns(toEdit.getStructure(), dbObject);
        }
    }
View Full Code Here


    }

    @Override
    protected DatabaseObject translate(DatabaseObject original, BeginEndQuote quotes) {
        String simpleName = quotes.getSimpleName(original);
        DatabaseObject copy = original.createCopy(simpleName);
        return copy;
    }
View Full Code Here

        @Override
        public void selectionChanged(SelectionChangedEvent evt) {
            OrderedSelection selection = (OrderedSelection) evt.getSelection();
            SelectedTables tables = new SelectedTables();
            if (!selection.isEmpty()) {
                DatabaseObject table = (DatabaseObject) selection.head();
                tables.setTableUsage(table, 1);
            }
            model.setUsageCount(tables);
        }
View Full Code Here

        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
                        boolean cellHasFocus) {
            super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
            setForeground(isSelected ? list.getSelectionForeground() : list.getForeground());
            if (value instanceof DatabaseObject) {
                DatabaseObject item = (DatabaseObject) value;
                String text = selectionModel.isSchemaNameIncluded() ? getQualifiedName(item) : item.getName();
                setText(text);
                setToolTipText(text);
                Border border = new BorderBuilder().empty(0, 10, 0, 0).add(getBorder());
                setBorder(border);
                if (disableSelectedItems && selectionModel.isTableIncluded(item)) {
View Full Code Here

    @Override
    public void setStructureToEdit(StructureToEdit toEdit) {
        // If the user has selected another object than the original one when editing the
        // structure, we do not do anything:
        DatabaseObject o = getObjectToEdit(toEdit);
        if (o != null) {
            ui.populateUi(toEdit.getStructure(), o);
        }
    }
View Full Code Here

    @Override
    public void setStructureToEdit(StructureToEdit toEdit) {
        // If the user has selected another object than the original one when editing the
        // structure, we do not do anything:
        DatabaseObject o = getObjectToEdit(toEdit);
        if (o != null) {
            SqlScript sql = toEdit.getStructure().getSqlScript();
            ui.setWhereClause(sql.getWhereClause());
            ui.setBeginEndQuotes(toEdit.getStructure().getBeginEndQuote());
        }
View Full Code Here

        if (!schemaIncluded) {
            return Maps.newHashMap(usage);
        }
        Map<DatabaseObject, Integer> eff = Maps.newHashMap();
        for (Map.Entry<DatabaseObject, Integer> e : usage.entrySet()) {
            DatabaseObject copy = e.getKey().createCopy(e.getKey().getName());
            eff.put(copy, e.getValue());
        }
        return eff;
    }
View Full Code Here

    }

    public SelectedTables withSchemaName(BeginEndQuote quotes) {
        SelectedTables withSchemaName = new SelectedTables();
        for (Map.Entry<DatabaseObject, Integer> e : usage.entrySet()) {
            DatabaseObject table = e.getKey();
            if (isSchemaNameIncluded(table, quotes)) {
                continue;
            }
            String qualName = quotes.getQualifiedName(table);
            DatabaseObject copy = table.createCopy(qualName);
            int count = e.getValue();
            withSchemaName.setTableUsage(copy, count);
        }
        return withSchemaName;
    }
View Full Code Here

        this.relations = relations;
    }

    @Override
    public String apply(DatabaseObject o) {
        DatabaseObject parent = relations.getParent(o);
        if (parent != null) {
            TableRelationship r = relations.getRelation(parent, o);
            switch (r.getRelationshipNature()) {
            case ONE_TO_N:
                return " [1 to N]";
View Full Code Here

        }
        fireTreeStructureChanged(this, new TreePath(getRoot()));
    }

    private void update(PrimaryKeys pk) {
        DatabaseObject table = pk.getDatabaseObject();
        TableNode node = tableNodes.get(table);
        if (node == null) {
            node = new TableNode(getRoot(), pk);
            tableNodes.put(table, node);
        } else {
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.database.info.DatabaseObject

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.