Interface Paginator
-
public interface PaginatorPaginator is a DSL aimed at paginating arbitrary streams or iterables, or domain objects provided by aRepository. The result can either be aSliceor aPage. It supports page-based, offset-based and key-based pagination.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> SlicePaginationPicker<T>paginate(Iterable<T> iterable)Initiate a pagination operation using anIterableas source.<T> SlicePaginationPicker<T>paginate(Stream<T> stream)Initiate a pagination operation using a stream of objects as source.<A extends AggregateRoot<I>,I>
RepositoryOptionsPicker<A,I>paginate(Repository<A,I> repository)Initiate a pagination operation using the specified repository.<T> SlicePaginationPicker<T>paginate(T object)Initiate a pagination operation using a unique object as source.
-
-
-
Method Detail
-
paginate
<A extends AggregateRoot<I>,I> RepositoryOptionsPicker<A,I> paginate(Repository<A,I> repository)
Initiate a pagination operation using the specified repository.- Type Parameters:
A- the aggregate root type that is paginated.I- the aggregate root identifier type.- Parameters:
repository- the repository where the domain objects come from.- Returns:
- the next operation of the paginator DSL, allowing to specify repository options.
-
paginate
<T> SlicePaginationPicker<T> paginate(T object)
Initiate a pagination operation using a unique object as source.- Type Parameters:
T- the type of the source object.- Parameters:
object- the source object.- Returns:
- the next operation of the paginator DSL, allowing to choose the type of pagination.
-
paginate
<T> SlicePaginationPicker<T> paginate(Stream<T> stream)
Initiate a pagination operation using a stream of objects as source.- Type Parameters:
T- the type of the source object.- Parameters:
stream- the source stream.- Returns:
- the next operation of the paginator DSL, allowing to choose the type of pagination.
-
paginate
<T> SlicePaginationPicker<T> paginate(Iterable<T> iterable)
Initiate a pagination operation using anIterableas source.- Type Parameters:
T- the type of the source object.- Parameters:
iterable- the source iterable.- Returns:
- the next operation of the paginator DSL, allowing to choose the type of pagination.
-
-