Class ItemListItem

java.lang.Object
com.broadleafcommerce.cart.client.domain.ItemListItem
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class ItemListItem extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
An item of an Item List. Essentially contains a reference to a SKU and a quantity.
Author:
Jacob Mitash
See Also:
  • Constructor Details

    • ItemListItem

      public ItemListItem()
  • Method Details

    • getId

      public String getId()
      The ID of this Item List Item.
      Returns:
      the ID of this Item List Item
    • getItemListId

      public String getItemListId()
      The ID of the owning item list.
      Returns:
      the ID of the owning item list
    • getItemSkuRef

      public ItemSkuRef getItemSkuRef()
      A reference to the corresponding SKU of this item.
      Returns:
      a reference to the corresponding SKU of this item
    • getQuantity

      public Integer getQuantity()
      The number of this item in the item list.
      Returns:
      The number of this item in the item list
    • getAttributes

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

      public Map<String,Object> getInternalAttributes()
      Miscellaneous internal attributes for this item. Distinguished from getAttributes() in that this map is used for attributes that assist in the internal working of Broadleaf MicroServices. For example, attributes related to item merging.

      These attributes will not be passed along to a CartItem.

      Returns:
      Miscellaneous internal attributes for this item.
    • getAttributeChoices

      public Map<String,com.broadleafcommerce.order.common.domain.AttributeChoiceValue> getAttributeChoices()
      Attribute choices for this item driven by product options, where each key is the attributeName from an attribute choice.
      Returns:
      Attribute choices for this item driven by product options, where each key is the attributeName from an attribute choice.
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The ID of this Item List Item.
      Parameters:
      id - the ID of this Item List Item
    • setItemListId

      public void setItemListId(String itemListId)
      The ID of the owning item list.
      Parameters:
      itemListId - the ID of the owning item list
    • setItemSkuRef

      public void setItemSkuRef(ItemSkuRef itemSkuRef)
      A reference to the corresponding SKU of this item.
      Parameters:
      itemSkuRef - a reference to the corresponding SKU of this item
    • setQuantity

      public void setQuantity(Integer quantity)
      The number of this item in the item list.
      Parameters:
      quantity - The number of this item in the item list
    • setAttributes

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

      public void setInternalAttributes(Map<String,Object> internalAttributes)
      Miscellaneous internal attributes for this item. Distinguished from getAttributes() in that this map is used for attributes that assist in the internal working of Broadleaf MicroServices. For example, attributes related to item merging.

      These attributes will not be passed along to a CartItem.

      Parameters:
      internalAttributes - Miscellaneous internal attributes for this item.
    • setAttributeChoices

      public void setAttributeChoices(Map<String,com.broadleafcommerce.order.common.domain.AttributeChoiceValue> attributeChoices)
      Attribute choices for this item driven by product options, where each key is the attributeName from an attribute choice.
      Parameters:
      attributeChoices - Attribute choices for this item driven by product options, where each key is the attributeName from an attribute choice.
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this 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
    • toString

      public String toString()
      Overrides:
      toString in class Object