Interface PaginationServiceInternal

  • All Superinterfaces:
    PaginationService
    All Known Implementing Classes:
    PaginationServiceImpl

    public interface PaginationServiceInternal
    extends PaginationService
    Additional pagination functionality dealing with PagingIterators / Paginated live here Until CONFDEV-26743 is resolved and we have a blessed path going forward, the PagingIterator / Paginated types should not be leaked to consumers.
    • Method Detail

      • createPagingIterator

        @Deprecated
        default <F,​T> PagingIterator<T> createPagingIterator​(PaginationBatch<F> fetchBatch,
                                                                   int resultsPerPage,
                                                                   com.google.common.base.Function<Iterable<F>,​Iterable<T>> modelConverter)
        Constructs a PagingIterator backed by the given PaginationBatch. The Iterator is guaranteed to yield all results provided by the PaginationBatch. No more than resultsPerPage are fetched from the PaginationBatch at one time, and each batch of data is only kept live for the time it takes callers to iterate through it.
        Parameters:
        fetchBatch - - a request for a range of data
        resultsPerPage - - number of results to request from PaginationBatch each invocation.
        modelConverter - - a function to convert from the supplied object to a model object, this will be executed within a transaction.
        Returns:
        a PagingIterator of model objects, with results that the user is allowed to see.
        See Also:
        PagingIterator
      • newPagingIterator

        <F,​T> PagingIterator<T> newPagingIterator​(PaginationBatch<F> fetchBatch,
                                                        int resultsPerPage,
                                                        Function<Iterable<F>,​Iterable<T>> modelConverter)
        Constructs a PagingIterator backed by the given PaginationBatch. The Iterator is guaranteed to yield all results provided by the PaginationBatch. No more than resultsPerPage are fetched from the PaginationBatch at one time, and each batch of data is only kept live for the time it takes callers to iterate through it.
        Parameters:
        fetchBatch - - a request for a range of data
        resultsPerPage - - number of results to request from PaginationBatch each invocation.
        modelConverter - - a function to convert from the supplied object to a model object, this will be executed within a transaction.
        Returns:
        a PagingIterator of model objects, with results that the user is allowed to see.
        Since:
        7.0.1
        See Also:
        PagingIterator
      • createPaginated

        @Deprecated
        default <F,​T> Paginated<T> createPaginated​(PaginationBatch<F> fetchBatch,
                                                         com.google.common.base.Function<Iterable<F>,​Iterable<T>> modelConverter,
                                                         int maxLimit)
        Deprecated.
        Constructs a Paginated implementation backed by the given PaginationBatch.
        Parameters:
        fetchBatch - - a request for a range of data
        modelConverter - - a function to convert from the supplied object to a model object, this will be executed within a transaction.
        maxLimit - - the max limit to apply when creating LimitedRequests for paged requests from the Paginated.
        See Also:
        Paginated
      • newPaginated

        <F,​T> Paginated<T> newPaginated​(PaginationBatch<F> fetchBatch,
                                              Function<Iterable<F>,​Iterable<T>> modelConverter,
                                              int maxLimit)
        Constructs a Paginated implementation backed by the given PaginationBatch.
        Parameters:
        fetchBatch - - a request for a range of data
        modelConverter - - a function to convert from the supplied object to a model object, this will be executed within a transaction.
        maxLimit - - the max limit to apply when creating LimitedRequests for paged requests from the Paginated.
        Since:
        7.0.1
        See Also:
        Paginated