|
Spring Hateoas | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.hateoas.ResourceSupport
org.springframework.hateoas.Resources<T>
org.springframework.hateoas.PagedResources<T>
public class PagedResources<T>
DTO to implement binding response representations of pageable collections.
| Nested Class Summary | |
|---|---|
static class |
PagedResources.PageMetadata
Value object for pagination metadata. |
| Field Summary | |
|---|---|
static PagedResources<?> |
NO_PAGE
|
| Constructor Summary | |
|---|---|
protected |
PagedResources()
Default constructor to allow instantiation by reflection. |
|
PagedResources(Collection<T> content,
PagedResources.PageMetadata metadata,
Iterable<Link> links)
Creates a new PagedResources from the given content PagedResources.PageMetadata and Links. |
|
PagedResources(Collection<T> content,
PagedResources.PageMetadata metadata,
Link... links)
Creates a new PagedResources from the given content, PagedResources.PageMetadata and Links (optional). |
| Method Summary | ||
|---|---|---|
boolean |
equals(Object obj)
|
|
PagedResources.PageMetadata |
getMetadata()
Returns the pagination metadata. |
|
Link |
getNextLink()
Returns the Link pointing to the next page (if set). |
|
Link |
getPreviousLink()
Returns the Link pointing to the previous page (if set). |
|
int |
hashCode()
|
|
String |
toString()
|
|
static
|
wrap(Iterable<S> content,
PagedResources.PageMetadata metadata)
Factory method to easily create a PagedResources instance from a set of entities and pagination metadata. |
|
| Methods inherited from class org.springframework.hateoas.Resources |
|---|
getContent, iterator, wrap |
| Methods inherited from class org.springframework.hateoas.ResourceSupport |
|---|
add, add, getId, getLink, getLinks, hasLink, hasLinks, removeLinks |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static PagedResources<?> NO_PAGE
| Constructor Detail |
|---|
protected PagedResources()
public PagedResources(Collection<T> content,
PagedResources.PageMetadata metadata,
Link... links)
PagedResources from the given content, PagedResources.PageMetadata and Links (optional).
content - must not be null.metadata - links -
public PagedResources(Collection<T> content,
PagedResources.PageMetadata metadata,
Iterable<Link> links)
PagedResources from the given content PagedResources.PageMetadata and Links.
content - must not be null.metadata - links - | Method Detail |
|---|
public PagedResources.PageMetadata getMetadata()
public static <T extends Resource<S>,S> PagedResources<T> wrap(Iterable<S> content,
PagedResources.PageMetadata metadata)
PagedResources instance from a set of entities and pagination metadata.
content - must not be null.metadata -
public Link getNextLink()
#addPaginationLinks(Link)public Link getPreviousLink()
#addPaginationLinks(Link)public String toString()
toString in class Resources<T>public boolean equals(Object obj)
equals in class Resources<T>public int hashCode()
hashCode in class Resources<T>
|
Spring Hateoas | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||