當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。