|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.catalog.domain.ProductImpl
@Entity public class ProductImpl
The Class ProductImpl is the default implementation of 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
Product}, {@link SkuImpl}, {@link CategoryImpl},
Serialized Form| Field Summary | |
|---|---|
protected java.util.Date |
activeEndDate
The active end date. |
protected java.util.Date |
activeStartDate
The active start date. |
protected java.util.List<Category> |
allParentCategories
|
protected java.util.List<Sku> |
allSkus
The all skus. |
protected java.util.List<RelatedProduct> |
crossSaleProducts
|
protected Category |
defaultCategory
The default category. |
protected java.lang.String |
description
The description. |
protected ProductDimension |
dimension
The product dimensions |
protected java.lang.Long |
id
The id. |
protected boolean |
isFeaturedProduct
|
protected boolean |
isMachineSortable
|
protected java.lang.String |
longDescription
The long description. |
protected java.lang.String |
manufacturer
The manufacture name |
protected java.lang.String |
model
The product model number |
protected java.lang.String |
name
The name. |
protected java.util.List<ProductAttribute> |
productAttributes
|
protected java.util.Map<java.lang.String,java.lang.String> |
productImages
Deprecated. |
protected java.util.Map<java.lang.String,Media> |
productMedia
The product media. |
protected java.lang.String |
promoMessage
|
protected java.util.List<Sku> |
skus
The skus. |
protected java.util.List<RelatedProduct> |
upSaleProducts
|
protected ProductWeight |
weight
The product weight |
| Constructor Summary | |
|---|---|
ProductImpl()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.util.Date |
getActiveEndDate()
Returns the last date a product will be available that is used to determine whether to display the product. |
java.util.Date |
getActiveStartDate()
Returns the first date a product will be available that is used to determine whether to display the product. |
java.util.List<Category> |
getAllParentCategories()
Returns all parent Category(s) this product is associated with. |
java.util.List<Sku> |
getAllSkus()
Gets the all skus. |
ContainerShapeType |
getContainer()
|
java.util.List<RelatedProduct> |
getCrossSaleProducts()
Returns a List of this product's related Cross Sales |
Category |
getDefaultCategory()
Returns the default Category this product is associated with. |
java.math.BigDecimal |
getDepth()
Returns the product dimension depth |
java.lang.String |
getDescription()
Returns a brief description of the product that is used for display. |
ProductDimension |
getDimension()
Returns the ProductDimension for this product |
java.lang.String |
getDimensionString()
Returns the product dimensions as a String (assumes measurements are in inches) |
java.math.BigDecimal |
getGirth()
|
java.math.BigDecimal |
getHeight()
Returns the product dimension height |
java.lang.Long |
getId()
The id of the Product. |
java.lang.String |
getLongDescription()
Returns a long description of the product that is used for display. |
java.lang.String |
getManufacturer()
Returns the manufacture name for this product |
java.lang.String |
getModel()
Returns the model number of the product |
java.lang.String |
getName()
Returns the name of the product that is used for display purposes. |
java.util.List<ProductAttribute> |
getProductAttributes()
|
java.lang.String |
getProductImage(java.lang.String imageKey)
Deprecated. |
java.util.Map<java.lang.String,java.lang.String> |
getProductImages()
Deprecated. |
java.util.Map<java.lang.String,Media> |
getProductMedia()
Returns a map of key/value pairs that associate the media name (key) with the Media object(value) |
java.lang.String |
getPromoMessage()
|
ContainerSizeType |
getSize()
|
java.util.List<Sku> |
getSkus()
Returns a list of Skus that are part of this product. |
java.util.List<RelatedProduct> |
getUpSaleProducts()
Returns a List of this product's related Up Sales |
ProductWeight |
getWeight()
Returns the weight of the product |
java.math.BigDecimal |
getWidth()
Returns the product dimension width |
int |
hashCode()
|
boolean |
isActive()
Returns a boolean that indicates if the product is currently active. |
boolean |
isFeaturedProduct()
Returns whether or not the product is featured |
boolean |
isMachineSortable()
|
void |
setActiveEndDate(java.util.Date activeEndDate)
Sets the last date a product will be available that is used to determine whether to display the product. |
void |
setActiveStartDate(java.util.Date activeStartDate)
Sets the first date a product will be available that is used to determine whether to display the product. |
void |
setAllParentCategories(java.util.List<Category> allParentCategories)
Sets all parent Categorys this product is associated with. |
void |
setAllSkus(java.util.List<Sku> skus)
Sets the Skus that are to be associated with this product. |
void |
setContainer(ContainerShapeType container)
|
void |
setCrossSaleProducts(java.util.List<RelatedProduct> crossSaleProducts)
Sets the related Cross Sales |
void |
setDefaultCategory(Category defaultCategory)
Sets the default Category to associate this product with. |
void |
setDepth(java.math.BigDecimal depth)
Sets the product dimension depth |
void |
setDescription(java.lang.String description)
Sets a brief description of the product that is used for display. |
void |
setDimension(ProductDimension dimension)
Sets the ProductDimension for this product |
void |
setFeaturedProduct(boolean isFeaturedProduct)
Sets whether or not the product is featured |
void |
setGirth(java.math.BigDecimal girth)
|
void |
setHeight(java.math.BigDecimal height)
Sets the product dimension height |
void |
setId(java.lang.Long id)
Sets the id of the Product. |
void |
setLongDescription(java.lang.String longDescription)
Sets a long description of the product that is used for display. |
void |
setMachineSortable(boolean isMachineSortable)
|
void |
setManufacturer(java.lang.String manufacturer)
Sets the manufacture for this product |
void |
setModel(java.lang.String model)
Sets the model number of the product |
void |
setName(java.lang.String name)
Sets the name of the product that is used for display purposes. |
void |
setProductAttributes(java.util.List<ProductAttribute> productAttributes)
|
void |
setProductImages(java.util.Map<java.lang.String,java.lang.String> productImages)
Deprecated. |
void |
setProductMedia(java.util.Map<java.lang.String,Media> productMedia)
Sets the product media map. |
void |
setPromoMessage(java.lang.String promoMessage)
|
void |
setSize(ContainerSizeType size)
|
void |
setUpSaleProducts(java.util.List<RelatedProduct> upSaleProducts)
Sets the related Up Sales |
void |
setWeight(ProductWeight weight)
Sets the product weight |
void |
setWidth(java.math.BigDecimal width)
Sets the product dimension width |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Long id
protected java.lang.String name
protected java.lang.String description
protected java.lang.String longDescription
protected java.util.Date activeStartDate
protected java.util.Date activeEndDate
protected java.lang.String model
protected java.lang.String manufacturer
protected ProductDimension dimension
protected ProductWeight weight
protected boolean isFeaturedProduct
protected boolean isMachineSortable
protected java.util.List<Sku> skus
protected java.lang.String promoMessage
protected java.util.List<RelatedProduct> crossSaleProducts
protected java.util.List<RelatedProduct> upSaleProducts
protected java.util.List<Sku> allSkus
@Deprecated protected java.util.Map<java.lang.String,java.lang.String> productImages
protected java.util.Map<java.lang.String,Media> productMedia
protected Category defaultCategory
protected java.util.List<Category> allParentCategories
protected java.util.List<ProductAttribute> productAttributes
| Constructor Detail |
|---|
public ProductImpl()
| Method Detail |
|---|
public java.lang.Long getId()
Product
getId in interface Productpublic void setId(java.lang.Long id)
Product
setId in interface Productid - - the id of the productpublic java.lang.String getName()
Product
getName in interface Productpublic void setName(java.lang.String name)
Product
setName in interface Productname - - the name of the Productpublic java.lang.String getDescription()
Product
getDescription in interface Productpublic void setDescription(java.lang.String description)
Product
setDescription in interface Productdescription - - a brief description of the productpublic java.lang.String getLongDescription()
Product
getLongDescription in interface Productpublic void setLongDescription(java.lang.String longDescription)
Product
setLongDescription in interface ProductlongDescription - the long descriptionpublic java.util.Date getActiveStartDate()
Product
getActiveStartDate in interface Productpublic void setActiveStartDate(java.util.Date activeStartDate)
Product
setActiveStartDate in interface ProductactiveStartDate - - the first day the product is availablepublic java.util.Date getActiveEndDate()
Product
getActiveEndDate in interface Productpublic void setActiveEndDate(java.util.Date activeEndDate)
Product
setActiveEndDate in interface ProductactiveEndDate - - the last day the product is availablepublic boolean isActive()
Product
isActive in interface Productpublic java.lang.String getModel()
Product
getModel in interface Productpublic void setModel(java.lang.String model)
Product
setModel in interface Productpublic java.lang.String getManufacturer()
Product
getManufacturer in interface Productpublic void setManufacturer(java.lang.String manufacturer)
Product
setManufacturer in interface Productpublic ProductDimension getDimension()
ProductProductDimension for this product
getDimension in interface Productpublic void setDimension(ProductDimension dimension)
ProductProductDimension for this product
setDimension in interface Productpublic java.math.BigDecimal getWidth()
Product
getWidth in interface Productpublic void setWidth(java.math.BigDecimal width)
Product
setWidth in interface Productpublic java.math.BigDecimal getHeight()
Product
getHeight in interface Productpublic void setHeight(java.math.BigDecimal height)
Product
setHeight in interface Productpublic java.math.BigDecimal getDepth()
Product
getDepth in interface Productpublic void setDepth(java.math.BigDecimal depth)
Product
setDepth in interface Productpublic void setGirth(java.math.BigDecimal girth)
setGirth in interface Productpublic java.math.BigDecimal getGirth()
getGirth in interface Productpublic ContainerSizeType getSize()
getSize in interface Productpublic void setSize(ContainerSizeType size)
setSize in interface Productpublic ContainerShapeType getContainer()
getContainer in interface Productpublic void setContainer(ContainerShapeType container)
setContainer in interface Productpublic java.lang.String getDimensionString()
getDimensionString in interface Productpublic boolean isFeaturedProduct()
Product
isFeaturedProduct in interface Productpublic void setFeaturedProduct(boolean isFeaturedProduct)
Product
setFeaturedProduct in interface Productpublic boolean isMachineSortable()
isMachineSortable in interface Productpublic void setMachineSortable(boolean isMachineSortable)
setMachineSortable in interface Productpublic ProductWeight getWeight()
Product
getWeight in interface Productpublic void setWeight(ProductWeight weight)
Product
setWeight in interface Productpublic java.lang.String getPromoMessage()
getPromoMessage in interface Productpublic void setPromoMessage(java.lang.String promoMessage)
setPromoMessage in interface ProductpromoMessage - the promoMessage to setpublic java.util.List<Sku> getAllSkus()
getAllSkus in interface Productpublic java.util.List<Sku> getSkus()
ProductSkus that are part of this product.
getSkus in interface ProductSkus associated with this productpublic void setAllSkus(java.util.List<Sku> skus)
ProductSkus that are to be associated with this product.
setAllSkus in interface Productskus - - a List of Skus to associate with this product.@Deprecated public java.util.Map<java.lang.String,java.lang.String> getProductImages()
Product
getProductImages in interface Product@Deprecated public java.lang.String getProductImage(java.lang.String imageKey)
Product
getProductImage in interface ProductimageKey - - a string key to lookup the image for the product
@Deprecated public void setProductImages(java.util.Map<java.lang.String,java.lang.String> productImages)
Product
setProductImages in interface ProductproductImages - - a map of product imagespublic Category getDefaultCategory()
ProductCategory this product is associated with.
getDefaultCategory in interface Productpublic java.util.Map<java.lang.String,Media> getProductMedia()
Product
getProductMedia in interface Productpublic void setProductMedia(java.util.Map<java.lang.String,Media> productMedia)
Product
setProductMedia in interface Productpublic void setDefaultCategory(Category defaultCategory)
ProductCategory to associate this product with.
setDefaultCategory in interface ProductdefaultCategory - - the default Category to associate this product withpublic java.util.List<Category> getAllParentCategories()
ProductCategory(s) this product is associated with.
getAllParentCategories in interface Productpublic void setAllParentCategories(java.util.List<Category> allParentCategories)
ProductCategorys this product is associated with.
setAllParentCategories in interface ProductallParentCategories - - a List of all parent Category(s) to associate this product withpublic java.util.List<RelatedProduct> getCrossSaleProducts()
Product
getCrossSaleProducts in interface Productpublic void setCrossSaleProducts(java.util.List<RelatedProduct> crossSaleProducts)
Product
setCrossSaleProducts in interface Productpublic java.util.List<RelatedProduct> getUpSaleProducts()
Product
getUpSaleProducts in interface Productpublic void setUpSaleProducts(java.util.List<RelatedProduct> upSaleProducts)
Product
setUpSaleProducts in interface Productpublic java.util.List<ProductAttribute> getProductAttributes()
getProductAttributes in interface Productpublic void setProductAttributes(java.util.List<ProductAttribute> productAttributes)
setProductAttributes in interface Productpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||