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