Interface Reference

All Superinterfaces:
ReferenceMixin
All Known Subinterfaces:
AssociateRoleReference, AttributeGroupReference, BusinessUnitReference, CartDiscountReference, CartReference, CategoryReference, ChannelReference, CustomerEmailTokenReference, CustomerGroupReference, CustomerPasswordTokenReference, CustomerReference, CustomObjectReference, DirectDiscountReference, DiscountCodeReference, GenericReference<T>, InventoryEntryReference, OrderEditReference, OrderReference, PaymentReference, ProductDiscountReference, ProductReference, ProductSelectionReference, ProductTailoringReference, ProductTypeReference, QuoteReference, QuoteRequestReference, ReviewReference, ShippingMethodReference, ShoppingListReference, StagedQuoteReference, StandalonePriceReference, StateReference, StoreReference, TaxCategoryReference, TypeReference, ZoneReference

public interface Reference extends ReferenceMixin

A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.


Example to create a subtype instance using the builder pattern

     Reference reference = Reference.associateRoleBuilder()
             id("{id}")
             .build()
 
  • Method Details

    • getTypeId

      @NotNull @NotNull ReferenceTypeId getTypeId()

      Type of referenced resource.

      Specified by:
      getTypeId in interface ReferenceMixin
      Returns:
      typeId
    • getId

      @NotNull @NotNull String getId()

      Unique ID of the referenced resource.

      Specified by:
      getId in interface ReferenceMixin
      Returns:
      id
    • setId

      void setId(String id)

      Unique ID of the referenced resource.

      Parameters:
      id - value to be set
    • deepCopy

      @Nullable static Reference deepCopy(@Nullable Reference template)
      factory method to create a deep copy of Reference
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • associateRoleBuilder

      static AssociateRoleReferenceBuilder associateRoleBuilder()
      builder for associateRole subtype
      Returns:
      builder
    • attributeGroupBuilder

      static AttributeGroupReferenceBuilder attributeGroupBuilder()
      builder for attributeGroup subtype
      Returns:
      builder
    • businessUnitBuilder

      static BusinessUnitReferenceBuilder businessUnitBuilder()
      builder for businessUnit subtype
      Returns:
      builder
    • cartDiscountBuilder

      static CartDiscountReferenceBuilder cartDiscountBuilder()
      builder for cartDiscount subtype
      Returns:
      builder
    • cartBuilder

      static CartReferenceBuilder cartBuilder()
      builder for cart subtype
      Returns:
      builder
    • categoryBuilder

      static CategoryReferenceBuilder categoryBuilder()
      builder for category subtype
      Returns:
      builder
    • channelBuilder

      static ChannelReferenceBuilder channelBuilder()
      builder for channel subtype
      Returns:
      builder
    • keyValueDocumentBuilder

      static CustomObjectReferenceBuilder keyValueDocumentBuilder()
      builder for keyValueDocument subtype
      Returns:
      builder
    • customerEmailTokenBuilder

      static CustomerEmailTokenReferenceBuilder customerEmailTokenBuilder()
      builder for customerEmailToken subtype
      Returns:
      builder
    • customerGroupBuilder

      static CustomerGroupReferenceBuilder customerGroupBuilder()
      builder for customerGroup subtype
      Returns:
      builder
    • customerPasswordTokenBuilder

      static CustomerPasswordTokenReferenceBuilder customerPasswordTokenBuilder()
      builder for customerPasswordToken subtype
      Returns:
      builder
    • customerBuilder

      static CustomerReferenceBuilder customerBuilder()
      builder for customer subtype
      Returns:
      builder
    • directDiscountBuilder

      static DirectDiscountReferenceBuilder directDiscountBuilder()
      builder for directDiscount subtype
      Returns:
      builder
    • discountCodeBuilder

      static DiscountCodeReferenceBuilder discountCodeBuilder()
      builder for discountCode subtype
      Returns:
      builder
    • inventoryEntryBuilder

      static InventoryEntryReferenceBuilder inventoryEntryBuilder()
      builder for inventoryEntry subtype
      Returns:
      builder
    • orderEditBuilder

      static OrderEditReferenceBuilder orderEditBuilder()
      builder for orderEdit subtype
      Returns:
      builder
    • orderBuilder

      static OrderReferenceBuilder orderBuilder()
      builder for order subtype
      Returns:
      builder
    • paymentBuilder

      static PaymentReferenceBuilder paymentBuilder()
      builder for payment subtype
      Returns:
      builder
    • productDiscountBuilder

      static ProductDiscountReferenceBuilder productDiscountBuilder()
      builder for productDiscount subtype
      Returns:
      builder
    • productBuilder

      static ProductReferenceBuilder productBuilder()
      builder for product subtype
      Returns:
      builder
    • productSelectionBuilder

      static ProductSelectionReferenceBuilder productSelectionBuilder()
      builder for productSelection subtype
      Returns:
      builder
    • productTailoringBuilder

      static ProductTailoringReferenceBuilder productTailoringBuilder()
      builder for productTailoring subtype
      Returns:
      builder
    • productTypeBuilder

      static ProductTypeReferenceBuilder productTypeBuilder()
      builder for productType subtype
      Returns:
      builder
    • quoteBuilder

      static QuoteReferenceBuilder quoteBuilder()
      builder for quote subtype
      Returns:
      builder
    • quoteRequestBuilder

      static QuoteRequestReferenceBuilder quoteRequestBuilder()
      builder for quoteRequest subtype
      Returns:
      builder
    • reviewBuilder

      static ReviewReferenceBuilder reviewBuilder()
      builder for review subtype
      Returns:
      builder
    • shippingMethodBuilder

      static ShippingMethodReferenceBuilder shippingMethodBuilder()
      builder for shippingMethod subtype
      Returns:
      builder
    • shoppingListBuilder

      static ShoppingListReferenceBuilder shoppingListBuilder()
      builder for shoppingList subtype
      Returns:
      builder
    • stagedQuoteBuilder

      static StagedQuoteReferenceBuilder stagedQuoteBuilder()
      builder for stagedQuote subtype
      Returns:
      builder
    • standalonePriceBuilder

      static StandalonePriceReferenceBuilder standalonePriceBuilder()
      builder for standalonePrice subtype
      Returns:
      builder
    • stateBuilder

      static StateReferenceBuilder stateBuilder()
      builder for state subtype
      Returns:
      builder
    • storeBuilder

      static StoreReferenceBuilder storeBuilder()
      builder for store subtype
      Returns:
      builder
    • taxCategoryBuilder

      static TaxCategoryReferenceBuilder taxCategoryBuilder()
      builder for taxCategory subtype
      Returns:
      builder
    • typeBuilder

      static TypeReferenceBuilder typeBuilder()
      builder for type subtype
      Returns:
      builder
    • zoneBuilder

      static ZoneReferenceBuilder zoneBuilder()
      builder for zone subtype
      Returns:
      builder
    • withReference

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