Package pro.taskana.common.rest.models
Class TaskanaPagedModel<T extends org.springframework.hateoas.RepresentationModel<? super T>>
- java.lang.Object
-
- org.springframework.hateoas.RepresentationModel<TaskanaPagedModel<T>>
-
- pro.taskana.common.rest.models.TaskanaPagedModel<T>
-
- Type Parameters:
T- The class of the paginated content
public class TaskanaPagedModel<T extends org.springframework.hateoas.RepresentationModel<? super T>> extends org.springframework.hateoas.RepresentationModel<TaskanaPagedModel<T>>
Optional Paging model for RepresentationModels.
-
-
Constructor Summary
Constructors Constructor Description TaskanaPagedModel(TaskanaPagedModelKeys property, Collection<? extends T> content)TaskanaPagedModel(TaskanaPagedModelKeys property, Collection<? extends T> content, org.springframework.hateoas.PagedModel.PageMetadata metadata)Creates a newTaskanaPagedModelfrom the given content.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<T>getContent()TaskanaPagedModelKeysgetKey()org.springframework.hateoas.PagedModel.PageMetadatagetMetadata()
-
-
-
Constructor Detail
-
TaskanaPagedModel
public TaskanaPagedModel(TaskanaPagedModelKeys property, Collection<? extends T> content, org.springframework.hateoas.PagedModel.PageMetadata metadata)
Creates a newTaskanaPagedModelfrom the given content.- Parameters:
property- property which will be used for serialization.content- must not be null.metadata- the metadata. Can be null. If null, no metadata will be serialized.
-
TaskanaPagedModel
public TaskanaPagedModel(TaskanaPagedModelKeys property, Collection<? extends T> content)
-
-
Method Detail
-
getContent
public Collection<T> getContent()
-
getMetadata
public org.springframework.hateoas.PagedModel.PageMetadata getMetadata()
-
getKey
public TaskanaPagedModelKeys getKey()
-
-