Search in sources :

Example 1 with ExcludeRelationship

use of org.apache.cayenne.dbsync.reverse.dbimport.ExcludeRelationship in project cayenne by apache.

the class FiltersConfigBuilder method compactRelationshipFilters.

private void compactRelationshipFilters() {
    Collection<ExcludeRelationship> engExcludeRelationship = engineering.getExcludeRelationship();
    for (Catalog catalog : engineering.getCatalogs()) {
        Collection<ExcludeRelationship> catalogExcludeRelationship = catalog.getExcludeRelationship();
        for (Schema schema : catalog.getSchemas()) {
            Collection<ExcludeRelationship> schemaExcludeRelationship = schema.getExcludeRelationship();
            for (IncludeTable includeTable : schema.getIncludeTables()) {
                includeTable.getExcludeRelationship().addAll(engExcludeRelationship);
                includeTable.getExcludeRelationship().addAll(catalogExcludeRelationship);
                includeTable.getExcludeRelationship().addAll(schemaExcludeRelationship);
            }
        }
        for (IncludeTable includeTable : catalog.getIncludeTables()) {
            includeTable.getExcludeRelationship().addAll(engExcludeRelationship);
            includeTable.getExcludeRelationship().addAll(catalogExcludeRelationship);
        }
    }
    for (Schema schema : engineering.getSchemas()) {
        Collection<ExcludeRelationship> schemaExcludeRelationship = schema.getExcludeRelationship();
        for (IncludeTable includeTable : schema.getIncludeTables()) {
            includeTable.getExcludeRelationship().addAll(engExcludeRelationship);
            includeTable.getExcludeRelationship().addAll(schemaExcludeRelationship);
        }
    }
    for (IncludeTable includeTable : engineering.getIncludeTables()) {
        includeTable.getExcludeRelationship().addAll(engExcludeRelationship);
    }
}
Also used : ExcludeRelationship(org.apache.cayenne.dbsync.reverse.dbimport.ExcludeRelationship) Schema(org.apache.cayenne.dbsync.reverse.dbimport.Schema) IncludeTable(org.apache.cayenne.dbsync.reverse.dbimport.IncludeTable) Catalog(org.apache.cayenne.dbsync.reverse.dbimport.Catalog)

Example 2 with ExcludeRelationship

use of org.apache.cayenne.dbsync.reverse.dbimport.ExcludeRelationship in project cayenne by apache.

the class PatternParam method toExcludeRelationship.

ExcludeRelationship toExcludeRelationship() {
    ExcludeRelationship excludeRelationship = new ExcludeRelationship();
    excludeRelationship.setPattern(pattern);
    return excludeRelationship;
}
Also used : ExcludeRelationship(org.apache.cayenne.dbsync.reverse.dbimport.ExcludeRelationship)

Aggregations

ExcludeRelationship (org.apache.cayenne.dbsync.reverse.dbimport.ExcludeRelationship)2 Catalog (org.apache.cayenne.dbsync.reverse.dbimport.Catalog)1 IncludeTable (org.apache.cayenne.dbsync.reverse.dbimport.IncludeTable)1 Schema (org.apache.cayenne.dbsync.reverse.dbimport.Schema)1