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(@NonNull PersistentEntities entities,
@NonNull Projector projector,
@NonNull Associations associations,
@NonNull SelfLinkProvider linkProvider) |
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 PersistentEntityResourceAssembler(@NonNull @NonNull PersistentEntities entities, @NonNull @NonNull Projector projector, @NonNull @NonNull Associations associations, @NonNull @NonNull SelfLinkProvider linkProvider)
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–2019 Pivotal Software, Inc.. All rights reserved.