use of org.apache.cayenne.dbsync.reverse.dbimport.IncludeProcedure in project cayenne by apache.
the class ProcedureNode method getStatus.
@Override
public Status getStatus(ReverseEngineering config) {
Status parentStatus = getParent().getStatus(config);
if (parentStatus != Status.INCLUDE) {
return parentStatus;
}
List<IncludeProcedure> includeProcedures = new ArrayList<>();
List<ExcludeProcedure> excludeProcedures = new ArrayList<>();
for (FilterContainer container : getContainers(config)) {
if (container == null) {
continue;
}
includeProcedures.addAll(container.getIncludeProcedures());
excludeProcedures.addAll(container.getExcludeProcedures());
}
return includesProcedure(includeProcedures, excludeProcedures);
}
use of org.apache.cayenne.dbsync.reverse.dbimport.IncludeProcedure in project cayenne by apache.
the class PatternParamTest method toIncludeProcedure.
@Test
public void toIncludeProcedure() throws Exception {
IncludeProcedure table = param.toIncludeProcedure();
assertNotNull(table);
assertEquals("test", table.getPattern());
}
use of org.apache.cayenne.dbsync.reverse.dbimport.IncludeProcedure in project cayenne by apache.
the class AddPatternParamAction method addPatternParamToContainer.
private void addPatternParamToContainer(Class paramClass, Object selectedObject, String name, DbImportTreeNode node) {
FilterContainer container = (FilterContainer) selectedObject;
PatternParam element = null;
if (paramClass == ExcludeTable.class) {
element = new ExcludeTable(name);
container.addExcludeTable((ExcludeTable) element);
} else if (paramClass == IncludeColumn.class) {
element = new IncludeColumn(name);
container.addIncludeColumn((IncludeColumn) element);
} else if (paramClass == ExcludeColumn.class) {
element = new ExcludeColumn(name);
container.addExcludeColumn((ExcludeColumn) element);
} else if (paramClass == IncludeProcedure.class) {
element = new IncludeProcedure(name);
container.addIncludeProcedure((IncludeProcedure) element);
} else if (paramClass == ExcludeProcedure.class) {
element = new ExcludeProcedure(name);
container.addExcludeProcedure((ExcludeProcedure) element);
}
node.add(new DbImportTreeNode(element));
}
Aggregations