Class ASerializablePage<TResource extends Serializable>
- java.lang.Object
-
- de.xima.fc.api.rest.impl.common.resource.response.ASerializablePage<TResource>
-
- Type Parameters:
TResource
- type of REST API resource.
- All Implemented Interfaces:
ISerializablePage<TResource>
,Serializable
- Direct Known Subclasses:
AResourcePage
,FormRecordStateHistoryEntryResourcePage
,FormTagResourcePage
public abstract class ASerializablePage<TResource extends Serializable> extends Object implements ISerializablePage<TResource>
Abstract base model representing a page ofserializables
provided by the PUBLIC REST API.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ASerializablePage(List<TResource> results, int page, int offset, int pageSize, int totalCount, javax.ws.rs.core.UriInfo uriInfo, Locale locale, Map<String,List<Serializable>> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getLinks()
int
getOffset()
int
getPage()
int
getPageSize()
int
getResultCount()
List<TResource>
getResults()
Integer
getTotalCount()
Integer
getTotalPages()
-
-
-
Method Detail
-
getLinks
public Map<String,String> getLinks()
- Specified by:
getLinks
in interfaceISerializablePage<TResource extends Serializable>
- Returns:
- Links to other pages.
-
getOffset
public int getOffset()
- Specified by:
getOffset
in interfaceISerializablePage<TResource extends Serializable>
- Returns:
- Offset of the first resource in the results list.
-
getPage
public int getPage()
- Specified by:
getPage
in interfaceISerializablePage<TResource extends Serializable>
- Returns:
- Current page number.
-
getPageSize
public int getPageSize()
- Specified by:
getPageSize
in interfaceISerializablePage<TResource extends Serializable>
- Returns:
- Number of resources per page.
-
getResultCount
public int getResultCount()
- Specified by:
getResultCount
in interfaceISerializablePage<TResource extends Serializable>
- Returns:
- Number of resources in the paginated results list.
-
getResults
public List<TResource> getResults()
- Specified by:
getResults
in interfaceISerializablePage<TResource extends Serializable>
- Returns:
- Paginated list of requested resources.
-
getTotalCount
public Integer getTotalCount()
- Specified by:
getTotalCount
in interfaceISerializablePage<TResource extends Serializable>
- Returns:
- Total number of resources. Is null/not present if not requested.
-
getTotalPages
public Integer getTotalPages()
- Specified by:
getTotalPages
in interfaceISerializablePage<TResource extends Serializable>
- Returns:
- Total number of pages. Is null/not present if total count is not requested.
-
-