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