|
||||||||||
| 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 Date |
activeEndDate
The active end date. |
protected Date |
activeStartDate
The active start date. |
protected List<Product> |
allParentProducts
|
protected Character |
available
The available. |
protected String |
description
The description. |
protected Character |
discountable
The discountable. |
protected DynamicSkuPrices |
dynamicPrices
|
protected Long |
id
The id. |
protected String |
longDescription
The long description. |
protected String |
name
The name. |
protected BigDecimal |
retailPrice
The retail price. |
protected BigDecimal |
salePrice
The sale price. |
protected List<SkuAttribute> |
skuAttributes
|
protected Map<String,String> |
skuImages
Deprecated. |
protected Map<String,Media> |
skuMedia
The sku media. |
protected Character |
taxable
The taxable. |
| Constructor Summary | |
|---|---|
SkuImpl()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Date |
getActiveEndDate()
Returns the the last date that the Sku should be available for sale. |
Date |
getActiveStartDate()
Returns the first date that the Sku should be available for sale. |
List<Product> |
getAllParentProducts()
Get all the parent products since a sku can exist in multiple |
Boolean |
getAvailable()
|
String |
getDescription()
Returns the brief description of the Sku. |
Boolean |
getDiscountable()
|
Long |
getId()
Returns the id of this sku |
Money |
getListPrice()
Returns the List Price of the Sku. |
String |
getLongDescription()
Returns the long description of the sku. |
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. |
List<SkuAttribute> |
getSkuAttributes()
|
String |
getSkuImage(String imageKey)
Deprecated. |
Map<String,String> |
getSkuImages()
Deprecated. |
Map<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. |
Boolean |
getTaxable()
|
int |
hashCode()
|
boolean |
isActive()
Returns a boolean indicating whether this sku is active. |
boolean |
isActive(Product product,
Category category)
|
Boolean |
isAvailable()
Returns whether the Sku is available. |
Boolean |
isDiscountable()
Returns whether the Sku qualifies for discounts or not. |
Boolean |
isTaxable()
Returns whether the Sku qualifies for taxes or not. |
void |
setActiveEndDate(Date activeEndDate)
Sets the the last date that the Sku should be available for sale. |
void |
setActiveStartDate(Date activeStartDate)
Sets the the first date that the Sku should be available for sale. |
void |
setAllParentProducts(List<Product> allParentProducts)
Set all the parent products since a sku can exist in multiple |
void |
setAvailable(Boolean available)
Sets the whether the Sku is available. |
void |
setDescription(String description)
Sets the brief description of the Sku. |
void |
setDiscountable(Boolean discountable)
Sets the whether the Sku qualifies for discounts or not. |
void |
setId(Long id)
Sets the id of this sku |
void |
setListPrice(Money listPrice)
Sets the the List Price of the Sku. |
void |
setLongDescription(String longDescription)
Sets the long description of the sku. |
void |
setName(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(List<SkuAttribute> skuAttributes)
|
void |
setSkuImages(Map<String,String> skuImages)
Deprecated. |
void |
setSkuMedia(Map<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(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 Long id
protected BigDecimal salePrice
protected BigDecimal retailPrice
protected String name
protected String description
protected String longDescription
protected Character taxable
protected Character discountable
protected Character available
protected Date activeStartDate
protected Date activeEndDate
protected DynamicSkuPrices dynamicPrices
@Deprecated protected Map<String,String> skuImages
protected Map<String,Media> skuMedia
protected List<Product> allParentProducts
protected List<SkuAttribute> skuAttributes
| Constructor Detail |
|---|
public SkuImpl()
| Method Detail |
|---|
public Long getId()
Sku
getId in interface Skupublic void setId(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 String getName()
Sku
getName in interface Skupublic void setName(String name)
Sku
setName in interface Skupublic String getDescription()
Sku
getDescription in interface Skupublic void setDescription(String description)
Sku
setDescription in interface Skupublic String getLongDescription()
Sku
getLongDescription in interface Skupublic void setLongDescription(String longDescription)
Sku
setLongDescription in interface Skupublic Boolean isTaxable()
Sku
isTaxable in interface Skupublic Boolean getTaxable()
public void setTaxable(Boolean taxable)
Sku
setTaxable in interface Skupublic Boolean isDiscountable()
Sku
isDiscountable in interface Skupublic Boolean getDiscountable()
public void setDiscountable(Boolean discountable)
Sku
setDiscountable in interface Skupublic Boolean isAvailable()
Sku
isAvailable in interface Skupublic Boolean getAvailable()
public void setAvailable(Boolean available)
Sku
setAvailable in interface Skupublic Date getActiveStartDate()
Sku
getActiveStartDate in interface Skupublic void setActiveStartDate(Date activeStartDate)
Sku
setActiveStartDate in interface Skupublic Date getActiveEndDate()
Sku
getActiveEndDate in interface Skupublic void setActiveEndDate(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 Map<String,String> getSkuImages()
Sku
getSkuImages in interface Sku@Deprecated public String getSkuImage(String imageKey)
Sku
getSkuImage in interface Sku@Deprecated public void setSkuImages(Map<String,String> skuImages)
Sku
setSkuImages in interface Skupublic Map<String,Media> getSkuMedia()
Sku
getSkuMedia in interface Skupublic void setSkuMedia(Map<String,Media> skuMedia)
Sku
setSkuMedia in interface Skupublic List<Product> getAllParentProducts()
Sku
getAllParentProducts in interface Skupublic void setAllParentProducts(List<Product> allParentProducts)
Sku
setAllParentProducts in interface Skupublic List<SkuAttribute> getSkuAttributes()
getSkuAttributes in interface Skupublic void setSkuAttributes(List<SkuAttribute> skuAttributes)
setSkuAttributes in interface SkuskuAttributes - the skuAttributes to setpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||