public interface SimpleRepresentationModelAssembler<T> extends RepresentationModelAssembler<T,EntityModel<T>>
RepresentationModelAssembler based purely on the domain type, using EntityRepresentationModel<T> as
the enclosing representation model type.| Modifier and Type | Method and Description |
|---|---|
void |
addLinks(CollectionModel<EntityModel<T>> resources)
Define links to add to the
CollectionModel collection. |
void |
addLinks(EntityModel<T> resource)
Define links to add to every individual
EntityModel. |
default CollectionModel<EntityModel<T>> |
toCollectionModel(Iterable<? extends T> entities)
Converts all given entities into resources and wraps the collection as a resource as well.
|
default EntityModel<T> |
toModel(T entity)
Converts the given entity into a
EntityModel. |
default EntityModel<T> toModel(T entity)
EntityModel.toModel in interface RepresentationModelAssembler<T,EntityModel<T>>entity - void addLinks(EntityModel<T> resource)
EntityModel.resource - default CollectionModel<EntityModel<T>> toCollectionModel(Iterable<? extends T> entities)
toCollectionModel in interface RepresentationModelAssembler<T,EntityModel<T>>entities - must not be null.CollectionModel containing EntityModel of T.toModel(Object)void addLinks(CollectionModel<EntityModel<T>> resources)
CollectionModel collection.resources - Copyright © 2012-2019–2019 Pivotal, Inc.. All rights reserved.