[
https://issues.apache.org/jira/browse/OLINGO-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904152#comment-13904152
]
M Carissimi commented on OLINGO-162:
------------------------------------
Chandan,
I was looking at OLINGO-125 and at the percentEncodeNextLink() method of the
ListsProcessor that I've followed to create the next link for my pages.
I have noticed that when I use $top, this is retained in the link presented for
the next page. For example given a service where the page size is 10, if I
request $skiptoken=30&$top=50 the 'next' link for the next page is displayed as
$skiptoken=40&$top=50. This implies that $top should be treated as an absolute
value rather than a relative value to $skiptoken.
The same does not apply to $skip.
Regards
Miki
> Use $skiptoken, $top and $skip
> ------------------------------
>
> Key: OLINGO-162
> URL: https://issues.apache.org/jira/browse/OLINGO-162
> Project: Olingo
> Issue Type: Question
> Components: odata2-core
> Affects Versions: V2 1.1.0
> Reporter: M Carissimi
> Priority: Minor
> Attachments: JPAPage.java
>
>
> Hello,
> I use $skiptoken to implement pagination in my service. What should the
> service return when $skiptoken is used in conjunction with $top and $skip?
> Should the numbers specified in $top and $skip be considered relative to the
> starting point of the page being displayed or should they be considered
> absolute values?
> For example, if I have $skiptoken=10&$top=4 should the service return the
> first 4 items of the page starting with entry number 10 or should the service
> return nothing because $skiptoken > $top? If the latter is true, then to
> obtain the first 4 entres on the second page one would have to specify
> $skiptoken=10&$top=14. Which is correct?
> Similarly, if I have $skiptoken=10&$skip=2, should the service return the
> entres on the page starting with element 10 but skipping the first 2 entres?
> Lastly, I understand that $skiptoken should represent the id of the first
> entry to display on a page. What should the id be for entities with compound
> keys (i.e. a name and a date)?
> Cheers
> Miki
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)