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