How Do i compare two container using filter

Hi,
I am using vaadin framework now i am using filter in sqlcontainer. my requirement was how to compare with two container. this is my code:
container1 - gettable1();
Filter filter1 = new Filter[test.testingrole.gettestid().size()]
;
List testid = test.testrole.gettestid();
for (int index = 0; index < testid.size(); index++) {
filter1[index]
= new Compare.Equal(“test_id_ref”,testid.get(index));
}
container2 = gettable2();
Filter filter2 = new Filter[test.testrole.gettestid().size()]
;
List tid = test.testrole.gettestid();
for (int index = 0; index < tid.size(); index ++) {
filter2[index]
= new Compare.Equal(“test_id_ref”, testid.get(index));
}
container1.addContainerFilter(new Or(filter1));
container2.addContainerFilter(new Or(filter2));
container2.addReference(container1, “test_id_ref”, “test_id_ref”);
setContainerDataSource(container2);

this is my filter now using i am run the code it’s no result and no exception found what was i wrongly implement if any idea for two container add the datasource…

Thanks
karthik