Search in sources :

Example 11 with FilterContainer

use of org.apache.cayenne.dbsync.reverse.dbimport.FilterContainer 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));
}
Also used : PatternParam(org.apache.cayenne.dbsync.reverse.dbimport.PatternParam) DbImportTreeNode(org.apache.cayenne.modeler.dialog.db.load.DbImportTreeNode) FilterContainer(org.apache.cayenne.dbsync.reverse.dbimport.FilterContainer) ExcludeColumn(org.apache.cayenne.dbsync.reverse.dbimport.ExcludeColumn) ExcludeProcedure(org.apache.cayenne.dbsync.reverse.dbimport.ExcludeProcedure) IncludeColumn(org.apache.cayenne.dbsync.reverse.dbimport.IncludeColumn) IncludeProcedure(org.apache.cayenne.dbsync.reverse.dbimport.IncludeProcedure) ExcludeTable(org.apache.cayenne.dbsync.reverse.dbimport.ExcludeTable)

Aggregations

FilterContainer (org.apache.cayenne.dbsync.reverse.dbimport.FilterContainer)11 ArrayList (java.util.ArrayList)6 IncludeTable (org.apache.cayenne.dbsync.reverse.dbimport.IncludeTable)6 ReverseEngineering (org.apache.cayenne.dbsync.reverse.dbimport.ReverseEngineering)4 Catalog (org.apache.cayenne.dbsync.reverse.dbimport.Catalog)3 ExcludeTable (org.apache.cayenne.dbsync.reverse.dbimport.ExcludeTable)3 IncludeColumn (org.apache.cayenne.dbsync.reverse.dbimport.IncludeColumn)3 PatternParam (org.apache.cayenne.dbsync.reverse.dbimport.PatternParam)3 DbImportTreeNode (org.apache.cayenne.modeler.dialog.db.load.DbImportTreeNode)3 ExcludeColumn (org.apache.cayenne.dbsync.reverse.dbimport.ExcludeColumn)2 ExcludeProcedure (org.apache.cayenne.dbsync.reverse.dbimport.ExcludeProcedure)2 IncludeProcedure (org.apache.cayenne.dbsync.reverse.dbimport.IncludeProcedure)2 Collection (java.util.Collection)1 Collections (java.util.Collections)1 BiFunction (java.util.function.BiFunction)1 JTree (javax.swing.JTree)1 TreeExpansionEvent (javax.swing.event.TreeExpansionEvent)1 TreeExpansionListener (javax.swing.event.TreeExpansionListener)1 TreeNode (javax.swing.tree.TreeNode)1 TreePath (javax.swing.tree.TreePath)1