本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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);
}
示例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());
}