public class ExprPreviousNode extends ExprNodeBase implements ExprEvaluator, ExprEnumerationForge, ExprEnumerationEval, ExprForge
Constructor and Description |
---|
ExprPreviousNode(ExprPreviousNodePreviousType previousType) |
Modifier and Type | Method and Description |
---|---|
boolean |
equalsNode(ExprNode node,
boolean ignoreStreamPrefix)
Return true if a expression node semantically equals the current node, or false if not.
|
java.lang.Object |
evaluate(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext exprEvaluatorContext)
Evaluate event tuple and return result.
|
CodegenExpression |
evaluateCodegen(java.lang.Class requiredType,
CodegenMethodScope codegenMethodScope,
ExprForgeCodegenSymbol exprSymbol,
CodegenClassScope codegenClassScope) |
EventBean |
evaluateGetEventBean(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context) |
CodegenExpression |
evaluateGetEventBeanCodegen(CodegenMethodScope codegenMethodScope,
ExprForgeCodegenSymbol exprSymbol,
CodegenClassScope codegenClassScope) |
java.util.Collection<EventBean> |
evaluateGetROCollectionEvents(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context) |
CodegenExpression |
evaluateGetROCollectionEventsCodegen(CodegenMethodScope codegenMethodScope,
ExprForgeCodegenSymbol exprSymbol,
CodegenClassScope codegenClassScope) |
java.util.Collection |
evaluateGetROCollectionScalar(EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context) |
CodegenExpression |
evaluateGetROCollectionScalarCodegen(CodegenMethodScope codegenMethodScope,
ExprForgeCodegenSymbol exprSymbol,
CodegenClassScope codegenClassScope) |
ExprForgeComplexityEnum |
getComplexity() |
java.lang.Class |
getComponentTypeCollection() |
java.lang.Integer |
getConstantIndexNumber() |
java.lang.Class |
getEvaluationType() |
EventType |
getEventTypeCollection(EventAdapterService eventAdapterService,
int statementId) |
EventType |
getEventTypeSingle(EventAdapterService eventAdapterService,
int statementId) |
ExprEvaluator |
getExprEvaluator() |
ExprEnumerationEval |
getExprEvaluatorEnumeration() |
ExprForge |
getForge() |
ExprNode |
getForgeRenderable() |
ExprPrecedenceEnum |
getPrecedence()
Returns precedence.
|
ExprPreviousNodePreviousType |
getPreviousType() |
java.lang.Class |
getResultType() |
int |
getStreamNumber() |
int |
hashCode() |
boolean |
isConstantIndex() |
boolean |
isConstantResult()
Returns true if the expression node's evaluation value doesn't depend on any events data,
as must be determined at validation time, which is bottom-up and therefore
reliably allows each node to determine constant value.
|
void |
setEvaluator(ExprPreviousEvalStrategy evaluator) |
void |
toPrecedenceFreeEPL(java.io.StringWriter writer) |
ExprNode |
validate(ExprValidationContext validationContext) |
accept, accept, acceptChildnodes, addChildNode, addChildNodes, addChildNodeToFront, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL
public ExprPreviousNode(ExprPreviousNodePreviousType previousType)
public ExprEvaluator getExprEvaluator()
getExprEvaluator
in interface ExprForge
public void setEvaluator(ExprPreviousEvalStrategy evaluator)
public int getStreamNumber()
public java.lang.Integer getConstantIndexNumber()
public boolean isConstantIndex()
public java.lang.Class getResultType()
public ExprEnumerationEval getExprEvaluatorEnumeration()
getExprEvaluatorEnumeration
in interface ExprEnumerationForge
public java.lang.Class getEvaluationType()
getEvaluationType
in interface ExprForge
public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException
validate
in interface ExprValidator
ExprValidationException
public ExprPreviousNodePreviousType getPreviousType()
public boolean isConstantResult()
ExprNode
isConstantResult
in interface ExprNode
public java.util.Collection<EventBean> evaluateGetROCollectionEvents(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
evaluateGetROCollectionEvents
in interface ExprEnumerationEval
public CodegenExpression evaluateGetROCollectionEventsCodegen(CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope)
evaluateGetROCollectionEventsCodegen
in interface ExprEnumerationForge
public EventBean evaluateGetEventBean(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
evaluateGetEventBean
in interface ExprEnumerationEval
public CodegenExpression evaluateGetEventBeanCodegen(CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope)
evaluateGetEventBeanCodegen
in interface ExprEnumerationForge
public java.util.Collection evaluateGetROCollectionScalar(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
evaluateGetROCollectionScalar
in interface ExprEnumerationEval
public CodegenExpression evaluateGetROCollectionScalarCodegen(CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope)
evaluateGetROCollectionScalarCodegen
in interface ExprEnumerationForge
public EventType getEventTypeCollection(EventAdapterService eventAdapterService, int statementId) throws ExprValidationException
getEventTypeCollection
in interface ExprEnumerationForge
ExprValidationException
public EventType getEventTypeSingle(EventAdapterService eventAdapterService, int statementId) throws ExprValidationException
getEventTypeSingle
in interface ExprEnumerationForge
ExprValidationException
public java.lang.Class getComponentTypeCollection() throws ExprValidationException
getComponentTypeCollection
in interface ExprEnumerationForge
ExprValidationException
public java.lang.Object evaluate(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
ExprEvaluator
evaluate
in interface ExprEvaluator
eventsPerStream
- - event tupleisNewData
- - indicates whether we are dealing with new data (istream) or old data (rstream)exprEvaluatorContext
- context for expression evaluationpublic CodegenExpression evaluateCodegen(java.lang.Class requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope)
evaluateCodegen
in interface ExprForge
public ExprForgeComplexityEnum getComplexity()
getComplexity
in interface ExprForge
public void toPrecedenceFreeEPL(java.io.StringWriter writer)
toPrecedenceFreeEPL
in class ExprNodeBase
public ExprPrecedenceEnum getPrecedence()
ExprNode
getPrecedence
in interface ExprNode
public ExprNode getForgeRenderable()
getForgeRenderable
in interface ExprEnumerationForge
getForgeRenderable
in interface ExprForge
public int hashCode()
hashCode
in class java.lang.Object
public boolean equalsNode(ExprNode node, boolean ignoreStreamPrefix)
ExprNode
Concrete implementations should compare the type and any additional information that impact the evaluation of a node.
equalsNode
in interface ExprNode
node
- to compare toignoreStreamPrefix
- when the equals-comparison can ignore prefix of event properties