public class FilterExpressionImpl extends Object implements FilterExpression
| Constructor and Description |
|---|
FilterExpressionImpl(String filterExpression) |
FilterExpressionImpl(String filterExpression,
CommonExpression childExpression) |
| Modifier and Type | Method and Description |
|---|---|
Object |
accept(ExpressionVisitor visitor)
Method
Visitable.accept(ExpressionVisitor) is called when traversing the expression tree. |
EdmType |
getEdmType() |
CommonExpression |
getExpression() |
String |
getExpressionString() |
ExpressionKind |
getKind() |
String |
getUriLiteral()
Returns the URI literal which lead to the creation of this expression.
|
CommonExpression |
setEdmType(EdmType edmType)
Set the edmType of this expression node
|
public FilterExpressionImpl(String filterExpression)
public FilterExpressionImpl(String filterExpression, CommonExpression childExpression)
public String getExpressionString()
getExpressionString in interface FilterExpressionpublic CommonExpression getExpression()
getExpression in interface FilterExpressionpublic Object accept(ExpressionVisitor visitor) throws ExceptionVisitExpression, ODataApplicationException
VisitableVisitable.accept(ExpressionVisitor) is called when traversing the expression tree. This method is invoked on
each
expression used as node in an expression tree. The implementations should
behave as follows:
ExpressionVisitor instance and provide the stored objects to that
instance
accept in interface Visitablevisitor - Object ( implementing ExpressionVisitor) whose methods are called during traversing a expression node of
the expression tree.ExceptionVisitExpression - Exception occurred the OData library while traversing the treeODataApplicationException - Exception thrown by the application who implemented the visitorpublic CommonExpression setEdmType(EdmType edmType)
CommonExpressionsetEdmType in interface CommonExpressionedmType - Type to be setpublic EdmType getEdmType()
getEdmType in interface CommonExpressionCommonExpression.getEdmType() method
for an expression representing the "concat" method will return always
"Edm.String".This type information is set while parsing the $filter or $orderby
expressions and used to do a first validation of the expression.
For calculating operators like "add, sub, mul" this type
information is purely based on input and output types of the
operator as defined in the OData specification.
So for $filter=2 add 7 the CommonExpression.getEdmType() method of the binary expression
will return Edm.Byte and not Edm.Int16 because the parser performs no real
addition.
However, the application may change this type while evaluating the expression tree.
public ExpressionKind getKind()
getKind in interface CommonExpressionExpressionKindpublic String getUriLiteral()
CommonExpressiongetUriLiteral in interface CommonExpressionCopyright © 2020. All rights reserved.