Interface RepresentationModelAssembler<T,D extends RepresentationModel<?>>
- All Known Subinterfaces:
SimpleRepresentationModelAssembler<T>
- All Known Implementing Classes:
RepresentationModelAssemblerSupport
public interface RepresentationModelAssembler<T,D extends RepresentationModel<?>>
Interface for components that convert a domain type into a
RepresentationModel
.- Author:
- Oliver Gierke, Greg Turnquist
-
Method Summary
Modifier and TypeMethodDescriptiondefault CollectionModel<D>
toCollectionModel
(Iterable<? extends T> entities) Converts anIterable
orT
s into anIterable
ofRepresentationModel
and wraps them in aCollectionModel
instance.Converts the given entity into aD
, which extendsRepresentationModel
.
-
Method Details
-
toModel
Converts the given entity into aD
, which extendsRepresentationModel
.- Parameters:
entity
-- Returns:
-
toCollectionModel
Converts anIterable
orT
s into anIterable
ofRepresentationModel
and wraps them in aCollectionModel
instance.- Parameters:
entities
- must not be null.- Returns:
CollectionModel
containingD
.
-