com.espertech.esper.epl.expression.core
Class ExprIdentNodeImpl

java.lang.Object
  extended by com.espertech.esper.epl.expression.core.ExprNodeBase
      extended by com.espertech.esper.epl.expression.core.ExprIdentNodeImpl
All Implemented Interfaces:
ExprFilterOptimizableNode, ExprIdentNode, ExprNode, ExprStreamRefNode, ExprValidator, MetaDefItem, java.io.Serializable

public class ExprIdentNodeImpl
extends ExprNodeBase
implements ExprIdentNode

Represents an stream property identifier in a filter expressiun tree.

See Also:
Serialized Form

Constructor Summary
ExprIdentNodeImpl(EventType eventType, java.lang.String propertyName, int streamNumber)
           
ExprIdentNodeImpl(java.lang.String unresolvedPropertyName)
          Ctor.
ExprIdentNodeImpl(java.lang.String unresolvedPropertyName, java.lang.String streamOrPropertyName)
          Ctor.
 
Method Summary
 boolean equalsNode(ExprNode node)
          Return true if a expression node semantically equals the current node, or false if not.
 ExprEvaluator getExprEvaluator()
           
 ExprIdentNodeEvaluator getExprEvaluatorIdent()
           
 FilterSpecLookupable getFilterLookupable()
           
 boolean getFilterLookupEligible()
           
 java.lang.String getFullUnresolvedName()
          Returns the unresolved property name in it's complete form, including the stream name if there is one.
 ExprPrecedenceEnum getPrecedence()
          Returns precedence.
 java.lang.String getResolvedPropertyName()
          Return property name as resolved by lookup in streams.
 java.lang.String getResolvedPropertyNameRoot()
          Returns the root of the resolved property name, if any.
 java.lang.String getResolvedStreamName()
          Returns stream name as resolved by lookup of property in streams.
 java.lang.String getRootPropertyNameIfAny()
           
 int getStreamId()
          Returns stream id supplying the property value.
 java.lang.String getStreamOrPropertyName()
          For unit testing, returns stream or property name candidate.
 java.lang.Integer getStreamReferencedIfAny()
           
 java.lang.Class getType()
           
 java.lang.String getUnresolvedPropertyName()
          For unit testing, returns unresolved property name.
 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 setStreamOrPropertyName(java.lang.String streamOrPropertyName)
          Set name.
 void toPrecedenceFreeEPL(java.io.StringWriter writer)
           
static void toPrecedenceFreeEPL(java.io.StringWriter writer, java.lang.String streamOrPropertyName, java.lang.String unresolvedPropertyName)
           
 java.lang.String toString()
           
 ExprNode validate(ExprValidationContext validationContext)
           
 
Methods inherited from class com.espertech.esper.epl.expression.core.ExprNodeBase
accept, accept, acceptChildnodes, addChildNode, addChildNodes, addChildNodeToFront, 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.epl.expression.core.ExprNode
accept, accept, acceptChildnodes, addChildNode, addChildNodes, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL
 

Constructor Detail

ExprIdentNodeImpl

public ExprIdentNodeImpl(java.lang.String unresolvedPropertyName)
Ctor.

Parameters:
unresolvedPropertyName - is the event property name in unresolved form, ie. unvalidated against streams

ExprIdentNodeImpl

public ExprIdentNodeImpl(java.lang.String unresolvedPropertyName,
                         java.lang.String streamOrPropertyName)
Ctor.

Parameters:
unresolvedPropertyName - is the event property name in unresolved form, ie. unvalidated against streams
streamOrPropertyName - is the stream name, or if not a valid stream name a possible nested property name in one of the streams.

ExprIdentNodeImpl

public ExprIdentNodeImpl(EventType eventType,
                         java.lang.String propertyName,
                         int streamNumber)
Method Detail

getExprEvaluator

public ExprEvaluator getExprEvaluator()
Specified by:
getExprEvaluator in interface ExprNode

getUnresolvedPropertyName

public java.lang.String getUnresolvedPropertyName()
For unit testing, returns unresolved property name.

Specified by:
getUnresolvedPropertyName in interface ExprIdentNode
Returns:
property name

getStreamOrPropertyName

public java.lang.String getStreamOrPropertyName()
For unit testing, returns stream or property name candidate.

Specified by:
getStreamOrPropertyName in interface ExprIdentNode
Returns:
stream name, or property name of a nested property of one of the streams

setStreamOrPropertyName

public void setStreamOrPropertyName(java.lang.String streamOrPropertyName)
Set name.

Specified by:
setStreamOrPropertyName in interface ExprIdentNode
Parameters:
streamOrPropertyName - to use

getFullUnresolvedName

public java.lang.String getFullUnresolvedName()
Returns the unresolved property name in it's complete form, including the stream name if there is one.

Specified by:
getFullUnresolvedName in interface ExprIdentNode
Returns:
property name

getFilterLookupEligible

public boolean getFilterLookupEligible()
Specified by:
getFilterLookupEligible in interface ExprFilterOptimizableNode

getFilterLookupable

public FilterSpecLookupable getFilterLookupable()
Specified by:
getFilterLookupable in interface ExprFilterOptimizableNode

validate

public ExprNode validate(ExprValidationContext validationContext)
                  throws ExprValidationException
Specified by:
validate in interface ExprValidator
Throws:
ExprValidationException

isConstantResult

public boolean isConstantResult()
Description copied from interface: ExprNode
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.

Specified by:
isConstantResult in interface ExprNode
Returns:
true for constant evaluation value, false for non-constant evaluation value

getStreamId

public int getStreamId()
Returns stream id supplying the property value.

Specified by:
getStreamId in interface ExprIdentNode
Returns:
stream number

getStreamReferencedIfAny

public java.lang.Integer getStreamReferencedIfAny()
Specified by:
getStreamReferencedIfAny in interface ExprStreamRefNode

getRootPropertyNameIfAny

public java.lang.String getRootPropertyNameIfAny()
Specified by:
getRootPropertyNameIfAny in interface ExprStreamRefNode

getType

public java.lang.Class getType()

getResolvedStreamName

public java.lang.String getResolvedStreamName()
Returns stream name as resolved by lookup of property in streams.

Specified by:
getResolvedStreamName in interface ExprIdentNode
Returns:
stream name

getResolvedPropertyName

public java.lang.String getResolvedPropertyName()
Return property name as resolved by lookup in streams.

Specified by:
getResolvedPropertyName in interface ExprIdentNode
Returns:
property name

getResolvedPropertyNameRoot

public java.lang.String getResolvedPropertyNameRoot()
Returns the root of the resolved property name, if any.

Specified by:
getResolvedPropertyNameRoot in interface ExprIdentNode
Returns:
root

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toPrecedenceFreeEPL

public void toPrecedenceFreeEPL(java.io.StringWriter writer)
Specified by:
toPrecedenceFreeEPL in class ExprNodeBase

toPrecedenceFreeEPL

public static void toPrecedenceFreeEPL(java.io.StringWriter writer,
                                       java.lang.String streamOrPropertyName,
                                       java.lang.String unresolvedPropertyName)

getPrecedence

public ExprPrecedenceEnum getPrecedence()
Description copied from interface: ExprNode
Returns precedence.

Specified by:
getPrecedence in interface ExprNode
Returns:
precedence

equalsNode

public boolean equalsNode(ExprNode node)
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 interface ExprNode
Parameters:
node - to compare to
Returns:
true if semantically equal, or false if not equals

getExprEvaluatorIdent

public ExprIdentNodeEvaluator getExprEvaluatorIdent()
Specified by:
getExprEvaluatorIdent in interface ExprIdentNode

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com