Class PurchaseItem
java.lang.Object
com.broadleafcommerce.recommendationengine.domain.PurchaseItem
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanMiscellaneous attributes for this item.The id to the corresponding data driven enum for this item's product's brand.The ids to the corresponding categories for this item's product.getId()The context ID of the purchase.Defines the merchandising context of the item to signify where it is added from.The id to the corresponding data driven enum for this item's product's merchandising type.getName()The name of this item.The id of the price list used to get the pricing for thisPurchaseItem.The id to the corresponding product for this item.The list of simple labels used to categorize the corresponding product for this item.The owning purchase of this item.intThe number of this item in thePurchase.getSku()Represents a SKU code, similar to productId or variantId, except this is a unified, unique concept across both products and variants.The id to the corresponding data driven enum for this item's product's target demographic.javax.money.MonetaryAmountThe individual unit price for anPurchaseItem.getUri()The navigable uri of the corresponding catalog entry (e.g.The id to the corresponding variant for this item.A reference to the corresponding vendor for this item.inthashCode()voidsetAttributes(Map<String, Object> attributes) Miscellaneous attributes for this item.voidsetBrandId(String brandId) The id to the corresponding data driven enum for this item's product's brand.voidsetCategoryIds(Set<String> categoryIds) The ids to the corresponding categories for this item's product.voidThe context ID of the purchase.voidsetMerchandisingContext(String merchandisingContext) Defines the merchandising context of the item to signify where it is added from.voidsetMerchandisingTypeId(String merchandisingTypeId) The id to the corresponding data driven enum for this item's product's merchandising type.voidThe name of this item.voidsetPriceListId(String priceListId) The id of the price list used to get the pricing for thisPurchaseItem.voidsetProductId(String productId) The id to the corresponding product for this item.voidsetProductTags(List<String> productTags) The list of simple labels used to categorize the corresponding product for this item.voidsetPurchase(Purchase purchase) The owning purchase of this item.voidsetQuantity(int quantity) The number of this item in thePurchase.voidRepresents a SKU code, similar to productId or variantId, except this is a unified, unique concept across both products and variants.voidsetTargetDemographicId(String targetDemographicId) The id to the corresponding data driven enum for this item's product's target demographic.voidsetUnitPrice(javax.money.MonetaryAmount unitPrice) The individual unit price for anPurchaseItem.voidThe navigable uri of the corresponding catalog entry (e.g.voidsetVariantId(String variantId) The id to the corresponding variant for this item.voidsetVendorRef(String vendorRef) A reference to the corresponding vendor for this item.toString()
-
Constructor Details
-
PurchaseItem
public PurchaseItem()
-
-
Method Details
-
getId
The context ID of the purchase.- Returns:
- the context ID of the purchase
-
getPurchase
The owning purchase of this item.- Returns:
- the purchase that owns this item
-
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
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 thePurchase.- Returns:
- The number of this item in the
Purchase.
-
getPriceListId
The id of the price list used to get the pricing for thisPurchaseItem.- 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 anPurchaseItem.- Returns:
- The individual unit price for an
PurchaseItem.
-
getVariantId
The id to the corresponding variant for this item.- Returns:
- The id to the corresponding variant for this item.
-
getProductId
The id to the corresponding product for this item.- Returns:
- The id to the corresponding product for this item.
-
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
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
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
A reference to the corresponding vendor for this item.- Returns:
- A reference to the corresponding vendor for this item.
-
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
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
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
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
Miscellaneous attributes for this item.- Returns:
- Miscellaneous attributes for this item.
-
setId
The context ID of the purchase.- Parameters:
id- the context ID of the purchase
-
setPurchase
The owning purchase of this item.- Parameters:
purchase- the purchase that should own this item
-
setName
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
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 thePurchase.- Parameters:
quantity- The number of this item in thePurchase.
-
setPriceListId
The id of the price list used to get the pricing for thisPurchaseItem.- Parameters:
priceListId- The id of the price list used to get the pricing for thisPurchaseItem.
-
setUnitPrice
public void setUnitPrice(javax.money.MonetaryAmount unitPrice) The individual unit price for anPurchaseItem.- Parameters:
unitPrice- The individual unit price for anPurchaseItem.
-
setVariantId
The id to the corresponding variant for this item.- Parameters:
variantId- The id to the corresponding variant for this item.
-
setProductId
The id to the corresponding product for this item.- Parameters:
productId- The id to the corresponding product for this item.
-
setCategoryIds
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
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
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
A reference to the corresponding vendor for this item.- Parameters:
vendorRef- A reference to the corresponding vendor for this item.
-
setMerchandisingContext
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
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
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
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
Miscellaneous attributes for this item.- Parameters:
attributes- Miscellaneous attributes for this item.
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-