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 thePersistentEntityResourceinstance.Finally creates thePersistentEntityResourceinstance to symbolize the contained entity is about to be created.withEmbedded(Iterable<EmbeddedWrapper> resources) Configures the builder to embed the givenEmbeddedWrapperinstances.Adds the givenLinkto thePersistentEntityResource.
-
Method Details
-
withEmbedded
Configures the builder to embed the givenEmbeddedWrapperinstances. Creates aCollectionModelinstance to make sure theEmbeddedWrapperhandling gets applied to the serialization output ignoring the links.- Parameters:
resources- can be null.- Returns:
- the builder
-
withLink
Adds the givenLinkto thePersistentEntityResource.- Parameters:
link- must not be null.- Returns:
- the builder
-
withLinks
-
build
Finally creates thePersistentEntityResourceinstance.- Returns:
-
forCreation
Finally creates thePersistentEntityResourceinstance to symbolize the contained entity is about to be created.- Returns:
-
buildNested
-