Package com.kazforge.jsonapi.mapping
Class ResourceDecoration.Builder
java.lang.Object
com.kazforge.jsonapi.mapping.ResourceDecoration.Builder
- Enclosing class:
ResourceDecoration
Mutable builder whose
build() result defensively copies supplied values.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an immutable decoration.links(com.kazforge.jsonapi.core.model.Links links) Sets resource links (replaces any previous value).relationship(String propertyIdentity, com.kazforge.jsonapi.core.model.Links links) Convenience that builds aRelationshipDecorationfrom the given links.relationship(String propertyIdentity, RelationshipDecoration decoration) Adds decoration for one mapped relationship property identity (logical name).
-
Method Details
-
links
Sets resource links (replaces any previous value). -
relationship
public ResourceDecoration.Builder relationship(String propertyIdentity, RelationshipDecoration decoration) Adds decoration for one mapped relationship property identity (logical name).- Parameters:
propertyIdentity- the Jackson logical property name (e.g."comments")decoration- the decoration to apply when that relationship survives fieldset selection
-
relationship
public ResourceDecoration.Builder relationship(String propertyIdentity, com.kazforge.jsonapi.core.model.Links links) Convenience that builds aRelationshipDecorationfrom the given links. -
build
Builds an immutable decoration.
-