Examples of DbTranRelations


Examples of org.jitterbit.integration.data.structure.database.DbTranRelations

    }

    protected abstract DatabaseObject translate(DatabaseObject original, BeginEndQuote quotes);

    private void processRelationships() {
        DbTranRelations original = dbStruct.getRelations();
        List<Relation> copiedJoins = Lists.newArrayList();
        for (Relation join : original.getRelations()) {
            DatabaseObject parent = translatedObjects.get(join.getParentName());
            DatabaseObject child = translatedObjects.get(join.getChildName());
            if (parent != null && child != null) {
                DatabaseColumn parentField = parent.findColumn(join.getParentField());
                DatabaseColumn childField = child.findColumn(join.getChildField());
                if (parentField != null && childField != null) {
                    TableRelationship tr = new TableRelationship(parent, child);
                    tr.setRelationshipNature(join.getCardinality());
                    FieldRelationship fr = new FieldRelationship(parentField, childField);
                    copiedJoins.add(new Relation(tr, fr));
                }
            }
        }
        DbTranRelations copy = new DbTranRelations();
        for (Relation r : copiedJoins) {
            copy.addRelation(r);
        }
        dbStruct.setRelations(copy);
    }
View Full Code Here

Examples of org.jitterbit.integration.data.structure.database.DbTranRelations

        script.setManualSqlStatement(statementDetails.getName());
        s.setSqlScript(script);
        s.setDbTables(new DbTables());
        s.setDbFields(new DbFields());
        s.setHierarchicalFilters(new DbTranFilters());
        s.setRelations(new DbTranRelations());
    }
View Full Code Here

Examples of org.jitterbit.integration.data.structure.database.DbTranRelations

     * @return a <code>List</code> of <code>String</code> arrays. Each entry in the list corresponds
     *         to a row in <code>Tran_RelationsTab</code>. An empty list is returned if there are no
     *         table relations to insert.
     */
    public List<String[]> build(DatabaseStructure structure, String tranId) {
        DbTranRelations dbTranRelations = structure.getRelations();
        for (DbTranRelations.Relation relation : dbTranRelations.getRelations()) {
            MapKey key = new MapKey(relation);
            JoinedTables tab = null;
            if (joins.containsKey(key)) {
                tab = joins.get(key);
            } else {
View Full Code Here

Examples of org.jitterbit.integration.data.structure.database.DbTranRelations

        return tables;
    }

    @Override
    public void applyTo(DatabaseStructure s) {
        DbTranRelations dbRelations = new DbTranRelations();
        setRelationships(dbRelations);
        s.setRelations(dbRelations);
    }
View Full Code Here

Examples of org.jitterbit.integration.data.structure.database.DbTranRelations

     * affect the data stored in this object.
     *
     * @see #getRelations()
     */
    public void setRelations(DbTranRelations newRelations) {
        DbTranRelations old;
        synchronized (getDataLock()) {
            old = this.relations;
            this.relations = (newRelations == null) ? new DbTranRelations() : newRelations.getCopy();
        }
        if (differs(newRelations, old)) {
            firePropertyChange(DB_RELATIONS, old, newRelations);
        }
    }
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.