Examples of DatabaseObject


Examples of liquibase.structure.DatabaseObject

    public DatabaseObject snapshot(DatabaseObject example, DatabaseSnapshot snapshot, SnapshotGeneratorChain chain) throws DatabaseException, InvalidExampleException {
        if (defaultFor != null && defaultFor.isAssignableFrom(example.getClass())) {
            return snapshotObject(example, snapshot);
        }

        DatabaseObject chainResponse = chain.snapshot(example, snapshot);
        if (chainResponse == null) {
            return null;
        }

        if (shouldAddTo(example.getClass(), snapshot)) {
View Full Code Here

Examples of liquibase.structure.DatabaseObject

        return addsTo;
    }

    public final DatabaseObject snapshot(DatabaseObject example, DatabaseSnapshot snapshot, SnapshotGeneratorChain chain) throws DatabaseException, InvalidExampleException {
        if (defaultFor != null && defaultFor.isAssignableFrom(example.getClass())) {
            DatabaseObject result = snapshotObject(example, snapshot);
            return result;
        }
        DatabaseObject chainResponse = chain.snapshot(example, snapshot);
        if (chainResponse == null) {
            return null;
        }
        if (addsTo() != null) {
            for (Class<? extends DatabaseObject> addType : addsTo()) {
View Full Code Here

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

            test.dispose();
        }
    }

    private static void testUsingMetaData(DatabaseColumnRetrieverTest test) throws SQLException {
        DatabaseObject table = new DatabaseTable("sourcestab", null);
        test.listColumns(table);
    }
View Full Code Here

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

        DatabaseObject table = new DatabaseTable("sourcestab", null);
        test.listColumns(table);
    }

    private static void testManualSqlStatement(DatabaseColumnRetrieverTest test) throws SQLException {
        DatabaseObject table = new ManualSqlStatement("select * from sourcestab where (1=2)");
        test.listColumns(table);
    }
View Full Code Here

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

        @Override
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
                        boolean hasFocus, int row, int column) {
            super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            DatabaseObject item = (DatabaseObject) value;
            String text = selectionModel.isSchemaNameIncluded() ? getQualifiedName(item) : item.getName();
            setText(text);
            return this;
        }
View Full Code Here

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

    }

    private void processTables() {
        translatedObjects = Maps.newLinkedHashMap();
        for (int n = 0; n < tables.length; ++n) {
            DatabaseObject original = tables[n];
            DatabaseObject copy = translate(original, quotes);
            translatedObjects.put(original.getName(), copy);
            tables[n] = copy;
        }
    }
View Full Code Here

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

    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));
View Full Code Here

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

    private void processFilters() {
        DbTranFilters original = dbStruct.getHierarchicalFilters();
        List<Entry> copiedEntries = Lists.newArrayList();
        for (Entry e : original.getAllEntries()) {
            DatabaseObject table = translatedObjects.get(e.getTableName());
            if (table != null) {
                DatabaseColumn column = table.getColumn(e.getColumnName());
                if (column != null) {
                    copiedEntries.add(new Entry(table.getName(), column.getName(), e.getCondition(), e.getSortOrder()));
                }
            }
        }
        DbTranFilters copiedFilters = new DbTranFilters();
        for (Entry e : copiedEntries) {
View Full Code Here

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

                List<DatabaseColumn> updateKeys = Lists.newArrayList();
                for (String part : e.getKeyFields().split(DbFields.FIELD_SEPARATOR)) {
                    int sep = part.lastIndexOf('.');
                    String tableName = part.substring(0, sep);
                    String columnName = part.substring(sep + 1);
                    DatabaseObject table = translatedObjects.get(tableName);
                    if (table != null) {
                        DatabaseColumn column = table.findColumn(columnName);
                        if (column != null) {
                            updateKeys.add(column);
                        }
                    }
                }
View Full Code Here

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

    }

    @Override
    protected DatabaseObject translate(DatabaseObject original, BeginEndQuote quotes) {
        String qualName = quotes.getQualifiedName(original);
        DatabaseObject copy = original.createCopy(qualName);
        return copy;
    }
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.