dbArgs.setChangeInclusionPredicate(ChangeKeyPredicateBuilder.parseFullPredicate(args.getChangeCriteria()));
private MainDeployerArgs getMainDeployerArgs() { MainDeployerArgs args = new MainDeployerArgs(); if (this.tables != null || this.views != null) { MutableList<Predicate<? super ChangeKey>> predicates = Lists.mutable.empty(); if (this.tables != null) { predicates.add(ChangeKeyPredicateBuilder.newBuilder() .setChangeTypes(ChangeType.TABLE_STR, ChangeType.FOREIGN_KEY_STR, ChangeType.TRIGGER_INCREMENTAL_OLD_STR, ChangeType.STATICDATA_STR) .setObjectNames(Sets.immutable.withAll(this.tables)) .build()); } if (this.views != null) { predicates.add(ChangeKeyPredicateBuilder.newBuilder() .setChangeTypes(ChangeType.VIEW_STR) .setObjectNames(Sets.immutable.withAll(this.views)) .build()); } args.setChangeInclusionPredicate(Predicates.or(predicates)); } args.setAllChangesets(true); // for unit tests, we always want all changes to deploy return args; }
private MainDeployerArgs getMainDeployerArgs() { MainDeployerArgs args = new MainDeployerArgs(); if (this.tables != null || this.views != null) { MutableList<Predicate<? super ChangeKey>> predicates = Lists.mutable.empty(); if (this.tables != null) { predicates.add(ChangeKeyPredicateBuilder.newBuilder() .setChangeTypes(ChangeType.TABLE_STR, ChangeType.FOREIGN_KEY_STR, ChangeType.TRIGGER_INCREMENTAL_OLD_STR, ChangeType.STATICDATA_STR) .setObjectNames(Sets.immutable.withAll(this.tables)) .build()); } if (this.views != null) { predicates.add(ChangeKeyPredicateBuilder.newBuilder() .setChangeTypes(ChangeType.VIEW_STR) .setObjectNames(Sets.immutable.withAll(this.views)) .build()); } args.setChangeInclusionPredicate(Predicates.or(predicates)); } args.setAllChangesets(true); // for unit tests, we always want all changes to deploy return args; }