|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.view.ViewFactorySupport
public abstract class ViewFactorySupport
Abstract base class for view factories that do not make re-useable views and that do not share view resources with expression nodes.
Constructor Summary | |
---|---|
ViewFactorySupport()
|
Method Summary | |
---|---|
static void |
assertReturnsNonConstant(java.lang.String viewName,
ExprNode expression,
int index)
Assert and throws an exception if the expression passed returns a non-constant value. |
boolean |
canReuse(View view)
Determines if the given view could be used instead of creating a new view, requires the view factory to compare view type, parameters and other capabilities provided. |
static java.lang.Object |
evaluateAssertNoProperties(java.lang.String viewName,
ExprNode expression,
int index,
ExprEvaluatorContext exprEvaluatorContext)
Assert and throws an exception if the expression uses event property values. |
static ExprNode[] |
validate(java.lang.String viewName,
EventType eventType,
StatementContext statementContext,
java.util.List<ExprNode> expressions,
boolean allowConstantResult)
Validate the view parameter expressions and return the validated expression for later execution. |
static java.lang.Object |
validateAndEvaluate(java.lang.String viewName,
StatementContext statementContext,
ExprNode expression)
Validate the view parameter expression and evaluate the expression returning the result object. |
static java.util.List<java.lang.Object> |
validateAndEvaluate(java.lang.String viewName,
StatementContext statementContext,
java.util.List<ExprNode> expressions)
Validate the view parameter expressions and evaluate the expressions returning the result object. |
static ExprNode |
validateExpr(java.lang.String viewName,
StatementContext statementContext,
ExprNode expression,
StreamTypeService streamTypeService,
int expressionNumber)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.espertech.esper.view.ViewFactory |
---|
attach, getEventType, getViewName, makeView, setViewParameters |
Constructor Detail |
---|
public ViewFactorySupport()
Method Detail |
---|
public boolean canReuse(View view)
ViewFactory
canReuse
in interface ViewFactory
view
- is the candidate view to compare to
public static java.lang.Object validateAndEvaluate(java.lang.String viewName, StatementContext statementContext, ExprNode expression) throws ViewParameterException
viewName
- textual name of viewstatementContext
- context with statement servicesexpression
- view expression parameter to validate
ViewParameterException
- if the expressions fail to validatepublic static java.util.List<java.lang.Object> validateAndEvaluate(java.lang.String viewName, StatementContext statementContext, java.util.List<ExprNode> expressions) throws ViewParameterException
viewName
- textual name of viewstatementContext
- context with statement servicesexpressions
- view expression parameter to validate
ViewParameterException
- if the expressions fail to validatepublic static ExprNode[] validate(java.lang.String viewName, EventType eventType, StatementContext statementContext, java.util.List<ExprNode> expressions, boolean allowConstantResult) throws ViewParameterException
Does not evaluate the expression.
viewName
- textual name of vieweventType
- is the event type of the parent view or stream attached.statementContext
- context with statement servicesexpressions
- view expression parameter to validateallowConstantResult
- true to indicate whether expressions that return a constant
result should be allowed; false to indicate that if an expression is known to return a constant result
the expression is considered invalid
ViewParameterException
- if the expressions fail to validatepublic static void assertReturnsNonConstant(java.lang.String viewName, ExprNode expression, int index) throws ViewParameterException
viewName
- textual name of viewexpression
- expression to checkindex
- number offset of expression in view parameters
ViewParameterException
- if assertion failspublic static java.lang.Object evaluateAssertNoProperties(java.lang.String viewName, ExprNode expression, int index, ExprEvaluatorContext exprEvaluatorContext) throws ViewParameterException
viewName
- textual name of viewexpression
- expression to checkindex
- number offset of expression in view parametersexprEvaluatorContext
- context for expression evaluation
ViewParameterException
- if assertion failspublic static ExprNode validateExpr(java.lang.String viewName, StatementContext statementContext, ExprNode expression, StreamTypeService streamTypeService, int expressionNumber) throws ViewParameterException
ViewParameterException
|
© 2006-2014 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |