public class EntityModel<T> extends RepresentationModel<EntityModel<T>>
EntityModel
wrapping a domain object and adding links to it.Modifier | Constructor and Description |
---|---|
protected |
EntityModel()
Creates an empty
EntityModel . |
|
EntityModel(T content,
Iterable<Link> links)
Creates a new
EntityModel with the given content and Link s. |
|
EntityModel(T content,
Link... links)
Creates a new
EntityModel with the given content and Link s (optional). |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
T |
getContent()
Returns the underlying entity.
|
int |
hashCode() |
String |
toString() |
add, add, add, addAllIf, addIf, getLink, getLink, getLinks, getLinks, getLinks, getRequiredLink, getRequiredLink, hasLink, hasLink, hasLinks, removeLinks
protected EntityModel()
EntityModel
.public EntityModel(T content, Link... links)
EntityModel
with the given content and Link
s (optional).content
- must not be null.links
- the links to add to the EntityModel
.public EntityModel(@Nullable T content, Iterable<Link> links)
EntityModel
with the given content and Link
s.content
- must not be null.links
- the links to add to the EntityModel
.public String toString()
toString
in class RepresentationModel<EntityModel<T>>
public boolean equals(@Nullable Object obj)
equals
in class RepresentationModel<EntityModel<T>>
public int hashCode()
hashCode
in class RepresentationModel<EntityModel<T>>
Copyright © 2011–2020 Pivotal, Inc.. All rights reserved.