public abstract static class OffsetPaginatedList.Builder<T> extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
OffsetPaginatedList<T> |
build()
Builds a new instance of
OffsetPaginatedList. |
abstract OffsetPaginatedList.Builder<T> |
items(List<T> items) |
OffsetPaginatedList.Builder<T> |
metadata(Integer limit,
Long offset,
Long totalResults,
Boolean hasMore)
Deprecated.
use
metadata(OffsetPaginatedListMetadata), possibly with a builder
instead |
OffsetPaginatedList.Builder<T> |
metadata(Long totalResults)
Deprecated.
use
totalResults(Long) instead |
abstract OffsetPaginatedList.Builder<T> |
metadata(OffsetPaginatedListMetadata metadata) |
OffsetPaginatedList.Builder<T> |
metadata(String limitFieldName,
Integer limit,
String offsetFieldName,
Long offset,
Long totalResults,
Boolean hasMore)
Deprecated.
use
metadata(OffsetPaginatedListMetadata), possibly with a builder
instead |
OffsetPaginatedList.Builder<T> |
totalResults(Long totalResults)
Convenience method that adds a metadata instance with total results and default field names
without having to manually build an
OffsetPaginatedListMetadata object. |
public abstract OffsetPaginatedList.Builder<T> items(List<T> items)
public abstract OffsetPaginatedList.Builder<T> metadata(OffsetPaginatedListMetadata metadata)
@Deprecated public OffsetPaginatedList.Builder<T> metadata(@Nullable String limitFieldName, @Nullable Integer limit, @Nullable String offsetFieldName, @Nullable Long offset, @Nullable Long totalResults, @Nullable Boolean hasMore)
metadata(OffsetPaginatedListMetadata), possibly with a builder
insteadOffsetPaginatedListMetadata object.limitFieldName - the limit field name used to create the pagelimit - the limit used to create the pageoffsetFieldName - the offset field name used to create the pageoffset - the offset used to create the pagetotalResults - the total results availablehasMore - indicates if there are more results availableOffsetPaginatedList.Builder being used for the OffsetPaginatedList@Deprecated public OffsetPaginatedList.Builder<T> metadata(@Nullable Integer limit, @Nullable Long offset, @Nullable Long totalResults, @Nullable Boolean hasMore)
metadata(OffsetPaginatedListMetadata), possibly with a builder
insteadOffsetPaginatedListMetadata object.limit - the limit used to create the pageoffset - the offset used to create the pagetotalResults - the total results availablehasMore - indicates if there are more results availableOffsetPaginatedList.Builder being used for the OffsetPaginatedList@Deprecated public OffsetPaginatedList.Builder<T> metadata(@Nullable Long totalResults)
totalResults(Long) insteadOffsetPaginatedListMetadata object.totalResults - the total results availableOffsetPaginatedList.Builder being used for the OffsetPaginatedListpublic OffsetPaginatedList.Builder<T> totalResults(@Nullable Long totalResults)
OffsetPaginatedListMetadata object.totalResults - the total results availableOffsetPaginatedList.Builder being used for the OffsetPaginatedListpublic OffsetPaginatedList<T> build()
OffsetPaginatedList.Copyright © 2020 Cerner Innovation, Inc.. All rights reserved.