Interface ProductReference

All Superinterfaces:
Identifiable<Product>, IdentifiableObjHolder<Product>, ProductReferenceMixin, Reference, ReferenceMixin

public interface ProductReference extends Reference, Identifiable<Product>, ProductReferenceMixin, IdentifiableObjHolder<Product>

Reference to a Product.


Example to create an instance using the builder pattern

     ProductReference productReference = ProductReference.builder()
             .id("{id}")
             .build()
 
  • Field Details

  • Method Details

    • getObj

      @Valid @Valid Product getObj()

      Contains the representation of the expanded Product. Only present in responses to requests with Reference Expansion for Products.

      Specified by:
      getObj in interface IdentifiableObjHolder<Product>
      Returns:
      obj
    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the referenced Product.

      Specified by:
      getId in interface Identifiable<Product>
      Specified by:
      getId in interface ProductReferenceMixin
      Specified by:
      getId in interface Reference
      Specified by:
      getId in interface ReferenceMixin
      Returns:
      id
    • setObj

      void setObj(Product obj)

      Contains the representation of the expanded Product. Only present in responses to requests with Reference Expansion for Products.

      Parameters:
      obj - value to be set
    • setId

      void setId(String id)

      Unique identifier of the referenced Product.

      Specified by:
      setId in interface Reference
      Parameters:
      id - value to be set
    • of

      static ProductReference of()
      factory method
      Returns:
      instance of ProductReference
    • of

      static ProductReference of(ProductReference template)
      factory method to create a shallow copy ProductReference
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ProductReference
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ProductReferenceBuilder builder()
      builder factory method for ProductReference
      Returns:
      builder
    • builder

      static ProductReferenceBuilder builder(ProductReference template)
      create builder for ProductReference instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductReference

      default <T> T withProductReference(Function<ProductReference,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ProductReference> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference