public class ServerSidePagingHandler extends Object
Constructor and Description |
---|
ServerSidePagingHandler() |
Modifier and Type | Method and Description |
---|---|
static Integer |
applyServerSidePaging(SkipTokenOption skipTokenOption,
EntityCollection entityCollection,
EdmEntitySet edmEntitySet,
String rawRequestUri,
Integer preferredPageSize)
Applies server-side paging to the given entity collection.
|
public static Integer applyServerSidePaging(SkipTokenOption skipTokenOption, EntityCollection entityCollection, EdmEntitySet edmEntitySet, String rawRequestUri, Integer preferredPageSize) throws ODataApplicationException
Applies server-side paging to the given entity collection.
The next link is constructed and set in the data. It must support client-specified
page sizes. Therefore, the format page*pageSize
(with a literal asterisk)
has been chosen for the skiptoken.
skipTokenOption
- the current skiptoken option (from a previous response's next link)entityCollection
- the dataedmEntitySet
- the EDM entity set to decide whether paging must be donerawRequestUri
- the request URI (used to construct the next link)preferredPageSize
- the client's preference for page sizenull
if no paging has been done);
could be used in the Preference-Applied HTTP headerODataApplicationException
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.