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 anIterableorTs into anIterableofRepresentationModeland wraps them in aCollectionModelinstance.Converts the given entity into aD, which extendsRepresentationModel.
-
Method Details
-
toModel
Converts the given entity into aD, which extendsRepresentationModel.- Parameters:
entity-- Returns:
-
toCollectionModel
Converts anIterableorTs into anIterableofRepresentationModeland wraps them in aCollectionModelinstance.- Parameters:
entities- must not be null.- Returns:
CollectionModelcontainingD.
-