public class PersistentEntityResourceAssembler extends Object implements org.springframework.hateoas.ResourceAssembler<Object,PersistentEntityResource>
ResourceAssembler
to create PersistentEntityResource
s for arbitrary domain objects.Constructor and Description |
---|
PersistentEntityResourceAssembler() |
Modifier and Type | Method and Description |
---|---|
org.springframework.hateoas.Link |
getSelfLinkFor(Object instance)
Creates the self link for the given domain instance.
|
PersistentEntityResource |
toFullResource(Object instance)
Returns the full object as
PersistentEntityResource using the underlying Projector . |
PersistentEntityResource |
toResource(Object instance) |
public PersistentEntityResource toResource(Object instance)
toResource
in interface org.springframework.hateoas.ResourceAssembler<Object,PersistentEntityResource>
public PersistentEntityResource toFullResource(Object instance)
PersistentEntityResource
using the underlying Projector
.instance
- must not be null.public org.springframework.hateoas.Link getSelfLinkFor(Object instance)
instance
- must be a managed entity, not null.Copyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.