public synchronized EventType addNestableMapType(String eventTypeName, Map<String, Object> propertyTypes, Set<String> optionalSuperType, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured, boolean namedWindow, boolean insertInto) throws EventAdapterException
{
Pair<EventType[], Set<EventType>> mapSuperTypes = getMapSuperTypes(optionalSuperType);
EventTypeMetadata metadata = EventTypeMetadata.createMapType(eventTypeName, isPreconfiguredStatic, isPreconfigured, isConfigured, namedWindow, insertInto);
MapEventType newEventType = new MapEventType(metadata, eventTypeName, this, propertyTypes, mapSuperTypes.getFirst(), mapSuperTypes.getSecond());
EventType existingType = nameToTypeMap.get(eventTypeName);
if (existingType != null)
{
// The existing type must be the same as the type createdStatement
if (!newEventType.equals(existingType))
{
String message = newEventType.getEqualsMessage(existingType);
throw new EventAdapterException("Event type named '" + eventTypeName +
"' has already been declared with differing column name or type information: " + message);
}
// Since it's the same, return the existing type