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


Java EventBeanUtility.getNonemptyFirstEvent方法代码示例

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


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

示例1: evaluate

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Object evaluate(EventBean[] eventsPerStream, boolean newData, Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext,
                       ExprSubselectRowNode parent) {
    if (matchingEvents.size() > 1) {
        log.warn(parent.getMultirowMessage());
        return null;
    }

    EventBean[] events = EventBeanUtility.allocatePerStreamShift(eventsPerStream);
    events[0] = EventBeanUtility.getNonemptyFirstEvent(matchingEvents);

    Object result;
    if (parent.selectClauseEvaluator.length == 1) {
        result = parent.selectClauseEvaluator[0].evaluate(events, true, exprEvaluatorContext);
    } else {
        // we are returning a Map here, not object-array, preferring the self-describing structure
        result = parent.evaluateRow(events, true, exprEvaluatorContext);
    }
    return result;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:20,代码来源:SubselectEvalStrategyRowUnfilteredSelected.java

示例2: evaluate

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
@Override
public Object evaluate(EventBean[] eventsPerStream, boolean newData, Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext,
                       ExprSubselectRowNode parent) {
    if (matchingEvents.size() > 1) {
        log.warn(parent.getMultirowMessage());
        return null;
    }
    EventBean event = EventBeanUtility.getNonemptyFirstEvent(matchingEvents);
    return tableMetadata.getEventToPublic().convertToUnd(event, eventsPerStream, newData, exprEvaluatorContext);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:11,代码来源:SubselectEvalStrategyRowUnfilteredUnselectedTable.java

示例3: typableEvaluate

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Object[] typableEvaluate(EventBean[] eventsPerStream, boolean isNewData, Collection<EventBean> matchingEvents, ExprEvaluatorContext exprEvaluatorContext, ExprSubselectRowNode parent) {
    // take the first match only
    EventBean[] events = EventBeanUtility.allocatePerStreamShift(eventsPerStream);
    events[0] = EventBeanUtility.getNonemptyFirstEvent(matchingEvents);
    Object[] results = new Object[parent.selectClauseEvaluator.length];
    for (int i = 0; i < results.length; i++) {
        results[i] = parent.selectClauseEvaluator[i].evaluate(events, isNewData, exprEvaluatorContext);
    }
    return results;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:11,代码来源:SubselectEvalStrategyRowUnfilteredSelected.java

示例4: evaluate

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public Object evaluate(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) {
    Collection<EventBean> events = enumeration.evaluateGetROCollectionEvents(eventsPerStream, isNewData, exprEvaluatorContext);
    if (events == null || events.size() == 0) {
        return null;
    }
    return EventBeanUtility.getNonemptyFirstEvent(events);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:8,代码来源:SelectExprProcessorEnumerationCollEvalFirstRow.java

示例5: evaluateGetEventBean

import com.espertech.esper.event.EventBeanUtility; //导入方法依赖的package包/类
public EventBean evaluateGetEventBean(EventBean[] eventsPerStream, boolean newData, Collection<EventBean> matchingEvents, ExprEvaluatorContext context, ExprSubselectRowNode parent) {
    EventBean[] events = EventBeanUtility.allocatePerStreamShift(eventsPerStream);
    events[0] = EventBeanUtility.getNonemptyFirstEvent(matchingEvents);
    Map<String, Object> row = parent.evaluateRow(events, true, context);
    return parent.subselectMultirowType.getEventAdapterService().adapterForTypedMap(row, parent.subselectMultirowType.getEventType());
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:7,代码来源:SubselectEvalStrategyRowUnfilteredSelected.java


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