Package pro.taskana.common.rest.models
Class PagedResources<T>
- java.lang.Object
-
- org.springframework.hateoas.RepresentationModel<PagedResources<T>>
-
- pro.taskana.common.rest.models.PagedResources<T>
-
- Type Parameters:
T- The Class of the paginatied content
public class PagedResources<T> extends org.springframework.hateoas.RepresentationModel<PagedResources<T>>
Base Class for CollectionModel with pagination.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPagedResources()Default constructor to allow instantiation by reflection.PagedResources(Collection<T> content, org.springframework.hateoas.PagedModel.PageMetadata metadata, Iterable<org.springframework.hateoas.Link> links)PagedResources(Collection<T> content, org.springframework.hateoas.PagedModel.PageMetadata metadata, org.springframework.hateoas.Link... links)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<T>getContent()Returns the content.org.springframework.hateoas.PagedModel.PageMetadatagetMetadata()Returns the pagination metadata.
-
-
-
Constructor Detail
-
PagedResources
protected PagedResources()
Default constructor to allow instantiation by reflection.
-
PagedResources
public PagedResources(Collection<T> content, org.springframework.hateoas.PagedModel.PageMetadata metadata, org.springframework.hateoas.Link... links)
- Parameters:
content- must not be null.metadata- the metadatalinks- the links
-
PagedResources
public PagedResources(Collection<T> content, org.springframework.hateoas.PagedModel.PageMetadata metadata, Iterable<org.springframework.hateoas.Link> links)
- Parameters:
content- must not be null.metadata- the metadatalinks- the links
-
-
Method Detail
-
getMetadata
public org.springframework.hateoas.PagedModel.PageMetadata getMetadata()
Returns the pagination metadata.- Returns:
- the metadata
-
getContent
public Collection<T> getContent()
Returns the content.- Returns:
- the content
-
-