Package org.jitterbit.integration.data.structure.database

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


        model.setUsageCount(selectedObjects);
    }

    private List<DatabaseObject> getTablesToInclude() {
        List<DatabaseObject> objs = Lists.newArrayList();
        DbTables tables = toEdit.getStructure().getDbTables();
        for (DatabaseObject o : toEdit.getObjects()) {
            if (o instanceof ManualSqlStatement) {
                // Patch for bug 3048875.
                // TODO: This is not ideal, because we will end up with an empty list of
                // tables in the table selection page. It seems close to impossible to
                // figure out what tables are used from the information in the mapping tree,
                // but I haven't looked very closely at it.
                continue;
            }
            String name = quotes.getSimpleName(o);
            if (!name.equals(o.getName())) {
                o = o.createCopy(name);
                isSchemaNameIncluded = true;
            }
            String aliasCheck = isSchemaNameIncluded ? quotes.getQualifiedName(o) : name;
            if (!tables.isAlias(aliasCheck)) {
                objs.add(o);
            }
        }
        return objs;
    }
View Full Code Here


        usage.put(statementDetails, 1);
        s.setDatabaseObjectsUsage(usage);
        SqlScript script = new SqlScript();
        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

            m_updatedDbTranRelations.add(getInterchangeDataRow(fields));
        }
    }

    private void addDbTables(DatabaseStructure dbStructure, String sTranId, boolean bIsSource) {
        DbTables dbTables = dbStructure.getDbTables();
        // This table only has one entry (might have one for the source and one for the target).
        String[] fields = dbTables.getColumnValues(sTranId, bIsSource);
        m_updatedDbTables.add(getInterchangeDataRow(fields));
    }
View Full Code Here

    public void applyTo(DatabaseStructure s, BeginEndQuote beginEndQuotes, boolean schemaNameIncluded) {
        // HACK: In the current version we require the names that are stored in the
        // DatabaseStructure to be the qualified name if the schema name is included.
        Map<DatabaseObject, Integer> effectiveTableUsage = getEffectiveTableUsage(schemaNameIncluded);
        DbTables tables = toDbTables(effectiveTableUsage, beginEndQuotes);
        s.setDbTables(tables);
        s.setDatabaseObjectsUsage(effectiveTableUsage);
    }
View Full Code Here

     * the data that is stored internally in this object.
     *
     * @see #getDbTables()
     */
    public void setDbTables(DbTables newTables) {
        DbTables old;
        synchronized (getDataLock()) {
            old = this.dbTables;
            this.dbTables = (newTables == null) ? new DbTables() : newTables.getCopy();
        }
        if (differs(newTables, old)) {
            firePropertyChange(DB_TABLES, old, newTables);
        }
    }
View Full Code Here

        synchronized (getDataLock()) {
            super.restoreFrom(p);
            restoreSourceId(p);
            restoreTargetId(p);
            restoreObjects(p);
            dbTables = new DbTables();
            dbTables.setTables(p.getText("DbTables"));
            dbFields = new DbFieldsPersistor().restoreFrom(p.getFirstChild("DbFields"));
            relations = new DbTranRelationsPersistor().restoreFrom(p.getFirstChild("Relations"));
            sqlScript = new SqlScriptPersistor().restoreFrom(p.getFirstChild("SqlScript"));
            treeFilters = new DbTranFiltersPersistor().restoreFrom(p.getFirstChild("Filters"));
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.structure.database.DbTables

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.