java.lang.Object
com.broadleafcommerce.recommendationengine.domain.PurchaseItem
All Implemented Interfaces:
Serializable

public class PurchaseItem extends Object implements Serializable
See Also:
  • Constructor Details

    • PurchaseItem

      public PurchaseItem()
  • Method Details

    • getId

      public String getId()
      The context ID of the purchase.
      Returns:
      the context ID of the purchase
    • getPurchase

      public Purchase getPurchase()
      The owning purchase of this item.
      Returns:
      the purchase that owns this item
    • getName

      public String getName()
      The name of this item. Typically derived from the product or sku name.
      Returns:
      The name of this item. Typically derived from the product or sku name.
    • getUri

      public String getUri()
      The navigable uri of the corresponding catalog entry (e.g. product) for this purchase item.
      Returns:
      The navigable uri of the corresponding catalog entry (e.g. product) for this purchase item.
    • getQuantity

      public int getQuantity()
      The number of this item in the Purchase.
      Returns:
      The number of this item in the Purchase.
    • getPriceListId

      public String getPriceListId()
      The id of the price list used to get the pricing for this PurchaseItem.
      Returns:
      The id of the price list used to get the pricing for this PurchaseItem.
    • getUnitPrice

      public javax.money.MonetaryAmount getUnitPrice()
      The individual unit price for an PurchaseItem.
      Returns:
      The individual unit price for an PurchaseItem.
    • getVariantId

      public String getVariantId()
      The id to the corresponding variant for this item.
      Returns:
      The id to the corresponding variant for this item.
    • getProductId

      public String getProductId()
      The id to the corresponding product for this item.
      Returns:
      The id to the corresponding product for this item.
    • getCategoryIds

      public Set<String> getCategoryIds()
      The ids to the corresponding categories for this item's product.
      Returns:
      The ids to the corresponding categories for this item's product.
    • getProductTags

      public List<String> getProductTags()
      The list of simple labels used to categorize the corresponding product for this item.
      Returns:
      The list of simple labels used to categorize the corresponding product for this item.
    • getSku

      public String getSku()
      Represents a SKU code, similar to productId or variantId, except this is a unified, unique concept across both products and variants.
      Returns:
      The SKU (or SKU code) for a product or variant
    • getVendorRef

      public String getVendorRef()
      A reference to the corresponding vendor for this item.
      Returns:
      A reference to the corresponding vendor for this item.
    • getMerchandisingContext

      public String getMerchandisingContext()
      Defines the merchandising context of the item to signify where it is added from.

      This field is intended to be used for items added from SELECTOR products, which allows for the possibility of targeting the items for discounts based on the fact that they came from the SELECTOR product.

      Returns:
      The context of the item signifying where it's added from
    • getBrandId

      public String getBrandId()
      The id to the corresponding data driven enum for this item's product's brand.
      Returns:
      the id to the corresponding data driven enum for this item's product's brand
    • getMerchandisingTypeId

      public String getMerchandisingTypeId()
      The id to the corresponding data driven enum for this item's product's merchandising type.
      Returns:
      the id to the corresponding data driven enum for this item's product's merchandising type
    • getTargetDemographicId

      public String getTargetDemographicId()
      The id to the corresponding data driven enum for this item's product's target demographic.
      Returns:
      the id to the corresponding data driven enum for this item's product's target demographic
    • getAttributes

      public Map<String,Object> getAttributes()
      Miscellaneous attributes for this item.
      Returns:
      Miscellaneous attributes for this item.
    • setId

      public void setId(String id)
      The context ID of the purchase.
      Parameters:
      id - the context ID of the purchase
    • setPurchase

      public void setPurchase(Purchase purchase)
      The owning purchase of this item.
      Parameters:
      purchase - the purchase that should own this item
    • setName

      public void setName(String name)
      The name of this item. Typically derived from the product or sku name.
      Parameters:
      name - The name of this item. Typically derived from the product or sku name.
    • setUri

      public void setUri(String uri)
      The navigable uri of the corresponding catalog entry (e.g. product) for this purchase item.
      Parameters:
      uri - The navigable uri of the corresponding catalog entry (e.g. product) for this purchase item.
    • setQuantity

      public void setQuantity(int quantity)
      The number of this item in the Purchase.
      Parameters:
      quantity - The number of this item in the Purchase.
    • setPriceListId

      public void setPriceListId(String priceListId)
      The id of the price list used to get the pricing for this PurchaseItem.
      Parameters:
      priceListId - The id of the price list used to get the pricing for this PurchaseItem.
    • setUnitPrice

      public void setUnitPrice(javax.money.MonetaryAmount unitPrice)
      The individual unit price for an PurchaseItem.
      Parameters:
      unitPrice - The individual unit price for an PurchaseItem.
    • setVariantId

      public void setVariantId(String variantId)
      The id to the corresponding variant for this item.
      Parameters:
      variantId - The id to the corresponding variant for this item.
    • setProductId

      public void setProductId(String productId)
      The id to the corresponding product for this item.
      Parameters:
      productId - The id to the corresponding product for this item.
    • setCategoryIds

      public void setCategoryIds(Set<String> categoryIds)
      The ids to the corresponding categories for this item's product.
      Parameters:
      categoryIds - The ids to the corresponding categories for this item's product.
    • setProductTags

      public void setProductTags(List<String> productTags)
      The list of simple labels used to categorize the corresponding product for this item.
      Parameters:
      productTags - The list of simple labels used to categorize the corresponding product for this item.
    • setSku

      public void setSku(String sku)
      Represents a SKU code, similar to productId or variantId, except this is a unified, unique concept across both products and variants.
      Parameters:
      sku - The SKU (or SKU code) for a product or variant
    • setVendorRef

      public void setVendorRef(String vendorRef)
      A reference to the corresponding vendor for this item.
      Parameters:
      vendorRef - A reference to the corresponding vendor for this item.
    • setMerchandisingContext

      public void setMerchandisingContext(String merchandisingContext)
      Defines the merchandising context of the item to signify where it is added from.

      This field is intended to be used for items added from SELECTOR products, which allows for the possibility of targeting the items for discounts based on the fact that they came from the SELECTOR product.

      Parameters:
      merchandisingContext - The context of the item signifying where it's added from
    • setBrandId

      public void setBrandId(String brandId)
      The id to the corresponding data driven enum for this item's product's brand.
      Parameters:
      brandId - the id to the corresponding data driven enum for this item's product's brand
    • setMerchandisingTypeId

      public void setMerchandisingTypeId(String merchandisingTypeId)
      The id to the corresponding data driven enum for this item's product's merchandising type.
      Parameters:
      merchandisingTypeId - the id to the corresponding data driven enum for this item's product's merchandising type
    • setTargetDemographicId

      public void setTargetDemographicId(String targetDemographicId)
      The id to the corresponding data driven enum for this item's product's target demographic.
      Parameters:
      targetDemographicId - the id to the corresponding data driven enum for this item's product's target demographic
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Miscellaneous attributes for this item.
      Parameters:
      attributes - Miscellaneous attributes for this item.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object