Class PersistentEntityResource.Builder
java.lang.Object
org.springframework.data.rest.webmvc.PersistentEntityResource.Builder
- Enclosing class:
- PersistentEntityResource
Builder to create
PersistentEntityResource
instances.- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finally creates thePersistentEntityResource
instance.Finally creates thePersistentEntityResource
instance to symbolize the contained entity is about to be created.withEmbedded
(Iterable<EmbeddedWrapper> resources) Configures the builder to embed the givenEmbeddedWrapper
instances.Adds the givenLink
to thePersistentEntityResource
.
-
Method Details
-
withEmbedded
Configures the builder to embed the givenEmbeddedWrapper
instances. Creates aCollectionModel
instance to make sure theEmbeddedWrapper
handling gets applied to the serialization output ignoring the links.- Parameters:
resources
- can be null.- Returns:
- the builder
-
withLink
Adds the givenLink
to thePersistentEntityResource
.- Parameters:
link
- must not be null.- Returns:
- the builder
-
withLinks
-
build
Finally creates thePersistentEntityResource
instance.- Returns:
-
forCreation
Finally creates thePersistentEntityResource
instance to symbolize the contained entity is about to be created.- Returns:
-
buildNested
-