T
- the type of the object to convertD
- the type of the resourcepublic interface ResourceAssembler<T,D>
The object to convert can be any type, but typically this will be a domain object widely used by the application.
The resource should be a type that is only used in the REST layer of the application and which represents the data to be send to the consumer. This is typically a POJO containing Jackson annotations if needed.
Modifier and Type | Method and Description |
---|---|
D |
toResource(T object)
Converts the given object into a resource.
|
default List<D> |
toResources(Iterable<? extends T> objects)
Converts all given objects into resources.
|