Class ProductImpl
java.lang.Object
org.broadleafcommerce.core.catalog.domain.ProductImpl
- All Implemented Interfaces:
Serializable,AdminMainEntity,MultiTenantCloneable<Product>,Status,TemplatePathContainer,Locatable,Indexable,Product,ProductAdminPresentation
- Direct Known Subclasses:
ProductBundleImpl
@Entity
public class ProductImpl
extends Object
implements Product, ProductAdminPresentation, Status, AdminMainEntity, Locatable, TemplatePathContainer
The Class ProductImpl is the default implementation of
If you want to add fields specific to your implementation of BroadLeafCommerce you should extend this class and add your fields. If you need to make significant changes to the ProductImpl then you should implement your own version of
This implementation uses a Hibernate implementation of JPA configured through annotations. The Entity references the following tables: BLC_PRODUCT, BLC_PRODUCT_SKU_XREF, BLC_PRODUCT_IMAGE
Product. A product is a general
description of an item that can be sold (for example: a hat). Products are not sold or added to a
cart. Skus which are specific items (for example: a XL Blue Hat) are sold or added to a
cart. If you want to add fields specific to your implementation of BroadLeafCommerce you should extend this class and add your fields. If you need to make significant changes to the ProductImpl then you should implement your own version of
Product. This implementation uses a Hibernate implementation of JPA configured through annotations. The Entity references the following tables: BLC_PRODUCT, BLC_PRODUCT_SKU_XREF, BLC_PRODUCT_IMAGE
- Author:
- btaylor
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.core.catalog.domain.ProductAdminPresentation
ProductAdminPresentation.FieldOrder, ProductAdminPresentation.GroupName, ProductAdminPresentation.GroupOrder, ProductAdminPresentation.TabName, ProductAdminPresentation.TabOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<CategoryProductXref>protected ArchiveStatusprotected Stringprotected Booleanprotected List<RelatedProduct>protected CategoryDeprecated.protected Skuprotected Stringprotected Booleanstatic final Stringprotected LongThe id.protected Stringprotected Stringprotected Stringprotected Stringprotected Booleanprotected List<ProductAttribute>protected List<ProductOptionXref>protected Stringprotected List<RelatedProduct>protected Stringprotected StringFields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves any currently stored dynamic pricing<G extends Product>
CreateResponse<G>booleanReturns the last date a product will be available that is used to determine whether to display the product.Returns the first date a product will be available that is used to determine whether to display the product.Gets all the additional Skus associated with this Product.Deprecated.Returns all parentCategoryids this product is associated with.Retrieve all the xref entities linking this product to parent categoriesReturns all skus that are sellable.Convenience method for returning all of the media associated with this Product by adding all the media inProduct.getDefaultSku()as well as all the media in the Skus represented byProduct.getAdditionalSkus()Returns all theSkus that are associated with this Product (includingProduct.getDefaultSku()) regardless of whether or not theSkus are active or not
Note: in the event that the default Sku was added to the list ofProduct.getAdditionalSkus(), it is filtered out so that only a single instance ofProduct.getDefaultSku()is contained in the resulting listgetAllSkus(boolean includeDefaultSku) Gets the canonical URL of the productReturn theCategorythat contains this productGets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()Returns a List of this product's related Cross SalesReturns a list of the cross sale products for this product as well all cross sale products in all parent categories of this product.Returns a list of the upsale products for this product as well as all upsale products in all parent categories of this product.Deprecated.Gets the defaultSkuassociated with this Product.getDepth()Returns the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()Returns a brief description of the product that is used for display.Returns theDimensionfor this product
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()Returns a String representation of the dimension
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()Returns the name of a display template that is used to render this product.Which type ofFieldshould be queried for when looking up database-driven search fields to store in the search indexGenerates a URL that can be used to access the product.getGirth()Gets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()Returns the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()getId()The id of the Product.Returns a long description of the product that is used for display.Returns the manufacture name for this productadded just for convenience, references defaultSku.margingetMedia()Gets the media for this product.Gets the meta data description of the productGets the meta data title of the productgetModel()Returns the model number of the productgetName()Returns the name of the product that is used for display purposes.The specifiedPromotionMessages for this Product that will override the Offer's defaultPromotionMessage.getPrice()Convenience method, references defaultSku.priceDeprecated.The availableProductOptions for this Product.Returns a Map of product option values, keyed by the product option name.Gets the promotional message for this Product.Convenience method, references to defaultSku.retailPriceprotected MoneyConvenience method, references defaultSku.salePriceprotected MoneygetSize()Returns the dimension container sizegetSkus()Deprecated.Returns the tax code of the product.Returns a List of this product's related Up SalesgetUrl()A product can have a designated URL.Sets a url-fragment.Returns the weight of the product
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()getWidth()Returns the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()inthashCode()booleanIn most implementations, including the default Broadleaf demo store, if a product doesn't have a retail price, it can't be sold.booleanisActive()Returns a boolean that indicates if the product is currently active.booleanisOnSale()Convenience method, references defaultSku.onSalevoidsetActiveEndDate(Date activeEndDate) Sets the last date a product will be available that is used to determine whether to display the product.voidsetActiveStartDate(Date activeStartDate) Sets the first date a product will be available that is used to determine whether to display the product.voidsetAdditionalSkus(List<Sku> skus) Deprecated.voidsetAllParentCategories(List<Category> allParentCategories) Deprecated.voidsetAllParentCategoryXrefs(List<CategoryProductXref> allParentCategories) Set all the xref entities linking this product to parent categoriesvoidsetArchived(Character archived) voidsetCanonicalUrl(String canonicalUrl) Sets the canonical URL of the productvoidsetCanSellWithoutOptions(Boolean canSellWithoutOptions) Sets whether or not the default sku can be sold in the case that no product options are specified.voidsetCategory(Category category) Set theCategorythat contains this productvoidsetContainer(ContainerShapeType container) Sets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()voidsetCrossSaleProducts(List<RelatedProduct> crossSaleProducts) Sets the related Cross SalesvoidsetDefaultCategory(Category defaultCategory) Deprecated.voidsetDefaultSku(Sku defaultSku) Sets the default Sku for this Product
Note: this operation is cascaded with CascadeType.ALL which saves from having to persist the Product in 2 operations: first persist the Sku and then take the merged Sku, set it as this Product's default Sku, and then persist this Product.voidsetDepth(BigDecimal depth) Sets the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()voidsetDescription(String description) Sets a brief description of the product that is used for display.voidsetDimension(Dimension dimension) Sets theDimensionfor this product
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()voidsetDisplayTemplate(String displayTemplate) Sets the name of a display template that is used to render this product.voidsetEnableDefaultSkuInInventory(Boolean enableDefaultSkuInventory) enables or disables that inventory will be tracked by default sku instead of alt sku in case of alt sku existencevoidsetGirth(BigDecimal girth) Sets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()voidsetHeight(BigDecimal height) Sets the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()voidSets the id of the Product.voidsetLongDescription(String longDescription) Sets a long description of the product that is used for display.voidsetManufacturer(String manufacturer) Sets the manufacture for this productvoidGets the media for this product.voidsetMetaDescription(String metaDescription) Sets the meta data description of the productvoidsetMetaTitle(String metaTitle) Sets the meta data title of the productvoidSets the model number of the productvoidSets the name of the product that is used for display purposes.voidsetOverrideGeneratedUrl(Boolean overrideGeneratedUrl) Sets the flag for whether or not the URL should not be generated in the adminvoidsetProductAttributes(Map<String, ProductAttribute> productAttributes) Sets a generic list of key-value pairs for ProductvoidsetProductOptions(List<ProductOption> productOptions) Sets the list of available ProductOptions for this ProductvoidsetProductOptionXrefs(List<ProductOptionXref> productOptions) voidsetPromoMessage(String promoMessage) Sets the promotional message for this ProductvoidsetSize(ContainerSizeType size) Sets the dimension container size
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()voidsetTaxCode(String taxCode) Sets the tax code for this product.voidsetUpSaleProducts(List<RelatedProduct> upSaleProducts) Sets the related Up SalesvoidSets the URL that a customer could type in to reach this product.voidSets a url-fragment to be used with this product.voidSets the product weight
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()voidsetWidth(BigDecimal width) Sets the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()
-
Field Details
-
EXCLUDE_PRODUCT_CODE_COPY_HINT
- See Also:
-
id
The id. -
url
-
overrideGeneratedUrl
-
urlKey
-
displayTemplate
-
model
-
manufacturer
-
defaultSku
-
canSellWithoutOptions
-
metaTitle
-
metaDescription
-
canonicalUrl
-
skus
-
promoMessage
-
crossSaleProducts
-
upSaleProducts
-
additionalSkus
-
defaultCategory
Deprecated. -
allParentCategoryXrefs
-
productAttributes
-
productOptions
-
enableDefaultSkuInventory
-
productOptionMap
-
allParentCategoryIds
-
archiveStatus
-
-
Constructor Details
-
ProductImpl
public ProductImpl()
-
-
Method Details
-
getEnableDefaultSkuInInventory
- Specified by:
getEnableDefaultSkuInInventoryin interfaceProduct
-
setEnableDefaultSkuInInventory
Description copied from interface:Productenables or disables that inventory will be tracked by default sku instead of alt sku in case of alt sku existence- Specified by:
setEnableDefaultSkuInInventoryin interfaceProduct
-
getId
Description copied from interface:ProductThe id of the Product. -
setId
Description copied from interface:ProductSets the id of the Product. -
getName
Description copied from interface:ProductReturns the name of the product that is used for display purposes.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
setName
Description copied from interface:ProductSets the name of the product that is used for display purposes.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
getDescription
Description copied from interface:ProductReturns a brief description of the product that is used for display.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
getDescriptionin interfaceProduct- Returns:
- a brief description of the product
-
setDescription
Description copied from interface:ProductSets a brief description of the product that is used for display.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
setDescriptionin interfaceProduct- Parameters:
description- - a brief description of the product
-
getLongDescription
Description copied from interface:ProductReturns a long description of the product that is used for display.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
getLongDescriptionin interfaceProduct- Returns:
- a long description of the product
-
setLongDescription
Description copied from interface:ProductSets a long description of the product that is used for display.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
setLongDescriptionin interfaceProduct- Parameters:
longDescription- the long description
-
getActiveStartDate
Description copied from interface:ProductReturns the first date a product will be available that is used to determine whether to display the product.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
getActiveStartDatein interfaceProduct- Returns:
- the first date the product will be available
-
setActiveStartDate
Description copied from interface:ProductSets the first date a product will be available that is used to determine whether to display the product.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
setActiveStartDatein interfaceProduct- Parameters:
activeStartDate- - the first day the product is available
-
getActiveEndDate
Description copied from interface:ProductReturns the last date a product will be available that is used to determine whether to display the product.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
getActiveEndDatein interfaceProduct- Returns:
- the last day the product is available
-
setActiveEndDate
Description copied from interface:ProductSets the last date a product will be available that is used to determine whether to display the product.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
setActiveEndDatein interfaceProduct- Parameters:
activeEndDate- - the last day the product is available
-
isActive
public boolean isActive()Description copied from interface:ProductReturns a boolean that indicates if the product is currently active.
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
getModel
Description copied from interface:ProductReturns the model number of the product -
setModel
Description copied from interface:ProductSets the model number of the product -
getManufacturer
Description copied from interface:ProductReturns the manufacture name for this product- Specified by:
getManufacturerin interfaceProduct- Returns:
- the manufacture name
-
setManufacturer
Description copied from interface:ProductSets the manufacture for this product- Specified by:
setManufacturerin interfaceProduct
-
hasRetailPrice
public boolean hasRetailPrice()Description copied from interface:ProductIn most implementations, including the default Broadleaf demo store, if a product doesn't have a retail price, it can't be sold. This method returns true if in the current context, the product has a price. The current context may be different when accessed in an entperise context like one using PriceLists or MultiTentant.- Specified by:
hasRetailPricein interfaceProduct- Returns:
-
getRetailPrice
Description copied from interface:ProductConvenience method, references to defaultSku.retailPrice- Specified by:
getRetailPricein interfaceProduct- Returns:
-
getSalePrice
Description copied from interface:ProductConvenience method, references defaultSku.salePrice- Specified by:
getSalePricein interfaceProduct- Returns:
-
getRetailPriceInternal
-
getSalePriceInternal
-
getPrice
Description copied from interface:ProductConvenience method, references defaultSku.price -
isOnSale
public boolean isOnSale()Description copied from interface:ProductConvenience method, references defaultSku.onSale -
getMargin
Description copied from interface:Productadded just for convenience, references defaultSku.margin -
getDefaultSku
Description copied from interface:ProductGets the defaultSkuassociated with this Product. A Product is required to have a default Sku which holds specific information about the Product like weight, dimensions, price, etc. Many of the Product attributes that have getters and setters on Product are actually pass-through to the default Sku.
Products can also have multiple Skus associated with it that are represented byProductOptions. For instance, a large, blue shirt. For more information on that relationship seeProduct.getAdditionalSkus().- Specified by:
getDefaultSkuin interfaceProduct- Returns:
- the default Sku for this Product
-
setDefaultSku
Description copied from interface:ProductSets the default Sku for this Product
Note: this operation is cascaded with CascadeType.ALL which saves from having to persist the Product in 2 operations: first persist the Sku and then take the merged Sku, set it as this Product's default Sku, and then persist this Product.- Specified by:
setDefaultSkuin interfaceProduct- Parameters:
defaultSku- - the Sku that should be the default for this Product
-
getExternalId
- Specified by:
getExternalIdin interfaceProduct
-
getCanSellWithoutOptions
- Specified by:
getCanSellWithoutOptionsin interfaceProduct- Returns:
- whether or not the default sku can be used for a multi-sku product in the case that no product options are set. Defaults to false if not specified. Note that this only affects multi-sku products.
-
setCanSellWithoutOptions
Description copied from interface:ProductSets whether or not the default sku can be sold in the case that no product options are specified. Note that this only affects multi-sku products.- Specified by:
setCanSellWithoutOptionsin interfaceProduct
-
getMetaTitle
Description copied from interface:ProductGets the meta data title of the product- Specified by:
getMetaTitlein interfaceProduct- Returns:
-
setMetaTitle
Description copied from interface:ProductSets the meta data title of the product- Specified by:
setMetaTitlein interfaceProduct
-
getMetaDescription
Description copied from interface:ProductGets the meta data description of the product- Specified by:
getMetaDescriptionin interfaceProduct- Returns:
-
setMetaDescription
Description copied from interface:ProductSets the meta data description of the product- Specified by:
setMetaDescriptionin interfaceProduct
-
getCanonicalUrl
Description copied from interface:ProductGets the canonical URL of the product- Specified by:
getCanonicalUrlin interfaceProduct- Returns:
-
setCanonicalUrl
Description copied from interface:ProductSets the canonical URL of the product- Specified by:
setCanonicalUrlin interfaceProduct
-
getPromoMessage
Description copied from interface:ProductGets the promotional message for this Product. For instance, this could be a limited-time Product- Specified by:
getPromoMessagein interfaceProduct- Returns:
- the Product's promotional message
-
setPromoMessage
Description copied from interface:ProductSets the promotional message for this Product- Specified by:
setPromoMessagein interfaceProduct
-
getAllSkus
Description copied from interface:ProductReturns all theSkus that are associated with this Product (includingProduct.getDefaultSku()) regardless of whether or not theSkus are active or not
Note: in the event that the default Sku was added to the list ofProduct.getAdditionalSkus(), it is filtered out so that only a single instance ofProduct.getDefaultSku()is contained in the resulting list- Specified by:
getAllSkusin interfaceProduct- Returns:
- all the Skus associated to this Product
-
getAllSellableSkus
Description copied from interface:ProductReturns all skus that are sellable. If the product `canSellWithoutOptions` is true, the `defaultSku` is included in the list. Otherwise, the `defaultSku` is ignored.- Specified by:
getAllSellableSkusin interfaceProduct- Returns:
- all the sellable Skus associated to this Product
-
getAllSkus
-
getSkus
Deprecated.Description copied from interface:ProductReturns a list ofSkus filtered by whether the Skus are active or not. This list does not contain theProduct.getDefaultSku()and filters bySku.isActive().- Specified by:
getSkusin interfaceProduct- Returns:
- a list of active Skus from
Product.getAdditionalSkus()for this Product
-
getAdditionalSkus
Description copied from interface:ProductGets all the additional Skus associated with this Product. For instance, if this Product represented a T-shirt and you could pick the size of the T-shirt as aProductOption(like "small", "medium", "large") this would return 3 Skus if you had different inventory or price constraints on eachProductOptionValue.
This list does not take into account whether any of these additional Skus are active or not, nor does it contain theProduct.getDefaultSku()for this Product. For this functionality, seeProduct.getSkus()andProduct.getAllSkus(), respectively.- Specified by:
getAdditionalSkusin interfaceProduct- Returns:
- the additional Skus for this Product
-
setAdditionalSkus
Deprecated.Description copied from interface:ProductSets the additional Skus associated to this Product. These additional Skus should come fromProductOptionValues and are used in instance where you need to track inventory or change pricing on a per-option value basis.- Specified by:
setAdditionalSkusin interfaceProduct- Parameters:
skus- - a List ofSkus to associate with this Product, usually based off ofProductOptions
-
getDefaultCategory
Deprecated.Description copied from interface:ProductReturns the defaultCategorythis product is associated with. This method will delegate toProduct.getCategory()by default, unless the "use.legacy.default.category.mode" property is set to true in the implementation's property file. If set to true, this method will use legacy behavior, which is to return the deprecated defaultCategory field.- Specified by:
getDefaultCategoryin interfaceProduct
-
setDefaultCategory
Deprecated.Description copied from interface:ProductSets the defaultCategoryto associate this product with. This method will delegate toProduct.setCategory(Category)by default, unless the "use.legacy.default.category.mode" property is set to true in the implementation's property file. If set to true, this method will use legacy behavior, which is to set the deprecated defaultCategory field.- Specified by:
setDefaultCategoryin interfaceProduct- Parameters:
defaultCategory- - the defaultCategoryto associate this product with
-
getCategory
Description copied from interface:ProductReturn theCategorythat contains this product- Specified by:
getCategoryin interfaceProduct- Returns:
-
setCategory
Description copied from interface:ProductSet theCategorythat contains this product- Specified by:
setCategoryin interfaceProduct
-
getMedia
Description copied from interface:ProductGets the media for this product. This serves as a pass-through to theProduct.getDefaultSku()media -
setMedia
Description copied from interface:ProductGets the media for this product. This serves as a pass-through to theProduct.getDefaultSku()media -
getAllSkuMedia
Description copied from interface:ProductConvenience method for returning all of the media associated with this Product by adding all the media inProduct.getDefaultSku()as well as all the media in the Skus represented byProduct.getAdditionalSkus()- Specified by:
getAllSkuMediain interfaceProduct- Returns:
- all of the Media for all of the Skus for this Product
-
getAllParentCategoryXrefs
Description copied from interface:ProductRetrieve all the xref entities linking this product to parent categories- Specified by:
getAllParentCategoryXrefsin interfaceProduct
-
setAllParentCategoryXrefs
Description copied from interface:ProductSet all the xref entities linking this product to parent categories- Specified by:
setAllParentCategoryXrefsin interfaceProduct
-
getParentCategoryHierarchyIds
Description copied from interface:ProductThe specifiedPromotionMessages for this Product that will override the Offer's defaultPromotionMessage.- Specified by:
getParentCategoryHierarchyIdsin interfaceProduct- Returns:
- the
CategoryIds for this Product's parentCategoryhierarchy
-
getAllParentCategoryIds
Description copied from interface:ProductReturns all parentCategoryids this product is associated with.- Specified by:
getAllParentCategoryIdsin interfaceProduct- Returns:
- the all parent category ids for this product
-
getAllParentCategories
Deprecated.Description copied from interface:ProductReturns all parentCategory(s) this product is associated with.- Specified by:
getAllParentCategoriesin interfaceProduct- Returns:
- the all parent categories for this product
-
setAllParentCategories
Deprecated.Description copied from interface:ProductSets all parentCategorys this product is associated with.- Specified by:
setAllParentCategoriesin interfaceProduct- Parameters:
allParentCategories- - a List of all parentCategory(s) to associate this product with
-
getDimension
Description copied from interface:ProductReturns theDimensionfor this product
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
getDimensionin interfaceProduct- Returns:
- a ProductDimensions object
-
setDimension
Description copied from interface:ProductSets theDimensionfor this product
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
setDimensionin interfaceProduct
-
getWidth
Description copied from interface:ProductReturns the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
setWidth
Description copied from interface:ProductSets the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
getHeight
Description copied from interface:ProductReturns the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
setHeight
Description copied from interface:ProductSets the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
getDepth
Description copied from interface:ProductReturns the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
setDepth
Description copied from interface:ProductSets the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
getGirth
Description copied from interface:ProductGets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
setGirth
Description copied from interface:ProductSets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
getSize
Description copied from interface:ProductReturns the dimension container size
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
setSize
Description copied from interface:ProductSets the dimension container size
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
getContainer
Description copied from interface:ProductGets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
getContainerin interfaceProduct- Returns:
- dimension container shape
-
setContainer
Description copied from interface:ProductSets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
setContainerin interfaceProduct
-
getDimensionString
Description copied from interface:ProductReturns a String representation of the dimension
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku()- Specified by:
getDimensionStringin interfaceProduct- Returns:
- a dimension String
-
getWeight
Description copied from interface:ProductReturns the weight of the product
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
setWeight
Description copied from interface:ProductSets the product weight
Note: this is a convenience method that merely serves as a pass-through to the same method viaProduct.getDefaultSku() -
getCrossSaleProducts
Description copied from interface:ProductReturns a List of this product's related Cross Sales- Specified by:
getCrossSaleProductsin interfaceProduct- Returns:
-
setCrossSaleProducts
Description copied from interface:ProductSets the related Cross Sales- Specified by:
setCrossSaleProductsin interfaceProduct
-
getUpSaleProducts
Description copied from interface:ProductReturns a List of this product's related Up Sales- Specified by:
getUpSaleProductsin interfaceProduct- Returns:
-
setUpSaleProducts
Description copied from interface:ProductSets the related Up Sales- Specified by:
setUpSaleProductsin interfaceProduct
-
getCumulativeCrossSaleProducts
Description copied from interface:ProductReturns a list of the cross sale products for this product as well all cross sale products in all parent categories of this product.- Specified by:
getCumulativeCrossSaleProductsin interfaceProduct- Returns:
- the cumulative cross sale products
-
getCumulativeUpSaleProducts
Description copied from interface:ProductReturns a list of the upsale products for this product as well as all upsale products in all parent categories of this product.- Specified by:
getCumulativeUpSaleProductsin interfaceProduct- Returns:
- the cumulative upsale products
-
getProductAttributes
Deprecated.Description copied from interface:ProductGeneric key-value pair of attributes to associate to this Product for maximum extensibility.- Specified by:
getProductAttributesin interfaceProduct- Returns:
- the attributes for this Product
-
setProductAttributes
Description copied from interface:ProductSets a generic list of key-value pairs for Product- Specified by:
setProductAttributesin interfaceProduct
-
getMultiValueProductAttributes
- Specified by:
getMultiValueProductAttributesin interfaceProduct
-
getProductOptionXrefs
- Specified by:
getProductOptionXrefsin interfaceProduct
-
setProductOptionXrefs
- Specified by:
setProductOptionXrefsin interfaceProduct
-
getProductOptions
Description copied from interface:ProductThe availableProductOptions for this Product. For instance, if this Product is a T-Shirt, you might be able to specify a size and color. This would be modeled by 2ProductOptions, each that could have multipleProductOptionValues (which could be "small" "medium" "large", "blue", "yellow", "green"). For specific pricing or inventory needs on a per-value basis, multiple Skus can be associated to this Product based off of theProductOptionValues- Specified by:
getProductOptionsin interfaceProduct- Returns:
- the
ProductOptions for this Product
-
setProductOptions
Description copied from interface:ProductSets the list of available ProductOptions for this Product- Specified by:
setProductOptionsin interfaceProduct
-
getUrl
Description copied from interface:ProductA product can have a designated URL. When set, the ProductHandlerMapping will check for this URL and forward this user to theProduct.getDisplayTemplate().Alternatively, most sites will rely on the
Product.getGeneratedUrl()to define the url for a product page. -
setUrl
Description copied from interface:ProductSets the URL that a customer could type in to reach this product. -
getOverrideGeneratedUrl
- Specified by:
getOverrideGeneratedUrlin interfaceProduct- Returns:
- the flag for whether or not the URL should not be generated in the admin
-
setOverrideGeneratedUrl
Description copied from interface:ProductSets the flag for whether or not the URL should not be generated in the admin- Specified by:
setOverrideGeneratedUrlin interfaceProduct
-
getDisplayTemplate
Description copied from interface:ProductReturns the name of a display template that is used to render this product. Most implementations have a default template for all products. This allows for the user to define a specific template to be used by this product.- Specified by:
getDisplayTemplatein interfaceProduct- Specified by:
getDisplayTemplatein interfaceTemplatePathContainer
-
setDisplayTemplate
Description copied from interface:ProductSets the name of a display template that is used to render this product. Most implementations have a default template for all products. This allows for the user to define a specific template to be used by this product.- Specified by:
setDisplayTemplatein interfaceProduct
-
getArchived
- Specified by:
getArchivedin interfaceStatus
-
setArchived
- Specified by:
setArchivedin interfaceStatus
-
getProductOptionValuesMap
Description copied from interface:ProductReturns a Map of product option values, keyed by the product option name. E.g. "color":["red","green","black"]- Specified by:
getProductOptionValuesMapin interfaceProduct- Returns:
-
hashCode
public int hashCode() -
equals
-
getUrlKey
Description copied from interface:ProductSets a url-fragment. By default, the system will attempt to create a unique url-fragment for this product by taking the {@link Product.getName()} and removing special characters and replacing dashes with spaces. -
setUrlKey
Description copied from interface:ProductSets a url-fragment to be used with this product. By default, the system will attempt to create a unique url-fragment for this product by taking the {@link Product.getName()} and removing special characters and replacing dashes with spaces. -
getGeneratedUrl
Description copied from interface:ProductGenerates a URL that can be used to access the product. Builds the url by combining the url of the default category with the getUrlKey() of this product.- Specified by:
getGeneratedUrlin interfaceProduct
-
clearDynamicPrices
public void clearDynamicPrices()Description copied from interface:ProductRemoves any currently stored dynamic pricing- Specified by:
clearDynamicPricesin interfaceProduct
-
getMainEntityName
- Specified by:
getMainEntityNamein interfaceAdminMainEntity
-
createOrRetrieveCopyInstance
public <G extends Product> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<Product>- Throws:
CloneNotSupportedException
-
getTaxCode
Description copied from interface:ProductReturns the tax code of the product. If the tax code is null, then returns the tax code of this products category.- Specified by:
getTaxCodein interfaceProduct- Returns:
- taxCode
-
setTaxCode
Description copied from interface:ProductSets the tax code for this product.- Specified by:
setTaxCodein interfaceProduct
-
getLocation
- Specified by:
getLocationin interfaceLocatable
-
getFieldEntityType
Description copied from interface:IndexableWhich type ofFieldshould be queried for when looking up database-driven search fields to store in the search index
-