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

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

  • Method Details

    • isActive

      public boolean isActive()
      Inactive products are by default NOT searchable, NOT browseable, and NOT purchaseable.
      Returns:
      the active state of this current product
      See Also:
    • getNumericId

      public Long getNumericId()
    • getId

      public String getId()
      Context id
    • getCatalogItemContextId

      public String getCatalogItemContextId()
      Context id from catalog (product)
    • getName

      public String getName()
    • getSku

      public String getSku()
    • getUpc

      public String getUpc()
    • getExternalId

      public String getExternalId()
      This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.
      Returns:
      an external ID
    • getActiveStartDate

      public Instant getActiveStartDate()
    • getActiveEndDate

      public Instant getActiveEndDate()
      End when this product is not longer active. Unset indicates that it is always active.
      Returns:
      the date when this product should no longer be active
      See Also:
    • isOnline

      public boolean isOnline()

      Whether or not this product should be visible at all in the store. A product that is offline is not searchable, visible, or purchasable. A product that is offline behaves as if it falls outside the active date range. It is not returned from storefront requests by default.

      Defaults to true

      Returns:
      whether or not this product is visible in the store
    • isSearchable

      public boolean isSearchable()

      Whether or not this product shows up in search. Usually this matches whether or not the product is individuallySold

      This defaults to true

      Returns:
      whether or not this product shows up in search
    • isIndividuallySold

      public boolean isIndividuallySold()

      If this product or any of its variants can be sold individually in the store, or if they must be apart of another product as an add-on. Usually if a product is not individually sold then it should also not show up in search.

      This defaults to true.

      Returns:
      whether or not this product or any of its variants can be sold individually
      See Also:
      • searchable
    • getAttributes

      public Map<String,Object> getAttributes()
      Dynamic attributes that are a part of the product. This is an admin-centered concept
      Returns:
      dynamic attributes that are a part of the product
    • setNumericId

      public void setNumericId(Long numericId)
    • setId

      public void setId(String id)
      Context id
    • setCatalogItemContextId

      public void setCatalogItemContextId(String catalogItemContextId)
      Context id from catalog (product)
    • setName

      public void setName(String name)
    • setSku

      public void setSku(String sku)
    • setUpc

      public void setUpc(String upc)
    • setExternalId

      public void setExternalId(String externalId)
      This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.
      Parameters:
      externalId - an external ID, often a DB or business ID, from a system outside of Broadleaf
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
    • setActiveEndDate

      public void setActiveEndDate(Instant activeEndDate)
      End when this product is not longer active. Unset indicates that it is always active.
      Parameters:
      activeEndDate - the date when this product should no longer be active
      See Also:
    • setOnline

      public void setOnline(boolean online)

      Whether or not this product should be visible at all in the store. A product that is offline is not searchable, visible, or purchasable. A product that is offline behaves as if it falls outside the active date range. It is not returned from storefront requests by default.

      Defaults to true

      Parameters:
      online - whether or not this product is visible in the store
    • setSearchable

      public void setSearchable(boolean searchable)

      Whether or not this product shows up in search. Usually this matches whether or not the product is individuallySold

      This defaults to true

      Parameters:
      searchable - whether or not this product shows up in search
    • setIndividuallySold

      public void setIndividuallySold(boolean individuallySold)

      If this product or any of its variants can be sold individually in the store, or if they must be apart of another product as an add-on. Usually if a product is not individually sold then it should also not show up in search.

      This defaults to true.

      Parameters:
      individuallySold - whether or not this product or any of its variants can be sold individually
      See Also:
      • searchable
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Dynamic attributes that are a part of the product. This is an admin-centered concept
      Parameters:
      attributes - dynamic attributes that are a part of the product
    • 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