Package org.apache.juneau.bean.jsonapi
Class JsonApiResourceIdentifier
java.lang.Object
org.apache.juneau.bean.jsonapi.JsonApiResourceIdentifier
Represents a JSON:API Resource Identifier Object as defined by
JSON:API v1.1 § Resource Identifier Objects.
A slim form of JsonApiResource used inside relationship data linkage. Carries only type,
id, and an optional meta bag. type is a plain String for the same reasons
documented on JsonApiResource.getType().
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.JsonApiResourceIdentifier(String type, String id) Convenience constructor. -
Method Summary
-
Constructor Details
-
JsonApiResourceIdentifier
public JsonApiResourceIdentifier()Default constructor. -
JsonApiResourceIdentifier
Convenience constructor.- Parameters:
type- The entity-type name. Can benull to leave the property unset.id- The identifier value. Can benull to leave the property unset.
-
-
Method Details
-
getType
Bean property getter:type .- Returns:
- The value of the
type property, ornull if it is not set.
-
setType
Bean property setter:type .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getId
Bean property getter:id .- Returns:
- The value of the
id property, ornull if it is not set.
-
setId
Bean property setter:id .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
getMeta
Bean property getter:meta .- Returns:
- The value of the
meta property, ornull if it is not set.
-
setMeta
Bean property setter:meta .- Parameters:
value- The new value for this property. Can benull to unset the property.- Returns:
- This object.
-
putMeta
Convenience method to add a single meta entry.- Parameters:
name- The meta key. Can benull (LinkedHashMaptolerates anull key).value- The meta value. Can benull (stored asnull ).- Returns:
- This object.
-
toString
-