本文整理汇总了Java中com.espertech.esper.event.arr.ObjectArrayEventType.getEqualsMessage方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectArrayEventType.getEqualsMessage方法的具体用法?Java ObjectArrayEventType.getEqualsMessage怎么用?Java ObjectArrayEventType.getEqualsMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.event.arr.ObjectArrayEventType
的用法示例。
在下文中一共展示了ObjectArrayEventType.getEqualsMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addNestableObjectArrayType
import com.espertech.esper.event.arr.ObjectArrayEventType; //导入方法依赖的package包/类
public synchronized EventType addNestableObjectArrayType(String eventTypeName, Map<String, Object> propertyTypesMayHavePrimitive, ConfigurationEventTypeObjectArray optionalConfig, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured, boolean namedWindow, boolean insertInto, boolean table, String tableName) throws EventAdapterException {
if (optionalConfig != null && optionalConfig.getSuperTypes().size() > 1) {
throw new EventAdapterException(ConfigurationEventTypeObjectArray.SINGLE_SUPERTYPE_MSG);
}
Pair<EventType[], Set<EventType>> mapSuperTypes = EventTypeUtility.getSuperTypesDepthFirst(optionalConfig, EventUnderlyingType.OBJECTARRAY, nameToTypeMap);
EventTypeMetadata metadata;
if (table) {
metadata = EventTypeMetadata.createTable(tableName);
} else {
metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.OBJECTARR, eventTypeName, isPreconfiguredStatic, isPreconfigured, isConfigured, namedWindow, insertInto);
}
int typeId = eventTypeIdGenerator.getTypeId(eventTypeName);
Map<String, Object> propertyTypes = EventTypeUtility.getPropertyTypesNonPrimitive(propertyTypesMayHavePrimitive);
ObjectArrayEventType newEventType = new ObjectArrayEventType(metadata, eventTypeName, typeId, this, propertyTypes, optionalConfig, 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.equalsCompareType(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
return existingType;
}
nameToTypeMap.put(eventTypeName, newEventType);
return newEventType;
}