Class PersistentEntityResourceAssembler
java.lang.Object
org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler
- All Implemented Interfaces:
org.springframework.hateoas.server.RepresentationModelAssembler<Object,
PersistentEntityResource>
public class PersistentEntityResourceAssembler
extends Object
implements org.springframework.hateoas.server.RepresentationModelAssembler<Object,PersistentEntityResource>
RepresentationModelAssembler
to create PersistentEntityResource
s for arbitrary domain objects.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionPersistentEntityResourceAssembler
(org.springframework.data.mapping.context.PersistentEntities entities, Projector projector, Associations associations, SelfLinkProvider linkProvider) Creates a newPersistentEntityResourceAssembler
for the givenPersistentEntities
,Projector
,Associations
andSelfLinkProvider
. -
Method Summary
Modifier and TypeMethodDescriptiontoFullResource
(Object instance) Returns the full object asPersistentEntityResource
using the underlyingProjector
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.hateoas.server.RepresentationModelAssembler
toCollectionModel
-
Constructor Details
-
PersistentEntityResourceAssembler
public PersistentEntityResourceAssembler(org.springframework.data.mapping.context.PersistentEntities entities, Projector projector, Associations associations, SelfLinkProvider linkProvider) Creates a newPersistentEntityResourceAssembler
for the givenPersistentEntities
,Projector
,Associations
andSelfLinkProvider
.- Parameters:
entities
- must not be null.projector
- must not be null.associations
- must not be null.linkProvider
- must not be null.
-
-
Method Details
-
toModel
- Specified by:
toModel
in interfaceorg.springframework.hateoas.server.RepresentationModelAssembler<Object,
PersistentEntityResource>
-
toFullResource
Returns the full object asPersistentEntityResource
using the underlyingProjector
.- Parameters:
instance
- must not be null.- Returns:
-