Class ExprIdentNodeImpl
java.lang.Object
com.espertech.esper.common.internal.epl.expression.core.ExprNodeBase
com.espertech.esper.common.internal.epl.expression.core.ExprIdentNodeImpl
- All Implemented Interfaces:
ExprEnumerationForgeProvider
,ExprFilterOptimizableNode
,ExprForge
,ExprForgeInstrumentable
,ExprIdentNode
,ExprNode
,ExprNodeRenderable
,ExprStreamRefNode
,ExprValidator
public class ExprIdentNodeImpl
extends ExprNodeBase
implements ExprIdentNode, ExprNode, ExprForgeInstrumentable
Represents an stream property identifier in a filter expressiun tree.
-
Constructor Summary
ConstructorDescriptionExprIdentNodeImpl
(EventType eventType, String propertyName, int streamNumber) ExprIdentNodeImpl
(String unresolvedPropertyName) Ctor.ExprIdentNodeImpl
(String unresolvedPropertyName, String streamOrPropertyName) Ctor. -
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.evaluateCodegen
(EPTypeClass requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) evaluateCodegenUninstrumented
(EPTypeClass requiredType, CodegenMethodScope codegenMethodScope, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) getEnumerationForge
(StreamTypeService streamTypeService, ContextCompileTimeDescriptor contextDescriptor) Returns the enumeration forge provider, or null if not applicableboolean
getForge()
Returns the unresolved property name in it's complete form, including the stream name if there is one.Returns precedence.Return property name as resolved by lookup in streams.Returns the root of the resolved property name, if any.Returns stream name as resolved by lookup of property in streams.int
Returns stream id supplying the property value.For unit testing, returns stream or property name candidate.For unit testing, returns unresolved property name.boolean
void
setOptionalEvent
(boolean optionalEvent) void
setStreamOrPropertyName
(String streamOrPropertyName) Set name.void
toPrecedenceFreeEPL
(StringWriter writer, ExprNodeRenderableFlags flags) static void
toPrecedenceFreeEPL
(StringWriter writer, String streamOrPropertyName, String unresolvedPropertyName, ExprNodeRenderableFlags flags) toString()
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.espertech.esper.common.internal.epl.expression.core.ExprNode
accept, accept, acceptChildnodes, addChildNode, addChildNodes, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes
Methods inherited from interface com.espertech.esper.common.internal.epl.expression.core.ExprNodeRenderable
toEPL
-
Constructor Details
-
ExprIdentNodeImpl
Ctor.- Parameters:
unresolvedPropertyName
- is the event property name in unresolved form, ie. unvalidated against streams
-
ExprIdentNodeImpl
Ctor.- Parameters:
unresolvedPropertyName
- is the event property name in unresolved form, ie. unvalidated against streamsstreamOrPropertyName
- is the stream name, or if not a valid stream name a possible nested property name in one of the streams.
-
ExprIdentNodeImpl
-
-
Method Details
-
getForge
-
getForgeConstantType
- Specified by:
getForgeConstantType
in interfaceExprForge
-
getForgeRenderable
- Specified by:
getForgeRenderable
in interfaceExprForge
-
getEvaluationType
- Specified by:
getEvaluationType
in interfaceExprForge
-
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
-
getExprEvaluator
- Specified by:
getExprEvaluator
in interfaceExprForge
-
getUnresolvedPropertyName
For unit testing, returns unresolved property name.- Specified by:
getUnresolvedPropertyName
in interfaceExprIdentNode
- Returns:
- property name
-
getStreamOrPropertyName
For unit testing, returns stream or property name candidate.- Specified by:
getStreamOrPropertyName
in interfaceExprIdentNode
- Returns:
- stream name, or property name of a nested property of one of the streams
-
setStreamOrPropertyName
Set name.- Specified by:
setStreamOrPropertyName
in interfaceExprIdentNode
- Parameters:
streamOrPropertyName
- to use
-
setOptionalEvent
public void setOptionalEvent(boolean optionalEvent) - Specified by:
setOptionalEvent
in interfaceExprIdentNode
-
getFullUnresolvedName
Returns the unresolved property name in it's complete form, including the stream name if there is one.- Specified by:
getFullUnresolvedName
in interfaceExprIdentNode
- Returns:
- property name
-
getFilterLookupEligible
public boolean getFilterLookupEligible()- Specified by:
getFilterLookupEligible
in interfaceExprFilterOptimizableNode
-
getFilterLookupable
- Specified by:
getFilterLookupable
in interfaceExprFilterOptimizableNode
-
validate
- Specified by:
validate
in interfaceExprValidator
- Throws:
ExprValidationException
-
isConstantResult
public boolean isConstantResult() -
getStreamId
public int getStreamId()Returns stream id supplying the property value.- Specified by:
getStreamId
in interfaceExprIdentNode
- Returns:
- stream number
-
getStreamReferencedIfAny
- Specified by:
getStreamReferencedIfAny
in interfaceExprStreamRefNode
-
getRootPropertyNameIfAny
- Specified by:
getRootPropertyNameIfAny
in interfaceExprStreamRefNode
-
getResolvedStreamName
Returns stream name as resolved by lookup of property in streams.- Specified by:
getResolvedStreamName
in interfaceExprIdentNode
- Returns:
- stream name
-
getResolvedPropertyName
Return property name as resolved by lookup in streams.- Specified by:
getResolvedPropertyName
in interfaceExprIdentNode
- Returns:
- property name
-
getResolvedPropertyNameRoot
Returns the root of the resolved property name, if any.- Specified by:
getResolvedPropertyNameRoot
in interfaceExprIdentNode
- Returns:
- root
-
toString
-
toPrecedenceFreeEPL
- Specified by:
toPrecedenceFreeEPL
in classExprNodeBase
-
toPrecedenceFreeEPL
public static void toPrecedenceFreeEPL(StringWriter writer, String streamOrPropertyName, String unresolvedPropertyName, ExprNodeRenderableFlags flags) -
getPrecedence
Description copied from interface:ExprNode
Returns precedence.- Specified by:
getPrecedence
in interfaceExprNode
- Returns:
- precedence
-
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
-
getExprEvaluatorIdent
- Specified by:
getExprEvaluatorIdent
in interfaceExprIdentNode
-
getEnumerationForge
public ExprEnumerationForgeDesc getEnumerationForge(StreamTypeService streamTypeService, ContextCompileTimeDescriptor contextDescriptor) Description copied from interface:ExprEnumerationForgeProvider
Returns the enumeration forge provider, or null if not applicable- Specified by:
getEnumerationForge
in interfaceExprEnumerationForgeProvider
- Parameters:
streamTypeService
- stream type servicecontextDescriptor
- context descriptor- Returns:
- forge provider
-