Class ExprPreviousNode
java.lang.Object
com.espertech.esper.common.internal.epl.expression.core.ExprNodeBase
com.espertech.esper.common.internal.epl.expression.prev.ExprPreviousNode
- All Implemented Interfaces:
ExprEnumerationEval
,ExprEnumerationForge
,ExprEvaluator
,ExprForge
,ExprForgeInstrumentable
,ExprNode
,ExprNodeRenderable
,ExprValidator
public class ExprPreviousNode
extends ExprNodeBase
implements ExprEvaluator, ExprEnumerationForge, ExprEnumerationEval, ExprForgeInstrumentable
Represents the 'prev' previous event function in an expression node tree.
-
Field Summary
Fields inherited from interface com.espertech.esper.common.internal.epl.expression.core.ExprEvaluator
EPTYPE, EPTYPEARRAY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
equalsNode
(ExprNode node, boolean ignoreStreamPrefix) Return true if a expression node semantically equals the current node, or false if not.evaluate
(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) Evaluate event tuple and return result.evaluateCodegen
(EPTypeClass requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) evaluateCodegenUninstrumented
(EPTypeClass requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) evaluateGetEventBean
(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) evaluateGetEventBeanCodegen
(CodegenMethodScope parent, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) evaluateGetROCollectionEvents
(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) evaluateGetROCollectionEventsCodegen
(CodegenMethodScope parent, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) evaluateGetROCollectionScalar
(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) evaluateGetROCollectionScalarCodegen
(CodegenMethodScope parent, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) getEventTypeCollection
(StatementRawInfo statementRawInfo, StatementCompileTimeServices compileTimeServices) getEventTypeSingle
(StatementRawInfo statementRawInfo, StatementCompileTimeServices compileTimeServices) getForge()
Returns precedence.int
boolean
boolean
void
toPrecedenceFreeEPL
(StringWriter writer, ExprNodeRenderableFlags flags) validate
(ExprValidationContext validationContext) Methods inherited from class com.espertech.esper.common.internal.epl.expression.core.ExprNodeBase
accept, accept, acceptChildnodes, addChildNode, addChildNodes, addChildNodeToFront, checkValidated, checkValidatedException, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL
-
Constructor Details
-
ExprPreviousNode
-
-
Method Details
-
getExprEvaluator
- Specified by:
getExprEvaluator
in interfaceExprForge
-
getForgeConstantType
- Specified by:
getForgeConstantType
in interfaceExprForge
-
getStreamNumber
public int getStreamNumber() -
getConstantIndexNumber
-
isConstantIndex
public boolean isConstantIndex() -
getResultType
-
getForge
-
getExprEvaluatorEnumeration
- Specified by:
getExprEvaluatorEnumeration
in interfaceExprEnumerationForge
-
getEvaluationType
- Specified by:
getEvaluationType
in interfaceExprForge
-
validate
- Specified by:
validate
in interfaceExprValidator
- Throws:
ExprValidationException
-
getPreviousType
-
isConstantResult
public boolean isConstantResult() -
evaluateGetROCollectionEvents
public Collection<EventBean> evaluateGetROCollectionEvents(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) - Specified by:
evaluateGetROCollectionEvents
in interfaceExprEnumerationEval
-
evaluateGetEventBean
public EventBean evaluateGetEventBean(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) - Specified by:
evaluateGetEventBean
in interfaceExprEnumerationEval
-
evaluateGetROCollectionScalar
public Collection evaluateGetROCollectionScalar(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) - Specified by:
evaluateGetROCollectionScalar
in interfaceExprEnumerationEval
-
evaluateGetROCollectionEventsCodegen
public CodegenExpression evaluateGetROCollectionEventsCodegen(CodegenMethodScope parent, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) - Specified by:
evaluateGetROCollectionEventsCodegen
in interfaceExprEnumerationForge
-
evaluateGetEventBeanCodegen
public CodegenExpression evaluateGetEventBeanCodegen(CodegenMethodScope parent, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) - Specified by:
evaluateGetEventBeanCodegen
in interfaceExprEnumerationForge
-
evaluateGetROCollectionScalarCodegen
public CodegenExpression evaluateGetROCollectionScalarCodegen(CodegenMethodScope parent, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) - Specified by:
evaluateGetROCollectionScalarCodegen
in interfaceExprEnumerationForge
-
getEventTypeCollection
public EventType getEventTypeCollection(StatementRawInfo statementRawInfo, StatementCompileTimeServices compileTimeServices) throws ExprValidationException - Specified by:
getEventTypeCollection
in interfaceExprEnumerationForge
- Throws:
ExprValidationException
-
getEventTypeSingle
public EventType getEventTypeSingle(StatementRawInfo statementRawInfo, StatementCompileTimeServices compileTimeServices) throws ExprValidationException - Specified by:
getEventTypeSingle
in interfaceExprEnumerationForge
- Throws:
ExprValidationException
-
getComponentTypeCollection
- Specified by:
getComponentTypeCollection
in interfaceExprEnumerationForge
- Throws:
ExprValidationException
-
evaluate
public Object evaluate(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) Description copied from interface:ExprEvaluator
Evaluate event tuple and return result.- Specified by:
evaluate
in interfaceExprEvaluator
- Parameters:
eventsPerStream
- - event tupleisNewData
- - indicates whether we are dealing with new data (istream) or old data (rstream)exprEvaluatorContext
- context for expression evaluation- Returns:
- evaluation result, a boolean value for OR/AND-type evalution nodes.
-
evaluateCodegenUninstrumented
public CodegenExpression evaluateCodegenUninstrumented(EPTypeClass requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) - Specified by:
evaluateCodegenUninstrumented
in interfaceExprForgeInstrumentable
-
evaluateCodegen
public CodegenExpression evaluateCodegen(EPTypeClass requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) - Specified by:
evaluateCodegen
in interfaceExprForge
-
toPrecedenceFreeEPL
- Specified by:
toPrecedenceFreeEPL
in classExprNodeBase
-
getPrecedence
Description copied from interface:ExprNode
Returns precedence.- Specified by:
getPrecedence
in interfaceExprNode
- Returns:
- precedence
-
getForgeRenderable
- Specified by:
getForgeRenderable
in interfaceExprEnumerationForge
- Specified by:
getForgeRenderable
in interfaceExprForge
-
equalsNode
Description copied from interface:ExprNode
Return true if a expression node semantically equals the current node, or false if not.Concrete implementations should compare the type and any additional information that impact the evaluation of a node.
- Specified by:
equalsNode
in interfaceExprNode
- Parameters:
node
- to compare toignoreStreamPrefix
- when the equals-comparison can ignore prefix of event properties- Returns:
- true if semantically equal, or false if not equals
-