|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.catalog.domain.SkuImpl
@Entity public class SkuImpl
The Class SkuImpl is the default implementation of Sku. A SKU is a
specific item that can be sold including any specific attributes of the item
such as color or size.
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 SkuImpl then you should implement
your own version of Sku.
This implementation uses a Hibernate implementation of JPA configured through
annotations. The Entity references the following tables: BLC_SKU,
BLC_SKU_IMAGE
Sku},
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<Product> |
allParentProducts
|
protected java.lang.Character |
available
The available. |
protected java.lang.String |
description
The description. |
protected java.lang.Character |
discountable
The discountable. |
protected DynamicSkuPrices |
dynamicPrices
|
protected java.lang.Long |
id
The id. |
protected java.lang.String |
longDescription
The long description. |
protected java.lang.String |
name
The name. |
protected java.math.BigDecimal |
retailPrice
The retail price. |
protected java.math.BigDecimal |
salePrice
The sale price. |
protected java.util.List<SkuAttribute> |
skuAttributes
|
protected java.util.Map<java.lang.String,java.lang.String> |
skuImages
Deprecated. |
protected java.util.Map<java.lang.String,Media> |
skuMedia
The sku media. |
protected java.lang.Character |
taxable
The taxable. |
| Constructor Summary | |
|---|---|
SkuImpl()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.util.Date |
getActiveEndDate()
Returns the the last date that the Sku should be available for sale. |
java.util.Date |
getActiveStartDate()
Returns the first date that the Sku should be available for sale. |
java.util.List<Product> |
getAllParentProducts()
Get all the parent products since a sku can exist in multiple |
java.lang.Boolean |
getAvailable()
|
java.lang.String |
getDescription()
Returns the brief description of the Sku. |
java.lang.Boolean |
getDiscountable()
|
java.lang.Long |
getId()
Returns the id of this sku |
Money |
getListPrice()
Returns the List Price of the Sku. |
java.lang.String |
getLongDescription()
Returns the long description of the sku. |
java.lang.String |
getName()
Returns the name of the Sku. |
Money |
getRetailPrice()
Returns the Retail Price of the Sku. |
Money |
getSalePrice()
Returns the Sale Price of the Sku. |
java.util.List<SkuAttribute> |
getSkuAttributes()
|
java.lang.String |
getSkuImage(java.lang.String imageKey)
Deprecated. |
java.util.Map<java.lang.String,java.lang.String> |
getSkuImages()
Deprecated. |
java.util.Map<java.lang.String,Media> |
getSkuMedia()
Returns a map of key/value pairs where the key is a string for the name of a media object and the value is a media object. |
java.lang.Boolean |
getTaxable()
|
int |
hashCode()
|
boolean |
isActive()
Returns a boolean indicating whether this sku is active. |
boolean |
isActive(Product product,
Category category)
|
java.lang.Boolean |
isAvailable()
Returns whether the Sku is available. |
java.lang.Boolean |
isDiscountable()
Returns whether the Sku qualifies for discounts or not. |
java.lang.Boolean |
isTaxable()
Returns whether the Sku qualifies for taxes or not. |
void |
setActiveEndDate(java.util.Date activeEndDate)
Sets the the last date that the Sku should be available for sale. |
void |
setActiveStartDate(java.util.Date activeStartDate)
Sets the the first date that the Sku should be available for sale. |
void |
setAllParentProducts(java.util.List<Product> allParentProducts)
Set all the parent products since a sku can exist in multiple |
void |
setAvailable(java.lang.Boolean available)
Sets the whether the Sku is available. |
void |
setDescription(java.lang.String description)
Sets the brief description of the Sku. |
void |
setDiscountable(java.lang.Boolean discountable)
Sets the whether the Sku qualifies for discounts or not. |
void |
setId(java.lang.Long id)
Sets the id of this sku |
void |
setListPrice(Money listPrice)
Sets the the List Price of the Sku. |
void |
setLongDescription(java.lang.String longDescription)
Sets the long description of the sku. |
void |
setName(java.lang.String name)
Sets the the name of the Sku. |
void |
setRetailPrice(Money retailPrice)
|
void |
setSalePrice(Money salePrice)
Sets the the Sale Price of the Sku. |
void |
setSkuAttributes(java.util.List<SkuAttribute> skuAttributes)
|
void |
setSkuImages(java.util.Map<java.lang.String,java.lang.String> skuImages)
Deprecated. |
void |
setSkuMedia(java.util.Map<java.lang.String,Media> skuMedia)
Sets a map of key/value pairs where the key is a string for the name of a media object and the value is an object of type Media. |
void |
setTaxable(java.lang.Boolean taxable)
Sets the whether the Sku qualifies for taxes or not. |
| 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.math.BigDecimal salePrice
protected java.math.BigDecimal retailPrice
protected java.lang.String name
protected java.lang.String description
protected java.lang.String longDescription
protected java.lang.Character taxable
protected java.lang.Character discountable
protected java.lang.Character available
protected java.util.Date activeStartDate
protected java.util.Date activeEndDate
protected DynamicSkuPrices dynamicPrices
@Deprecated protected java.util.Map<java.lang.String,java.lang.String> skuImages
protected java.util.Map<java.lang.String,Media> skuMedia
protected java.util.List<Product> allParentProducts
protected java.util.List<SkuAttribute> skuAttributes
| Constructor Detail |
|---|
public SkuImpl()
| Method Detail |
|---|
public java.lang.Long getId()
Sku
getId in interface Skupublic void setId(java.lang.Long id)
Sku
setId in interface Skupublic Money getSalePrice()
Sku
getSalePrice in interface Skupublic void setSalePrice(Money salePrice)
Sku
setSalePrice in interface Skupublic Money getRetailPrice()
Sku
getRetailPrice in interface Skupublic void setRetailPrice(Money retailPrice)
setRetailPrice in interface Skupublic Money getListPrice()
Sku
getListPrice in interface Skupublic void setListPrice(Money listPrice)
Sku
setListPrice in interface Skupublic java.lang.String getName()
Sku
getName in interface Skupublic void setName(java.lang.String name)
Sku
setName in interface Skupublic java.lang.String getDescription()
Sku
getDescription in interface Skupublic void setDescription(java.lang.String description)
Sku
setDescription in interface Skupublic java.lang.String getLongDescription()
Sku
getLongDescription in interface Skupublic void setLongDescription(java.lang.String longDescription)
Sku
setLongDescription in interface Skupublic java.lang.Boolean isTaxable()
Sku
isTaxable in interface Skupublic java.lang.Boolean getTaxable()
public void setTaxable(java.lang.Boolean taxable)
Sku
setTaxable in interface Skupublic java.lang.Boolean isDiscountable()
Sku
isDiscountable in interface Skupublic java.lang.Boolean getDiscountable()
public void setDiscountable(java.lang.Boolean discountable)
Sku
setDiscountable in interface Skupublic java.lang.Boolean isAvailable()
Sku
isAvailable in interface Skupublic java.lang.Boolean getAvailable()
public void setAvailable(java.lang.Boolean available)
Sku
setAvailable in interface Skupublic java.util.Date getActiveStartDate()
Sku
getActiveStartDate in interface Skupublic void setActiveStartDate(java.util.Date activeStartDate)
Sku
setActiveStartDate in interface Skupublic java.util.Date getActiveEndDate()
Sku
getActiveEndDate in interface Skupublic void setActiveEndDate(java.util.Date activeEndDate)
Sku
setActiveEndDate in interface Skupublic boolean isActive()
Sku
isActive in interface Sku
public boolean isActive(Product product,
Category category)
isActive in interface Sku@Deprecated public java.util.Map<java.lang.String,java.lang.String> getSkuImages()
Sku
getSkuImages in interface Sku@Deprecated public java.lang.String getSkuImage(java.lang.String imageKey)
Sku
getSkuImage in interface Sku@Deprecated public void setSkuImages(java.util.Map<java.lang.String,java.lang.String> skuImages)
Sku
setSkuImages in interface Skupublic java.util.Map<java.lang.String,Media> getSkuMedia()
Sku
getSkuMedia in interface Skupublic void setSkuMedia(java.util.Map<java.lang.String,Media> skuMedia)
Sku
setSkuMedia in interface Skupublic java.util.List<Product> getAllParentProducts()
Sku
getAllParentProducts in interface Skupublic void setAllParentProducts(java.util.List<Product> allParentProducts)
Sku
setAllParentProducts in interface Skupublic java.util.List<SkuAttribute> getSkuAttributes()
getSkuAttributes in interface Skupublic void setSkuAttributes(java.util.List<SkuAttribute> skuAttributes)
setSkuAttributes in interface SkuskuAttributes - the skuAttributes to setpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||