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


Java DecoratingEventBean类代码示例

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


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

示例1: processSelectExprSSWrapper

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
/**
 * NOTE: Code-generation-invoked method, method name and parameter order matters
 * @param props props
 * @param eventsPerStream events
 * @param emptyExpressions flag
 * @param eventAdapterService svc
 * @param resultEventType type
 * @return bean
 */
public static EventBean processSelectExprSSWrapper(Map<String, Object> props, EventBean[] eventsPerStream, boolean emptyExpressions, EventAdapterService eventAdapterService, EventType resultEventType) {
    EventBean theEvent = eventsPerStream[0];
    DecoratingEventBean wrapper = (DecoratingEventBean) theEvent;
    if (wrapper != null) {
        Map<String, Object> map = wrapper.getDecoratingProperties();
        if (emptyExpressions && !map.isEmpty()) {
            props = new HashMap<String, Object>(map);
        } else {
            props.putAll(map);
        }
    }

    // Using a wrapper bean since we cannot use the same event type else same-type filters match.
    // Wrapping it even when not adding properties is very inexpensive.
    return eventAdapterService.adapterForTypedWrapper(theEvent, props, resultEventType);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:26,代码来源:EvalInsertWildcardSSWrapper.java

示例2: processSpecific

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public EventBean processSpecific(Map<String, Object> props, EventBean[] eventsPerStream, boolean isNewData, boolean isSynthesize, ExprEvaluatorContext exprEvaluatorContext)
{
    DecoratingEventBean wrapper = (DecoratingEventBean)eventsPerStream[0];
    if(wrapper != null)
    {
        Map<String, Object> map = wrapper.getDecoratingProperties();
        if ((super.getExprNodes().length == 0) && (!map.isEmpty()))
        {
            props = new HashMap<String, Object>(map);
        }
        else
        {
            props.putAll(map);
        }
    }

    EventBean theEvent = eventsPerStream[0];

    // Using a wrapper bean since we cannot use the same event type else same-type filters match.
    // Wrapping it even when not adding properties is very inexpensive.
    return super.getEventAdapterService().adapterForTypedWrapper(theEvent, props, super.getResultEventType());
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:23,代码来源:EvalInsertWildcardSSWrapper.java

示例3: processSpecific

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public EventBean processSpecific(Map<String, Object> props, EventBean[] eventsPerStream, boolean isNewData, boolean isSynthesize, ExprEvaluatorContext exprEvaluatorContext)
{
    // In case of a wildcard and single stream that is itself a
    // wrapper bean, we also need to add the map properties
    DecoratingEventBean wrapper = (DecoratingEventBean)eventsPerStream[0];
    if(wrapper != null)
    {
        Map<String, Object> map = wrapper.getDecoratingProperties();
        if ((super.getExprNodes().length == 0) && (!map.isEmpty()))
        {
            props = new HashMap<String, Object>(map);
        }
        else
        {
            props.putAll(map);
        }
    }

    EventBean theEvent = eventsPerStream[0];

    // Using a wrapper bean since we cannot use the same event type else same-type filters match.
    // Wrapping it even when not adding properties is very inexpensive.
    return super.getEventAdapterService().adapterForTypedWrapper(theEvent, props, super.getResultEventType());
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:25,代码来源:EvalSelectWildcardSSWrapper.java

示例4: processSpecific

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public EventBean processSpecific(Map<String, Object> props, EventBean[] eventsPerStream, boolean isNewData, boolean isSynthesize, ExprEvaluatorContext exprEvaluatorContext)
{
    DecoratingEventBean wrapper = (DecoratingEventBean)eventsPerStream[0];
    if(wrapper != null)
    {
        Map<String, Object> map = wrapper.getDecoratingProperties();
        if ((super.getExprNodes().length == 0) && (!map.isEmpty()))
        {
            // no action
        }
        else
        {
            props.putAll(map);
        }
    }

    EventBean theEvent = eventsPerStream[0];
    return vaeProcessor.getValueAddEventBean(theEvent);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:20,代码来源:EvalInsertWildcardSSWrapperRevision.java

示例5: selectExprInsertWildcardSSWrapRevision

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
/**
 * NOTE: Code-generation-invoked method, method name and parameter order matters
 * @param eventsPerStream events
 * @param numEvaluators num evals
 * @param props props
 * @param vaeProcessor processor
 * @return bean
 */
public static EventBean selectExprInsertWildcardSSWrapRevision(EventBean[] eventsPerStream, int numEvaluators, Map<String, Object> props, ValueAddEventProcessor vaeProcessor) {
    DecoratingEventBean wrapper = (DecoratingEventBean) eventsPerStream[0];
    if (wrapper != null) {
        Map<String, Object> map = wrapper.getDecoratingProperties();
        if ((numEvaluators == 0) && (!map.isEmpty())) {
            // no action
        } else {
            props.putAll(map);
        }
    }

    EventBean theEvent = eventsPerStream[0];
    return vaeProcessor.getValueAddEventBean(theEvent);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:23,代码来源:EvalInsertWildcardSSWrapperRevision.java

示例6: get

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public Object get(EventBean event, int index) throws PropertyAccessException {
    if (!(event instanceof DecoratingEventBean)) {
        throw new PropertyAccessException("Mismatched property getter to EventBean type");
    }
    DecoratingEventBean wrapper = (DecoratingEventBean) event;
    EventBean wrapped = wrapper.getUnderlyingEvent();
    if (wrapped == null) {
        return null;
    }
    return undIndexed.get(wrapped, index);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:12,代码来源:WrapperGetterIndexed.java

示例7: eventBeanGetIndexedCodegen

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public CodegenExpression eventBeanGetIndexedCodegen(CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope, CodegenExpression beanExpression, CodegenExpression key) {
    CodegenMethodNode method = codegenMethodScope.makeChild(Object.class, WrapperGetterIndexed.class, codegenClassScope).addParam(EventBean.class, "event").addParam(int.class, "index").getBlock()
            .declareVar(DecoratingEventBean.class, "wrapper", cast(DecoratingEventBean.class, ref("event")))
            .declareVar(EventBean.class, "wrapped", exprDotMethod(ref("wrapper"), "getUnderlyingEvent"))
            .ifRefNullReturnNull("wrapped")
            .methodReturn(undIndexed.eventBeanGetIndexedCodegen(codegenMethodScope, codegenClassScope, ref("wrapped"), ref("index")));
    return localMethodBuild(method).pass(beanExpression).pass(key).call();
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:WrapperGetterIndexed.java

示例8: get

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public Object get(EventBean event, String key) throws PropertyAccessException {
    if (!(event instanceof DecoratingEventBean)) {
        throw new PropertyAccessException("Mismatched property getter to EventBean type");
    }
    DecoratingEventBean wrapper = (DecoratingEventBean) event;
    EventBean wrapped = wrapper.getUnderlyingEvent();
    if (wrapped == null) {
        return null;
    }
    return undMapped.get(wrapped, key);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:12,代码来源:WrapperGetterMapped.java

示例9: eventBeanGetMappedCodegen

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public CodegenExpression eventBeanGetMappedCodegen(CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope, CodegenExpression beanExpression, CodegenExpression key) {
    CodegenMethodNode method = codegenMethodScope.makeChild(Object.class, WrapperGetterMapped.class, codegenClassScope).addParam(EventBean.class, "event").addParam(String.class, "key").getBlock()
            .declareVar(DecoratingEventBean.class, "wrapper", cast(DecoratingEventBean.class, ref("event")))
            .declareVar(EventBean.class, "wrapped", exprDotMethod(ref("wrapper"), "getUnderlyingEvent"))
            .ifRefNullReturnNull("wrapped")
            .methodReturn(undMapped.eventBeanGetMappedCodegen(codegenMethodScope, codegenClassScope, ref("wrapped"), ref("key")));
    return localMethodBuild(method).pass(beanExpression).pass(key).call();
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:WrapperGetterMapped.java

示例10: get

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public Object get(EventBean theEvent) {
    if (!(theEvent instanceof DecoratingEventBean)) {
        throw new PropertyAccessException("Mismatched property getter to EventBean type");
    }
    DecoratingEventBean wrapperEvent = (DecoratingEventBean) theEvent;
    Map map = wrapperEvent.getDecoratingProperties();
    return mapGetter.get(eventAdapterService.adapterForTypedMap(map, underlyingMapType));
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:WrapperMapPropertyGetter.java

示例11: getFragment

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public Object getFragment(EventBean theEvent) {
    if (!(theEvent instanceof DecoratingEventBean)) {
        throw new PropertyAccessException("Mismatched property getter to EventBean type");
    }
    DecoratingEventBean wrapperEvent = (DecoratingEventBean) theEvent;
    Map map = wrapperEvent.getDecoratingProperties();
    return mapGetter.getFragment(eventAdapterService.adapterForTypedMap(map, underlyingMapType));
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:WrapperMapPropertyGetter.java

示例12: get

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public Object get(EventBean theEvent) {
    if (!(theEvent instanceof DecoratingEventBean)) {
        throw new PropertyAccessException("Mismatched property getter to EventBean type");
    }
    DecoratingEventBean wrapperEvent = (DecoratingEventBean) theEvent;
    EventBean wrappedEvent = wrapperEvent.getUnderlyingEvent();
    if (wrappedEvent == null) {
        return null;
    }
    return underlyingGetter.get(wrappedEvent);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:12,代码来源:WrapperUnderlyingPropertyGetter.java

示例13: getCodegen

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
private CodegenMethodNode getCodegen(CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) {
    return codegenMethodScope.makeChild(Object.class, this.getClass(), codegenClassScope).addParam(EventBean.class, "theEvent").getBlock()
            .declareVarWCast(DecoratingEventBean.class, "wrapperEvent", "theEvent")
            .declareVar(EventBean.class, "wrappedEvent", exprDotMethod(ref("wrapperEvent"), "getUnderlyingEvent"))
            .ifRefNullReturnNull("wrappedEvent")
            .methodReturn(underlyingGetter.eventBeanGetCodegen(ref("wrappedEvent"), codegenMethodScope, codegenClassScope));
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:8,代码来源:WrapperUnderlyingPropertyGetter.java

示例14: getFragment

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
public Object getFragment(EventBean theEvent) {
    if (!(theEvent instanceof DecoratingEventBean)) {
        throw new PropertyAccessException("Mismatched property getter to EventBean type");
    }
    DecoratingEventBean wrapperEvent = (DecoratingEventBean) theEvent;
    EventBean wrappedEvent = wrapperEvent.getUnderlyingEvent();
    if (wrappedEvent == null) {
        return null;
    }
    return underlyingGetter.getFragment(wrappedEvent);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:12,代码来源:WrapperUnderlyingPropertyGetter.java

示例15: getFragmentCodegen

import com.espertech.esper.event.DecoratingEventBean; //导入依赖的package包/类
private CodegenMethodNode getFragmentCodegen(CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) {
    return codegenMethodScope.makeChild(Object.class, this.getClass(), codegenClassScope).addParam(EventBean.class, "theEvent").getBlock()
            .declareVarWCast(DecoratingEventBean.class, "wrapperEvent", "theEvent")
            .declareVar(EventBean.class, "wrappedEvent", exprDotMethod(ref("wrapperEvent"), "getUnderlyingEvent"))
            .ifRefNullReturnNull("wrappedEvent")
            .methodReturn(underlyingGetter.eventBeanFragmentCodegen(ref("wrappedEvent"), codegenMethodScope, codegenClassScope));
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:8,代码来源:WrapperUnderlyingPropertyGetter.java


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