Package com.helixframework.api.contract
Class HateoasOffsetPaginatedResponse<T>
java.lang.Object
com.helixframework.api.contract.HateoasResponse
com.helixframework.api.contract.HateoasOffsetPaginatedResponse<T>
- Type Parameters:
T- item type
API response that returns a collection with offset pagination and HATEOS links.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance ofHateoasOffsetPaginatedResponse.HateoasOffsetPaginatedResponse(long offset, long limit, Collection<T> items) Creates an instance ofHateoasOffsetPaginatedResponsewithout links.HateoasOffsetPaginatedResponse(long offset, long limit, Collection<T> items, Map<String, HalLink> links) Creates an instance ofHateoasOffsetPaginatedResponsewith links. -
Method Summary
-
Constructor Details
-
HateoasOffsetPaginatedResponse
public HateoasOffsetPaginatedResponse()Creates an instance ofHateoasOffsetPaginatedResponse. -
HateoasOffsetPaginatedResponse
Creates an instance ofHateoasOffsetPaginatedResponsewithout links.- Parameters:
offset- page offsetlimit- page limititems- items to return in response
-
HateoasOffsetPaginatedResponse
public HateoasOffsetPaginatedResponse(long offset, long limit, Collection<T> items, Map<String, HalLink> links) Creates an instance ofHateoasOffsetPaginatedResponsewith links.- Parameters:
offset- page offsetlimit- page limititems- items to return in responselinks- hateoas links
-
-
Method Details
-
getCount
public int getCount()Gets the number of items in the collection.- Returns:
- number of items in the collection
-
getOffset
Gets the pagination offset. The total number of records to offset before beginning to return results.- Returns:
- pagination offset
-
getLimit
Gets the page limit. The total number of results to return.- Returns:
- page limit
-
getItems
Gets the items.- Returns:
- items
-