Examples of DatabaseObject


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

        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

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

        }
        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

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

        }

        @Override
        protected void run(List<DatabaseObject> selected) {
            if (selected.size() == 2) {
                DatabaseObject o1 = selected.get(0);
                DatabaseObject o2 = selected.get(1);
                if (relations.getParent(o1) == o2) {
                    defineLinkKeys(o2, o1);
                } else if (relations.getParent(o2) == o1) {
                    defineLinkKeys(o1, o2);
                }
            } else if (selected.size() == 1) {
                DatabaseObject child = selected.get(0);
                DatabaseObject parent = relations.getParent(child);
                if (parent != null) {
                    defineLinkKeys(parent, child);
                }
            }
        }
View Full Code Here

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

        }

        @Override
        public boolean apply(List<DatabaseObject> objects) {
            if (objects.size() == 2) {
                DatabaseObject o1 = objects.get(0);
                DatabaseObject o2 = objects.get(1);
                return relations.getParent(o1) == o2 || relations.getParent(o2) == o1;
            } else if (objects.size() == 1) {
                return relations.getParent(objects.get(0)) != null;
            }
            return false;
View Full Code Here

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

        parentSelector.repaint();
        childSelector.repaint();
    }

    public TableRelationship getSelectedRelationship() {
        DatabaseObject parent = getSelectedParent();
        DatabaseObject child = getSelectedChild();
        if (isValidRelation(parent, child)) {
            return new TableRelationship(parent, child);
        }
        return null;
    }
View Full Code Here

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

                        boolean cellHasFocus) {
            super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
            if (value == null) {
                setText("Select Child Table");
            } else {
                DatabaseObject child = (DatabaseObject) value;
                setEnabled(isEnabledFor(child));
            }
            return this;
        }
View Full Code Here

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

            validateSelection();
            updateEnabledStateTracker();
        }
       
        private void validateSelection() {
            DatabaseObject child = getSelectedChild();
            if (child == null) {
                return;
            }
            DatabaseObject parent = getSelectedParent();
            boolean valid = validator.isValidJoin(parent, child);
            if (!valid) {
                childSelector.setSelectedIndex(-1);
            }
        }
View Full Code Here

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

     * inserted depends on the current contents of this text area. The expression replaces the
     * current selection, or is inserted at the current caret position if nothing is selected.
     */
    @Override
    public void insertColumns(List<DatabaseColumn> cols) {
        DatabaseObject table = null;
        StringBuilder columnString = new StringBuilder();
        for (DatabaseColumn col : cols) {
            if (table == null) {
                table = col.getDatabaseObject();
            }
View Full Code Here

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

                if (treeTableNode.getChildCount() > 0) {
                    return;
                }
                Object object = treeTableNode.getUserObject();
                if (object instanceof DatabaseObject) {
                    DatabaseObject table = (DatabaseObject) object;
                    controller.downloadColumns(table);
                }
            }
        }
View Full Code Here

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

        Node root = tableTree.getRoot();
        return addTableDefinition(root);
    }

    private boolean addTableDefinition(Node node) {
        DatabaseObject table = node.getTable();
        String tableName = getTableName(table);
        if (tableName == null) {
            return false;
        }
        xsd.addElement("element");
        String sanitizedName = sanitizeName(tableName);
        xsd.addAttribute("name", sanitizedName);
        applyCardinality(node.getCardinality());
        xsd.addElement("complexType");
        xsd.addElement("sequence");
        for (DatabaseColumn column : table.getAllColumns()) {
            addColumnDefinition(column);
        }
        for (Node child : node.getChildren()) {
            // No need to check the return value, since only the root table can result
            // in false being returned (for a manual sql statement).
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.