final EventType eventType = services.getEventAdapterService().createSemiAnonymousMapType(patternStreamSpec.getTaggedEventTypes(), patternStreamSpec.getArrayEventTypes(), usedByChildViews);
final EventStream sourceEventStream = new ZeroDepthStream(eventType);
eventStreamParentViewable[i] = sourceEventStream;
unmaterializedViewChain[i] = services.getViewService().createFactories(i, sourceEventStream.getEventType(), streamSpec.getViewSpecs(), streamSpec.getOptions(), statementContext);
EvalRootNode rootNode = services.getPatternNodeFactory().makeRootNode();
rootNode.addChildNode(patternStreamSpec.getEvalNode());
PatternMatchCallback callback = new PatternMatchCallback() {
public void matchFound(Map<String, Object> matchEvent)
{
EventBean compositeEvent = statementContext.getEventAdapterService().adaptorForTypedMap(matchEvent, eventType);
sourceEventStream.insert(compositeEvent);
}
};
PatternContext patternContext = statementContext.getPatternContextFactory().createContext(statementContext,
i, rootNode, !patternStreamSpec.getArrayEventTypes().isEmpty());
PatternStopCallback patternStopCallback = rootNode.start(callback, patternContext);
stopCallbacks.add(patternStopCallback);
}
// Create view factories and parent view based on a database SQL statement
else if (streamSpec instanceof DBStatementStreamSpec)
{