public class PropertyExpressionImpl extends Object implements PropertyExpression
| Constructor and Description |
|---|
PropertyExpressionImpl(String uriLiteral,
EdmLiteral edmLiteral) |
| Modifier and Type | Method and Description |
|---|---|
Object |
accept(ExpressionVisitor visitor)
Method
Visitable.accept(ExpressionVisitor) is called when traversing the expression tree. |
EdmLiteral |
getEdmLiteral() |
EdmTyped |
getEdmProperty() |
EdmType |
getEdmType() |
ExpressionKind |
getKind() |
String |
getPropertyName() |
String |
getUriLiteral()
Returns the URI literal which lead to the creation of this expression.
|
CommonExpression |
setEdmProperty(EdmTyped edmProperty) |
CommonExpression |
setEdmType(EdmType edmType)
Set the edmType of this expression node
|
public PropertyExpressionImpl(String uriLiteral, EdmLiteral edmLiteral)
public CommonExpression setEdmProperty(EdmTyped edmProperty)
public CommonExpression setEdmType(EdmType edmType)
CommonExpressionsetEdmType in interface CommonExpressionedmType - Type to be setpublic String getPropertyName()
getPropertyName in interface PropertyExpressionpublic EdmLiteral getEdmLiteral()
public EdmTyped getEdmProperty()
getEdmProperty in interface PropertyExpressionEdmTypedpublic ExpressionKind getKind()
getKind in interface CommonExpressionExpressionKindpublic String getUriLiteral()
CommonExpressiongetUriLiteral in interface CommonExpressionpublic 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 Object accept(ExpressionVisitor visitor)
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.Copyright © 2020. All rights reserved.