[
https://issues.apache.org/jira/browse/OLINGO-953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15293937#comment-15293937
]
Konstantin Kustov Sergeevich commented on OLINGO-953:
-----------------------------------------------------
Thanks for your reply. Now I have another problem. After removal of data on the
server method getDeltaLink() returns null. My code:
pushDeletedData(url);
final ODataEntitySetRequest<ClientEntitySet> req =
oDataClient.getRetrieveRequestFactory().getEntitySetRequest(
oDataClient.newURIBuilder(url).appendEntitySetSegment("Categories").build());
req.setPrefer(oDataClient.newPreferences().trackChanges());
final ClientEntitySet products = req.execute().getBody();
Log.d("delta", "getDeltaLink() = " + products.getDeltaLink());
I use URL: http://services.odata.org/V4/OData/OData.svc/
Prompt please what I did wrong.
> How to work with delta responses of OData 4.0
> ---------------------------------------------
>
> Key: OLINGO-953
> URL: https://issues.apache.org/jira/browse/OLINGO-953
> Project: Olingo
> Issue Type: Question
> Components: odata4-client
> Affects Versions: (Java) V4 4.0.0-beta-03
> Reporter: Konstantin Kustov Sergeevich
> Labels: android-studio, java
>
> Hello. How to work with delta responses of OData 4.0. For OData 4.0 no
> documentation that describes the work with delta responses.
> I am interested in how to get deleted link and deleted entries?
> In the old version, this can be done as follows:
> ODataFeed feed = client.readFeed("Container1", "Rooms", contentType);
> String deltaLink = feed.getFeedMetadata().getDeltaLink();
> ODataDeltaFeed deltaFeed = client.readDeltaFeed("Container1", "Rooms",
> contentType, deltaLink);
> List<ODataEntry> changedEntries = deltaFeed.getEntries();
> List<DeletedEntryMetada) deletedEntries = deltaFeed.getDeletedEntries();
> How to do this for the OData 4.0 using the new library?
> I have tried the this:
> ClientDelta delta = client.getObjectFactory().newDelta();
> LogUtil.d("qwerty","" + delta.getAddedLinks());
> but this code always returns an empty string.
> I am waiting for an answer. Thank you :).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)