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


Java NativeEventType类代码示例

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


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

示例1: compileLimitedSelect

import com.espertech.esper.event.NativeEventType; //导入依赖的package包/类
private static List<NamedWindowSelectedProps> compileLimitedSelect(SelectClauseSpecRaw spec, String eplStatement, EventType singleType, String selectFromTypeName, String engineURI, ExprEvaluatorContext exprEvaluatorContext, MethodResolutionService methodResolutionService, EventAdapterService eventAdapterService, String statementName, String statementId, Annotation[] annotations)
{
    List<NamedWindowSelectedProps> selectProps = new LinkedList<NamedWindowSelectedProps>();
    StreamTypeService streams = new StreamTypeServiceImpl(new EventType[] {singleType}, new String[] {"stream_0"}, new boolean[] {false}, engineURI, false);

    ExprValidationContext validationContext = new ExprValidationContext(streams, methodResolutionService, null, null, null, exprEvaluatorContext, eventAdapterService, statementName, statementId, annotations, null);
    for (SelectClauseElementRaw raw : spec.getSelectExprList())
    {
        if (!(raw instanceof SelectClauseExprRawSpec))
        {
            continue;
        }
        SelectClauseExprRawSpec exprSpec = (SelectClauseExprRawSpec) raw;
        ExprNode validatedExpression;
        try
        {
            validatedExpression = ExprNodeUtility.getValidatedSubtree(exprSpec.getSelectExpression(), validationContext);
        }
        catch (ExprValidationException e)
        {
            throw new EPStatementException(e.getMessage(), e, eplStatement);
        }

        // determine an element name if none assigned
        String asName = exprSpec.getOptionalAsName();
        if (asName == null)
        {
            asName = validatedExpression.toExpressionString();
        }

        // check for fragments
        EventType fragmentType = null;
        if ((validatedExpression instanceof ExprIdentNode) && (!(singleType instanceof NativeEventType)))
        {
            ExprIdentNode identNode = (ExprIdentNode) validatedExpression;
            FragmentEventType fragmentEventType = singleType.getFragmentType(identNode.getFullUnresolvedName());
            if ((fragmentEventType != null) && (!fragmentEventType.isNative()))
            {
                fragmentType = fragmentEventType.getFragmentType();
            }
        }

        NamedWindowSelectedProps validatedElement = new NamedWindowSelectedProps(validatedExpression.getExprEvaluator().getType(), asName, fragmentType);
        selectProps.add(validatedElement);
    }

    return selectProps;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:49,代码来源:StatementLifecycleSvcImpl.java


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