Interface EmbeddedWrapper
public interface EmbeddedWrapper
A wrapper to handle values to be embedded into a
EntityModel
.- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptiongetRel()
Returns the rel to be used when embedding.Class<?>
Returns the type to be used to calculate a type based rel.getValue()
Returns the actual value to embed.boolean
hasRel
(LinkRelation rel) Returns whether the wrapper has the given rel.boolean
Returns whether the wrapper is a collection value.
-
Method Details
-
getRel
Optional<LinkRelation> getRel()Returns the rel to be used when embedding. If this returns null, the rel will be calculated based on the type returned bygetRelTargetType()
. A wrapper returning null for bothgetRel()
andgetRelTargetType()
is considered invalid.- Returns:
- See Also:
-
hasRel
Returns whether the wrapper has the given rel.- Parameters:
rel
- can be null.- Returns:
-
isCollectionValue
boolean isCollectionValue()Returns whether the wrapper is a collection value.- Returns:
-
getValue
Object getValue()Returns the actual value to embed.- Returns:
-
getRelTargetType
Returns the type to be used to calculate a type based rel. Can return null in case an explicit rel is returned ingetRel()
. A wrapper returning null for bothgetRel()
andgetRelTargetType()
is considered invalid.- Returns:
-