0

Is there a good documentation on implementing $filter in Olingo? the one on Olingo web site is not helping me because I am not accessing backend data using JDBC. Any sample code would also help.

Thanks,

Jaideep Joshi
  • 11
  • 1
  • 3

2 Answers2

2

You can use uriInfo.getFilter() to obtain the filter expression from the request.

This expression returns a FilterExpression, that can be further break down into various <? extends CommonExpression>, such as BinaryExpression or MethodExpression.

Please have a look at https://olingo.apache.org/javadoc/odata2/org/apache/olingo/odata2/api/uri/expression/CommonExpression.html

FizzyTidus
  • 127
  • 2
  • 10
1

Are you referring to this? http://olingo.apache.org/doc/odata2/tutorials/Olingo_Tutorial_AdvancedRead_FilterVisitor.html

The concept is the same. The example is taking a filter expression and converting it into SQL. You can take the same pattern and create whatever underlaying query you need from the $filter value.

LDAdams
  • 682
  • 4
  • 18