コード例 #1
0
 public void testCanReuse() throws Exception {
   assertFalse(factory.canReuse(new LastElementView()));
   EventType type =
       SizeView.createEventType(SupportStatementContextFactory.makeContext(), null, 1);
   assertTrue(
       factory.canReuse(new SizeView(SupportStatementContextFactory.makeContext(), type, null)));
 }
コード例 #2
0
ファイル: SizeViewFactory.java プロジェクト: triplekill/esper
 public void attach(
     EventType parentEventType,
     StatementContext statementContext,
     ViewFactory optionalParentFactory,
     List<ViewFactory> parentViewFactories)
     throws ViewParameterException {
   ExprNode[] validated =
       ViewFactorySupport.validate(
           getViewName(), parentEventType, statementContext, viewParameters, true);
   additionalProps = StatViewAdditionalProps.make(validated, 0, parentEventType);
   eventType = SizeView.createEventType(statementContext, additionalProps, streamNumber);
 }