Class PersistentEntityResourceAssembler
java.lang.Object
org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler
- All Implemented Interfaces:
RepresentationModelAssembler<Object,
PersistentEntityResource>
public class PersistentEntityResourceAssembler
extends Object
implements RepresentationModelAssembler<Object,PersistentEntityResource>
RepresentationModelAssembler
to create PersistentEntityResource
s for arbitrary domain objects.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionPersistentEntityResourceAssembler
(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(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 interfaceRepresentationModelAssembler<Object,
PersistentEntityResource>
-
toFullResource
Returns the full object asPersistentEntityResource
using the underlyingProjector
.- Parameters:
instance
- must not be null.- Returns:
-