S
- the type of the object to convertT
- the type of the resourcepublic interface ResourceAssembler<S,T>
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 |
---|---|
T |
toResource(S object)
Converts the given object into a resource.
|
void |
toResource(S object,
T target)
Converts the given object into the target resource.
|
List<T> |
toResources(Iterable<? extends S> objects)
Converts all given objects into resources.
|