|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.expression.ExprNode
com.espertech.esper.epl.expression.ExprIdentNode
public class ExprIdentNode
Represents an stream property identifier in a filter expressiun tree.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.espertech.esper.epl.expression.ExprNode |
---|
ExprNode.MappedPropertyParseResult |
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,
boolean isNewData)
Evaluate event tuple and return result. |
boolean |
evaluatePropertyExists(EventBean[] eventsPerStream,
boolean isNewData)
Returns true if the property exists, or false if not. |
String |
getFullUnresolvedName()
Returns the unresolved property name in it's complete form, including the stream name if there is one. |
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. |
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. |
String |
toExpressionString()
Returns the expression node rendered as a string. |
String |
toString()
|
void |
validate(StreamTypeService streamTypeService,
MethodResolutionService methodResolutionService,
ViewResourceDelegate viewResourceDelegate,
TimeProvider timeProvider,
VariableService variableService)
Validate node. |
Methods inherited from class com.espertech.esper.epl.expression.ExprNode |
---|
accept, addChildNode, deepEquals, dumpDebug, getChildNodes, getValidatedSubtree, parseMappedProperty |
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 String getFullUnresolvedName()
public void validate(StreamTypeService streamTypeService, MethodResolutionService methodResolutionService, ViewResourceDelegate viewResourceDelegate, TimeProvider timeProvider, VariableService variableService) throws ExprValidationException
ExprValidator
streamTypeService
- serves stream event type infomethodResolutionService
- - for resolving class names in library method invocationsviewResourceDelegate
- - delegates for view resources to expression nodestimeProvider
- - provides engine current timevariableService
- - provides access to variable values
ExprValidationException
- thrown when validation failedpublic Class getType() throws ExprValidationException
ExprValidator
ExprValidationException
- thrown when validation failedpublic boolean isConstantResult()
ExprNode
isConstantResult
in class ExprNode
public 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, boolean isNewData)
ExprEvaluator
eventsPerStream
- - event tupleisNewData
- - indicates whether we are dealing with new data (istream) or old data (rstream)
public boolean evaluatePropertyExists(EventBean[] eventsPerStream, boolean isNewData)
eventsPerStream
- each stream's eventsisNewData
- if the stream represents insert or remove stream
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
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |