View Javadoc

1   package org.jumpmind.symmetric.ext;
2   
3   import org.jumpmind.symmetric.load.IDataLoaderContext;
4   import org.jumpmind.symmetric.load.INodeGroupDataLoaderFilter;
5   
6   public class NodeGroupTestDataLoaderFilter implements INodeGroupDataLoaderFilter {
7   
8       protected int numberOfTimesCalled = 0;
9       
10      String[] nodeGroups;
11      
12      public String[] getNodeGroupIdsToApplyTo() {
13          return nodeGroups;
14      }
15  
16      public boolean filterDelete(IDataLoaderContext context, String[] keyValues) {
17          numberOfTimesCalled++;
18          return true;
19      }
20  
21      public boolean filterInsert(IDataLoaderContext context, String[] columnValues) {
22          numberOfTimesCalled++;
23          return true;
24      }
25  
26      public boolean filterUpdate(IDataLoaderContext context, String[] columnValues, String[] keyValues) {
27          numberOfTimesCalled++;
28          return true;
29      }
30  
31      public boolean isAutoRegister() {
32          return true;
33      }
34  
35      public void setNodeGroups(String[] nodeGroups) {
36          this.nodeGroups = nodeGroups;
37      }
38  
39      public int getNumberOfTimesCalled() {
40          return numberOfTimesCalled;
41      }
42  
43  }