if ((!groupByFactory.isEmpty()) && (mergeFactory.iterator().next() != (viewFactories.size() - 1)))
{
throw new ViewProcessingException("The merge view cannot be used in conjuntion with multiple data windows");
}
GroupByViewFactory groupByViewFactory = null;
MergeViewFactory mergeViewFactory = null;
if (!groupByFactory.isEmpty())
{
groupByViewFactory = (GroupByViewFactory) viewFactories.remove(0);
mergeViewFactory = (MergeViewFactory) viewFactories.remove(viewFactories.size() - 1);