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 PersistentEntityResources for arbitrary domain objects.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentEntityResourceAssembler(PersistentEntities entities, Projector projector, Associations associations, SelfLinkProvider linkProvider) Creates a newPersistentEntityResourceAssemblerfor the givenPersistentEntities,Projector,AssociationsandSelfLinkProvider. -
Method Summary
Modifier and TypeMethodDescriptiontoFullResource(Object instance) Returns the full object asPersistentEntityResourceusing the underlyingProjector.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.hateoas.server.RepresentationModelAssembler
toCollectionModel
-
Constructor Details
-
PersistentEntityResourceAssembler
public PersistentEntityResourceAssembler(PersistentEntities entities, Projector projector, Associations associations, SelfLinkProvider linkProvider) Creates a newPersistentEntityResourceAssemblerfor the givenPersistentEntities,Projector,AssociationsandSelfLinkProvider.- 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:
toModelin interfaceRepresentationModelAssembler<Object,PersistentEntityResource>
-
toFullResource
Returns the full object asPersistentEntityResourceusing the underlyingProjector.- Parameters:
instance- must not be null.- Returns:
-