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 Details

    • JsonApiResourceIdentifier

      Default constructor.
    • JsonApiResourceIdentifier

      Convenience constructor.
      Parameters:
      type - The entity-type name. Can be null to leave the property unset.
      id - The identifier value. Can be null to leave the property unset.
  • Method Details

    • getType

      public String getType()
      Bean property getter: type.
      Returns:
      The value of the type property, or null if it is not set.
    • setType

      Bean property setter: type.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • getId

      public String getId()
      Bean property getter: id.
      Returns:
      The value of the id property, or null if it is not set.
    • setId

      Bean property setter: id.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • getMeta

      public Map<String,Object> getMeta()
      Bean property getter: meta.
      Returns:
      The value of the meta property, or null if it is not set.
    • setMeta

      Bean property setter: meta.
      Parameters:
      value - The new value for this property. Can be null to unset the property.
      Returns:
      This object.
    • putMeta

      Convenience method to add a single meta entry.
      Parameters:
      name - The meta key. Can be null (LinkedHashMap tolerates a null key).
      value - The meta value. Can be null (stored as null).
      Returns:
      This object.
    • toString

      public String toString()
      Overrides:
      toString in class Object