0

I have scanned the documentation pretty thoroughly, and googled to no end, however I cannot find a way to send a full query to an OData service using OData4j. As it stands, I am parsing queries and building an OQueryRequest object recursively.

This is somewhat cumbersome, and I would like to add support for service operations in my app, which is going to make this all a bit more difficult. So, is there any way to just send a full query to the service without building these OQueryRequest objects?

EDIT: For clarity, I want to pass a string like: "Category(1)/Products?$top=2&$orderby=name" straight to the datasource, without having to interpret or manipulate it myself.

Thanks a lot.

Erik Hunter
  • 211
  • 3
  • 8

1 Answers1

0

So it looks like I'm stuck with parsing queries and building up the OQueryRequest objects. Even that has been giving me some trouble though. I finally got it to work by doing something like:

consumer.getEntities("serviceOpName".custom("paramName", "paramValue").execute();

The "correct" way to do this would have been to use an OFunctionRequest object, but it throws an OperationUnsupportedException.

Erik Hunter
  • 211
  • 3
  • 8