Interface ODataRequestResultPagination

All Superinterfaces:
Iterable<ResultElement>
All Known Implementing Classes:
ODataRequestResultGeneric

public interface ODataRequestResultPagination extends Iterable<ResultElement>
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 Details

    • getNextLink

      @Nonnull io.vavr.control.Option<String> 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

      @Nonnull io.vavr.control.Try<ODataRequestResultGeneric> 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

      @Nonnull ODataRequestGeneric getODataRequest()
      Get the original ODataRequestGeneric instance that was used for running the OData request.
      Returns:
      The original ODataRequestGeneric instance.
    • iteratePages

      @Nonnull default <T> Iterable<List<T>> iteratePages(@Nonnull Class<? extends T> type)
      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.