T - a type of data in the listpublic class PageResponse<T> extends Object
| Constructor and Description |
|---|
PageResponse(List<T> data,
int totalCount)
Constructor of this class.
|
PageResponse(List<T> data,
int totalCount,
Map<String,Object> metadata)
Constructor of this class.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> PageResponse<T> |
of(List<T> data,
int totalCount)
Returns a new instance of
PageResponse. |
static <T> PageResponse<T> |
of(List<T> data,
int totalCount,
Map<String,Object> metadata)
Returns a new instance of
PageResponse. |
public PageResponse(List<T> data, int totalCount, Map<String,Object> metadata)
data - Result of a selection.totalCount - Total amount of objects in a storage.metadata - Extra information about results or query.public static <T> PageResponse<T> of(List<T> data, int totalCount)
PageResponse. Metadata is empty Map.T - a type of data in the listdata - list with objectstotalCount - total amount of objects in a storagepublic static <T> PageResponse<T> of(List<T> data, int totalCount, Map<String,Object> metadata)
PageResponse.T - a type of data in the listdata - list with objectstotalCount - total amount of objects in a storagemetadata - extra information about results or query.Copyright © 2023. All rights reserved.