public class PersistentEntityResourceAssembler extends Object implements org.springframework.hateoas.server.RepresentationModelAssembler<Object,PersistentEntityResource>
RepresentationModelAssembler
to create PersistentEntityResource
s for arbitrary domain objects.Constructor and Description |
---|
PersistentEntityResourceAssembler(org.springframework.data.mapping.context.PersistentEntities entities,
Projector projector,
Associations associations,
SelfLinkProvider linkProvider)
Creates a new
PersistentEntityResourceAssembler for the given PersistentEntities ,
Projector , Associations and SelfLinkProvider . |
Modifier and Type | Method and Description |
---|---|
PersistentEntityResource |
toFullResource(Object instance)
Returns the full object as
PersistentEntityResource using the underlying Projector . |
PersistentEntityResource |
toModel(Object instance) |
public PersistentEntityResourceAssembler(org.springframework.data.mapping.context.PersistentEntities entities, Projector projector, Associations associations, SelfLinkProvider linkProvider)
PersistentEntityResourceAssembler
for the given PersistentEntities
,
Projector
, Associations
and SelfLinkProvider
.entities
- must not be null.projector
- must not be null.associations
- must not be null.linkProvider
- must not be null.public PersistentEntityResource toModel(Object instance)
toModel
in interface org.springframework.hateoas.server.RepresentationModelAssembler<Object,PersistentEntityResource>
public PersistentEntityResource toFullResource(Object instance)
PersistentEntityResource
using the underlying Projector
.instance
- must not be null.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.