当前位置: 首页>>代码示例>>Java>>正文


Java ObjectArrayEventType.getEqualsMessage方法代码示例

本文整理汇总了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;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:34,代码来源:EventAdapterServiceImpl.java


注:本文中的com.espertech.esper.event.arr.ObjectArrayEventType.getEqualsMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。