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


Java EventTypeMetadata.createNonPojoApplicationType方法代码示例

本文整理汇总了Java中com.espertech.esper.event.EventTypeMetadata.createNonPojoApplicationType方法的典型用法代码示例。如果您正苦于以下问题:Java EventTypeMetadata.createNonPojoApplicationType方法的具体用法?Java EventTypeMetadata.createNonPojoApplicationType怎么用?Java EventTypeMetadata.createNonPojoApplicationType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.espertech.esper.event.EventTypeMetadata的用法示例。


在下文中一共展示了EventTypeMetadata.createNonPojoApplicationType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public void setUp() {
    eventAdapterService = SupportEventAdapterService.getService();

    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.MAP, "typename", true, true, true, false, false);
    Map<String, Object> testTypesMap = new HashMap<String, Object>();
    testTypesMap.put("myInt", Integer.class);
    testTypesMap.put("myString", String.class);
    testTypesMap.put("myNullableString", String.class);
    testTypesMap.put("mySupportBean", SupportBean.class);
    testTypesMap.put("myComplexBean", SupportBeanComplexProps.class);
    testTypesMap.put("myNullableSupportBean", SupportBean.class);
    testTypesMap.put("myNullType", null);
    eventType = new MapEventType(metadata, "", 1, eventAdapterService, testTypesMap, null, null, null);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:15,代码来源:TestMapEventType.java

示例2: testEquals

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public void testEquals() {
    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.MAP, "", true, true, true, false, false);

    Map<String, Object> mapTwo = new LinkedHashMap<String, Object>();
    mapTwo.put("myInt", int.class);
    mapTwo.put("mySupportBean", SupportBean.class);
    mapTwo.put("myNullableSupportBean", SupportBean.class);
    mapTwo.put("myComplexBean", SupportBeanComplexProps.class);
    assertFalse((new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)).equals(eventType));
    mapTwo.put("myString", String.class);
    mapTwo.put("myNullableString", String.class);
    mapTwo.put("myNullType", null);

    // compare, should equal
    assertTrue(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null).equalsCompareType(eventType));
    assertFalse((new MapEventType(metadata, "google", 1, eventAdapterService, mapTwo, null, null, null)).equalsCompareType(eventType));

    mapTwo.put("xx", int.class);
    assertFalse(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));
    mapTwo.remove("xx");
    assertTrue(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));

    mapTwo.put("myInt", Integer.class);
    assertTrue(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));
    mapTwo.remove("myInt");
    assertFalse(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));
    mapTwo.put("myInt", int.class);
    assertTrue(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));

    // Test boxed and primitive compatible
    Map<String, Object> mapOne = new LinkedHashMap<String, Object>();
    mapOne.put("myInt", int.class);
    mapTwo = new LinkedHashMap<String, Object>();
    mapTwo.put("myInt", Integer.class);
    assertTrue(new MapEventType(metadata, "T1", 1, eventAdapterService, mapOne, null, null, null).equalsCompareType(new MapEventType(metadata, "T1", 1, eventAdapterService, mapTwo, null, null, null)));
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:37,代码来源:TestMapEventType.java

示例3: setUp

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public void setUp() {
    testTypesMap = new HashMap<String, Object>();
    testTypesMap.put("aString", String.class);
    testTypesMap.put("anInt", Integer.class);
    testTypesMap.put("myComplexBean", SupportBeanComplexProps.class);

    testValuesMap = new HashMap<String, Object>();
    testValuesMap.put("aString", "test");
    testValuesMap.put("anInt", 10);
    testValuesMap.put("myComplexBean", supportBean);

    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.MAP, "testtype", true, true, true, false, false);
    eventType = new MapEventType(metadata, "", 1, SupportEventAdapterService.getService(), testTypesMap, null, null, null);
    eventBean = new MapEventBean(testValuesMap, eventType);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:16,代码来源:TestMapEventBean.java

示例4: setUp

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public void setUp() {
    eventAdapterService = SupportEventAdapterService.getService();

    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.OBJECTARR, "typename", true, true, true, false, false);
    String[] names = {"myInt", "myIntBoxed", "myString", "mySupportBean", "myComplexBean", "myNullType"};
    Object[] types = {Integer.class, Integer.class, String.class, SupportBean.class, SupportBeanComplexProps.class, null};

    Map<String, Object> namesAndTypes = new LinkedHashMap<String, Object>();
    for (int i = 0; i < names.length; i++) {
        namesAndTypes.put(names[i], types[i]);
    }

    eventType = new ObjectArrayEventType(metadata, "typename", 1, eventAdapterService, namesAndTypes, null, null, null);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:15,代码来源:TestObjectArrayEventType.java

示例5: setUp

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public void setUp() {
    testProps = new String[]{"aString", "anInt", "myComplexBean"};
    testTypes = new Object[]{String.class, Integer.class, SupportBeanComplexProps.class};
    Map<String, Object> typeRep = new LinkedHashMap<String, Object>();
    for (int i = 0; i < testProps.length; i++) {
        typeRep.put(testProps[i], testTypes[i]);
    }

    testValues = new Object[]{"test", 10, supportBean};

    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.OBJECTARR, "testtype", true, true, true, false, false);
    eventType = new ObjectArrayEventType(metadata, "", 1, SupportEventAdapterService.getService(), typeRep, null, null, null);
    eventBean = new ObjectArrayEventBean(testValues, eventType);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:15,代码来源:TestObjectArrayEventBean.java

示例6: setUp

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public void setUp()
{
    eventAdapterService = SupportEventAdapterService.getService();

    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.MAP, "typename", true, true, true, false, false);
    Map<String, Object> testTypesMap = new HashMap<String, Object>();
    testTypesMap.put("myInt", int.class);
    testTypesMap.put("myString", String.class);
    testTypesMap.put("myNullableString", String.class);
    testTypesMap.put("mySupportBean", SupportBean.class);
    testTypesMap.put("myComplexBean", SupportBeanComplexProps.class);
    testTypesMap.put("myNullableSupportBean", SupportBean.class);
    testTypesMap.put("myNullType", null);
    eventType = new MapEventType(metadata, "", 1, eventAdapterService, testTypesMap, null, null, null);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:16,代码来源:TestMapEventType.java

示例7: testEquals

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public void testEquals()
{
    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.MAP, "", true, true, true, false, false);

    Map<String, Object> mapTwo = new LinkedHashMap<String, Object>();
    mapTwo.put("myInt", int.class);
    mapTwo.put("mySupportBean", SupportBean.class);
    mapTwo.put("myNullableSupportBean", SupportBean.class);
    mapTwo.put("myComplexBean", SupportBeanComplexProps.class);
    assertFalse((new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)).equals(eventType));
    mapTwo.put("myString", String.class);
    mapTwo.put("myNullableString", String.class);
    mapTwo.put("myNullType", null);

    // compare, should equal
    assertTrue(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null).equalsCompareType(eventType));
    assertFalse((new MapEventType(metadata, "google", 1, eventAdapterService, mapTwo, null, null, null)).equalsCompareType(eventType));

    mapTwo.put("xx", int.class);
    assertFalse(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));
    mapTwo.remove("xx");
    assertTrue(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));

    mapTwo.put("myInt", Integer.class);
    assertTrue(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));
    mapTwo.remove("myInt");
    assertFalse(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));
    mapTwo.put("myInt", int.class);
    assertTrue(eventType.equalsCompareType(new MapEventType(metadata, "", 1, eventAdapterService, mapTwo, null, null, null)));

    // Test boxed and primitive compatible
    Map<String, Object> mapOne = new LinkedHashMap<String, Object>();
    mapOne.put("myInt", int.class);
    mapTwo = new LinkedHashMap<String, Object>();
    mapTwo.put("myInt", Integer.class);
    assertTrue(new MapEventType(metadata, "T1", 1, eventAdapterService, mapOne, null, null, null).equalsCompareType(new MapEventType(metadata, "T1", 1, eventAdapterService, mapTwo, null, null, null)));
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:38,代码来源:TestMapEventType.java

示例8: setUp

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public void setUp() {
    eventAdapterService = SupportEventAdapterService.getService();

    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.OBJECTARR, "typename", true, true, true, false, false);
    String[] names = {"myInt", "myIntBoxed", "myString", "mySupportBean", "myComplexBean", "myNullType"};
    Object[] types = {int.class, Integer.class, String.class, SupportBean.class, SupportBeanComplexProps.class, null};

    Map<String, Object> namesAndTypes = new LinkedHashMap<String, Object>();
    for (int i = 0; i < names.length; i++) {
        namesAndTypes.put(names[i], types[i]);
    }

    eventType = new ObjectArrayEventType(metadata, "typename", 1, eventAdapterService, namesAndTypes, null, null, null);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:15,代码来源:TestObjectArrayEventType.java

示例9: makeAvroSupportEventType

import com.espertech.esper.event.EventTypeMetadata; //导入方法依赖的package包/类
public static AvroEventType makeAvroSupportEventType(Schema schema) {
    EventTypeMetadata metadata = EventTypeMetadata.createNonPojoApplicationType(EventTypeMetadata.ApplicationType.AVRO, "typename", true, true, true, false, false);
    return new AvroEventType(metadata, "typename", 1, SupportEventAdapterService.getService(), schema, null, null, null, null);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:5,代码来源:SupportAvroUtil.java


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