You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2013/12/03 19:08:36 UTC

[jira] [Commented] (CXF-5430) Support for OData query language

    [ https://issues.apache.org/jira/browse/CXF-5430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13837969#comment-13837969 ] 

Sergey Beryozkin commented on CXF-5430:
---------------------------------------

I'd like to propose that we only focus for now on getting this part of the OData spec supported:

http://www.odata.org/documentation/odata-v3-documentation/url-conventions/#5_Query_Options

Specifically, 

Step 1. To get POC done we should only start with supporting 

5.1.2.1. Logical Operators

only, without any additional filters for the simplicity sake, the examples there show how similar it is to FIQL queries, so at that level alone we should be able to get Olingo parser parsing an expression such as 

"Name eq 'Milk' and Price lt '2.55M'"

and CXF wrapper implementing org.apache.cxf.jaxrs.ext.search.SearchConditionParser easily adapting whatever Olingo produces to CXF (composite) SearchCondition.

Step 2 or 3.
http://www.odata.org/documentation/odata-v3-documentation/url-conventions/#41_Addressing_entities

See what sort of a convention can be used to handle path expressions like "/Products(1)".

Step 2 or 3. Support the selected system queries like 'orderBy':
http://www.odata.org/documentation/odata-v3-documentation/url-conventions/#514_OrderBy_System_Query_Option


This can actually be tricky enough to do implicitly; most likely the user would need to get such filter values and directly configure say CXF JPA2 Criteria visitor, initially at least.

At the end of the day it is really about supporting a subset of OData. We will recommend users work directly with Olingo when they need more sophisticated support.




> Support for OData query language
> --------------------------------
>
>                 Key: CXF-5430
>                 URL: https://issues.apache.org/jira/browse/CXF-5430
>             Project: CXF
>          Issue Type: New Feature
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
>
> Apache Olingo project (http://olingo.incubator.apache.org/) provides implementation for OData (http://odata.org/).
> This task is about adapting OLingo URI Parser to CXF Search API.
> org.apache.cxf.jaxrs.ext.search.SearchConditionParser implementation will use Olingo parser. The existing CXF Search visitors will be expected to work with both FIQL and OData parsers.
> We may hit some limitations in the existing CXF Search API because OData is more sophisticated language than FIQL. 
> At the moment I don't think it is realistic to support OData completely within CXF Search API constraints. Most likely we will just settle for supporting the subset of OData queries, with users being recommended to work directly with Olingo to get a complete support. Alternatively we can try and enhance the search API if it proves feasible.   



--
This message was sent by Atlassian JIRA
(v6.1#6144)