|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.eql.expression.ExprNode
net.esper.eql.expression.ExprIdentNode
public class ExprIdentNode
Represents an stream property identifier in a filter expressiun tree.
Constructor Summary | |
---|---|
ExprIdentNode(String unresolvedPropertyName)
Ctor. |
|
ExprIdentNode(String unresolvedPropertyName,
String streamOrPropertyName)
Ctor. |
Method Summary | |
---|---|
boolean |
equalsNode(ExprNode node)
Return true if a expression node semantically equals the current node, or false if not. |
Object |
evaluate(EventBean[] eventsPerStream)
Evaluate event tuple and return result. |
String |
getResolvedPropertyName()
Return property name as resolved by lookup in streams. |
String |
getResolvedStreamName()
Returns stream name as resolved by lookup of property in streams. |
int |
getStreamId()
Returns stream id supplying the property value. |
String |
getStreamOrPropertyName()
For unit testing, returns stream or property name candidate. |
Class |
getType()
Returns the type that the node's evaluate method returns an instance of. |
protected static Pair<PropertyResolutionDescriptor,String> |
getTypeFromStream(StreamTypeService streamTypeService,
String unresolvedPropertyName,
String streamOrPropertyName)
Determine stream id and property type given an unresolved property name and a stream name that may also be part of the property name. |
String |
getUnresolvedPropertyName()
For unit testing, returns unresolved property name. |
String |
toExpressionString()
Returns the expression node rendered as a string. |
String |
toString()
|
void |
validate(StreamTypeService streamTypeService,
AutoImportService autoImportService)
Validate node. |
Methods inherited from class net.esper.eql.expression.ExprNode |
---|
accept, addChildNode, deepEquals, dumpDebug, getChildNodes, getValidatedSubtree |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExprIdentNode(String unresolvedPropertyName)
unresolvedPropertyName
- is the event property name in unresolved form, ie. unvalidated against streamspublic ExprIdentNode(String unresolvedPropertyName, String streamOrPropertyName)
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.Method Detail |
---|
public String getUnresolvedPropertyName()
public String getStreamOrPropertyName()
public void validate(StreamTypeService streamTypeService, AutoImportService autoImportService) throws ExprValidationException
ExprValidator
streamTypeService
- serves stream event type infoautoImportService
- - for resolving class names in library method invocations
ExprValidationException
- thrown when validation failedpublic Class getType() throws ExprValidationException
ExprValidator
ExprValidationException
- thrown when validation failedpublic int getStreamId()
public String getResolvedStreamName()
public String getResolvedPropertyName()
protected static Pair<PropertyResolutionDescriptor,String> getTypeFromStream(StreamTypeService streamTypeService, String unresolvedPropertyName, String streamOrPropertyName) throws ExprValidationException
For example: select s0.p1 from... p1 is the property name, s0 the stream name, however this could also be a nested property
streamTypeService
- - service for type infosunresolvedPropertyName
- - property namestreamOrPropertyName
- - stream name, this can also be the first part of the property name
ExprValidationException
- if no such property existspublic String toString()
toString
in class Object
public Object evaluate(EventBean[] eventsPerStream)
ExprEvaluator
eventsPerStream
- - event tuple
public String toExpressionString()
ExprNode
toExpressionString
in class ExprNode
public boolean equalsNode(ExprNode node)
ExprNode
Concrete implementations should compare the type and any additional information that impact the evaluation of a node.
equalsNode
in class ExprNode
node
- to compare to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |