Interface CustomerReference

All Superinterfaces:
Identifiable<Customer>, IdentifiableObjHolder<Customer>, Reference, ReferenceMixin

public interface CustomerReference extends Reference, Identifiable<Customer>, IdentifiableObjHolder<Customer>

Reference to a Customer.


Example to create an instance using the builder pattern

     CustomerReference customerReference = CustomerReference.builder()
             .id("{id}")
             .build()
 
  • Field Details

  • Method Details

    • getObj

      @Valid @Valid Customer getObj()

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

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

      @NotNull @NotNull String getId()

      Unique identifier of the referenced Customer.

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

      void setObj(Customer obj)

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

      Parameters:
      obj - value to be set
    • setId

      void setId(String id)

      Unique identifier of the referenced Customer.

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

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

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

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

      static CustomerReferenceBuilder builder()
      builder factory method for CustomerReference
      Returns:
      builder
    • builder

      static CustomerReferenceBuilder builder(CustomerReference template)
      create builder for CustomerReference instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomerReference

      default <T> T withCustomerReference(Function<CustomerReference,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<CustomerReference> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference