}
ViewFactory retainPolicy;
if (isUnion)
{
UnionViewFactory viewFactory = (UnionViewFactory) context.getViewResolutionService().create("internal", "union");
viewFactory.setParentEventType(parentEventType);
viewFactory.setViewFactories(dataWindowViews);
retainPolicy = viewFactory;
}
else
{
IntersectViewFactory viewFactory = (IntersectViewFactory) context.getViewResolutionService().create("internal", "intersect");
viewFactory.setParentEventType(parentEventType);
viewFactory.setViewFactories(dataWindowViews);
retainPolicy = viewFactory;
}
List<ViewFactory> nonRetainViewFactories = new ArrayList<ViewFactory>();
nonRetainViewFactories.add(retainPolicy);