Interface OrderByParser
- All Known Implementing Classes:
OrderByParserImpl
public interface OrderByParser
Interface which defines a method for parsing a $orderby expression to allow different parser implementations
All properties used in the expression must be defined inside the EDM
The types of EDM properties will be checked against the lists of allowed type per method, binary- and unary
operator
The properties used in the expression are not looked up inside the EDM and the type of the expression node
representing the
property will be "null"
Expression node with EDM-types which are "null" are not considered during the parameter type validation, to the
return type of the parent expression node will
also become "null"
The current expression parser supports expressions as defined in the OData specification 2.0 with the following restrictions - the methods "cast", "isof" and "replace" are not supported The expression parser can be used with providing an Entity Data Model (EDM) an without providing it.
When a EDM is provided the expression parser will be as strict as possible. That means:
If no EDM is provided the expression parser performs a lax validation
-
Method Summary
Modifier and TypeMethodDescriptionparseOrderByString(String orderByExpression) Parses a $orderby expression string and creates an $orderby expression tree
-
Method Details
-
parseOrderByString
OrderByExpression parseOrderByString(String orderByExpression) throws ExpressionParserException, ODataMessageException Parses a $orderby expression string and creates an $orderby expression tree- Parameters:
orderByExpression- The $orderby expression string ( for example "name asc" ) to be parsed- Returns:
- The $orderby expression tree
- Throws:
ExpressionParserException- Exception thrown due to errors while parsing the $orderby expression stringODataMessageException- Used for extensibility
-