Interface ODataRequestResultPagination
- All Superinterfaces:
Iterable<ResultElement>
- All Known Implementing Classes:
ODataRequestResultGeneric
This class provides methods to lazily iterate through the pages of an OData read request result-set. It allows for
memory-efficient exploration / parsing with continuous requests to the OData endpoint. It enables the consumption of
all data through server-driven pagination.
-
Method Summary
Modifier and TypeMethodDescriptionio.vavr.control.Option<String>
Get the next page link of result-set.Get the originalODataRequestGeneric
instance that was used for running the OData request.iteratePages
(Class<? extends T> type) Iterate over result-set pages.io.vavr.control.Try<ODataRequestResultGeneric>
Get the next page link of result-set.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getNextLink
Get the next page link of result-set.- Returns:
- the OData protocol specific value of next link property. Or
null
if last page of result-set.
-
tryGetNextPage
Get the next page link of result-set.- Returns:
- the OData protocol specific value of next link property. Or
null
if last page of result-set.
-
getODataRequest
Get the originalODataRequestGeneric
instance that was used for running the OData request.- Returns:
- The original
ODataRequestGeneric
instance.
-
iteratePages
Iterate over result-set pages.- Type Parameters:
T
- The generic item type.- Parameters:
type
- The expected class reference to be used for deserializing the resulting items.- Returns:
- An instance of
Iterable
that allows lazy iteration through OData result pages.
-