-
Notifications
You must be signed in to change notification settings - Fork 21
User guide (Proxy)
Francesco Chicchiriccò edited this page Sep 24, 2013
·
3 revisions
The main purpose of ODataJClient's proxy layer is to allow high-level interaction with OData services: basically, users will work with Plain Old Java Objects (POJOs) and ODataJClient will take care of keeping such objects in sync with OData entities.
In order to do so, ODataJClient will transparently maintain an entity context which is also acting as L1 cache; changes in the context can be anytime sent to the OData service via flush() call.
- generate properly annotated POJOs by parsing an OData 3.0 service's metadata via the
odatajclient-maven-plugin - obtain an
EntityContainerFactoryfor such OData 3.0 service - get an
EntityContainerinstance for one of entity containers available in service's metadata - start working with top-level entity sets, obtain entities, perform queries, invocations...
- flush your local modifications back to the OData service
- Working
pom.xmlfor OData sample service at http://services.odata.org/ - Some common usage patterns.