com.elasticpath.domain.catalog.impl
Class ProductImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractPersistenceImpl
          extended by com.elasticpath.domain.impl.AbstractEntityImpl
              extended by com.elasticpath.domain.catalog.impl.ProductImpl
All Implemented Interfaces:
ObjectWithLocaleDependantFields, Product, LeafNode, Entity, EpDomain, Persistence, java.io.Serializable, java.lang.Comparable

public class ProductImpl
extends AbstractEntityImpl
implements Product

The default implementation of Product.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
ProductImpl()
          Default constructor.
 
Method Summary
 void addCategory(Category category)
          Add this product to the specified category.
 void addOrUpdateLocaleDependantFields(LocaleDependantFields ldf)
          Sets the LocaleDependantFields.
 void addOrUpdateProductAssocation(ProductAssociation productAssociation)
          Add or update the given product association to this product(as a source product).
 void addOrUpdateSku(ProductSku productSku)
          Adds or updates the given sku to the product.
 void addPrice(Price price)
          Convenience method for setting the price.
 int compareTo(java.lang.Object object)
          Compares this product with the specified object for order.
 boolean equals(java.lang.Object obj)
          Returns true if this category equals to the given object.
 void executeBeforePersistAction()
          Update the last modified date.
 ProductAssociation getAssociationById(long associationUid)
          Return the product association with the specified UID.
 java.util.Set getAssociationsByType(int associationType)
          Returns a set of ProductAssociations with the given association type.
 java.util.Set getAssociationsByType(int associationType, boolean includeAll)
          Returns a set of ProductAssociations with the given association type.
 java.util.Set getAssociationsByType(int associationType, java.util.List filterTargetProducts)
          Returns a set of ProductAssociations with the given association type.
 AttributeValueGroup getAttributeValueGroup()
          Get the attribute value group.
 java.util.List getAttributeValues(java.util.Locale locale)
          Returns a list of AttributeValues with the given locale for those attributes have values.
 BranchNode getBranchNode()
          Returns the branch node.
 Brand getBrand()
          Returns the brand/manufacturer of the product.
 java.util.Set getCategories()
          Returns the set of Categorys containing this product.
 java.lang.String getCode()
          Returns the product code.
 Category getDefaultCategory()
          Return the default Category of this product.
 ProductSku getDefaultSku()
          Returns the default SKU corresponding to this product.
 java.lang.String getDisplayName(java.util.Locale locale)
          Returns the display name of the given locale.
 java.util.Date getEndDate()
          Get the end date.
 java.util.List getFullAttributeValues(java.util.Locale locale)
          Returns a list of AttributeValues with the given locale for all attributes of the product type which this product belonging to.
 java.lang.String getGuid()
          Return the guid.
 java.lang.String getImage()
          Get the product default image.
 java.util.Date getLastModifiedDate()
          Returns the date when the product was last modified.
 LocaleDependantFields getLocaleDependantFields(java.util.Locale locale)
          Returns the LocaleDependantFields of the given locale.
 java.util.Map getLocaleDependantFieldsMap()
          Gets the all LocaleDependantFields as a map.
 LocaleDependantFields getLocaleDependantFieldsWithoutFallBack(java.util.Locale locale)
          Returns the LocaleDependantFields of the given locale without fallback.
 Money getLowestSkuPrice(java.util.Currency currency)
          This returns the lowest price of any sku belongs to this product as a Money object.
 int getMaxFeaturedProductOrder()
          Get the max featured product order from the productCateogiers of this product.
 int getMinOrderQty()
          Get the minimum order quantity of the product.
 Price getPrice(java.util.Currency currency)
          Get the price of this product in the specified currency.
 java.util.Set getProductAssociations()
          Get the ProductAssociations for merchandising this product.
 java.util.Set getProductCategories()
          Gets all product category associations.
 ProductCategory getProductCategoryByUid(java.lang.Long categoryUid)
          Get the product category by category uid.
 java.util.Map getProductPrices()
          Get the product-price associations belong to this product.
 java.util.Map getProductSkus()
          Get the product SKUs.
 ProductType getProductType()
          Get the display template.
 int getSalesCount()
          Returns the total sales count of the product.
 java.lang.String getSeoUrl(java.util.Locale locale, Category category)
          Returns the seo url of the given locale following the given category.
 ProductSku getSkuByGuid(java.lang.String guid)
          Retrieve a SKU by its GUID.
 java.util.Date getStartDate()
          Get the start date that this product will become available to customers.
 TaxCode getTaxCode()
          Returns the TaxCode associated with this Product.
 java.lang.String getTemplate()
          Get the display template.
 java.lang.String getTemplateWithFallBack(java.lang.String defaultTemplate)
          Get the display template name of this product.
 int getUidPkInt()
          Gets the unique identifier for this domain model object.
 int hashCode()
          Generate the hash code.
 boolean hasMultipleSkus()
          Returns true if the product has multiple SKUs.
 boolean hasPassedRuleEngine()
          Return true if this product has passsed rule engine.
 boolean isAvailable()
          Returns true if the product is available for purchase.
 boolean isDisplayable()
          Returns true if the product can be displayed.
 boolean isHidden()
          Returns true if the product should not be displayed (e.g.
 boolean isInCategory(long categoryUid)
          Returns true if this product is in the category with the specified category uid or a child of that category.
 boolean isWithinDateRange()
          Returns true if the current date is within the start and end dates for this product.
 void removeCategory(Category category)
          Remove this product from the specified category.
 void removeSku(ProductSku productSku)
          Remove the given sku from the product.
 void setAttributeValueGroup(AttributeValueGroup attributeValueGroup)
          Set the attribute value group.
 void setBrand(Brand brand)
          Sets the brand/manufacturer of the product.
 void setCategories(java.util.Set newCategories)
          Sets product categories from incoming set of Categories.
 void setCode(java.lang.String code)
          Sets the product code.
 void setDefaultCategory(Category category)
          Set the given category to be the default category of this product.
 void setDefaultSku(ProductSku defaultSku)
          Sets the default SKU for this product.
 void setDefaultValues()
          Set default values for those fields need default values.
 void setEndDate(java.util.Date endDate)
          Set the end date.
 void setGuid(java.lang.String guid)
          Set the guid.
 void setHasPassedRuleEngine(boolean value)
          Sets the has-passsed-rule-engine flag to the given value.
 void setHidden(boolean hidden)
          Set to true if the product should not be displayed.
 void setImage(java.lang.String image)
          Set the product default image.
 void setLastModifiedDate(java.util.Date lastModifiedDate)
          Set the date when the product was last modified.
 void setLocaleDependantFieldsMap(java.util.Map localeDependantFieldsMap)
          Sets the all LocaleDependantFields with the given map.
 void setMinOrderQty(int minOrderQty)
          Set the MinOrderQty associated with this Product.
 void setProductAssociations(java.util.Set productAssociations)
          Set the ProductAssociations for merchandising this product.
 void setProductCategories(java.util.Set productCategories)
          Sets all product category associations.
 void setProductPrices(java.util.Map productPrices)
          Set the product-price assocations of this product.
 void setProductSkus(java.util.Map productSkus)
          Set the variations of this product.
 void setProductType(ProductType productType)
          Set the ProductType.
 void setSalesCount(int salesCount)
          Sets the total sales count of the product.
 void setStartDate(java.util.Date startDate)
          Set the start date that this product will become valid.
 void setTaxCode(TaxCode taxCode)
          Set the TaxCode associated with this Product.
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEntityImpl
convertAttributeGroupAttributes
 
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl
getUidPk, isPersistent, setUidPk
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.Persistence
getUidPk, isPersistent, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

ProductImpl

public ProductImpl()
Default constructor.

Method Detail

addCategory

public void addCategory(Category category)
Add this product to the specified category.

Specified by:
addCategory in interface Product
Parameters:
category - the category

addOrUpdateLocaleDependantFields

public void addOrUpdateLocaleDependantFields(LocaleDependantFields ldf)
Sets the LocaleDependantFields.

Specified by:
addOrUpdateLocaleDependantFields in interface ObjectWithLocaleDependantFields
Parameters:
ldf - the LocaleDependantFields instance to set.

addOrUpdateProductAssocation

public void addOrUpdateProductAssocation(ProductAssociation productAssociation)
Add or update the given product association to this product(as a source product).

Specified by:
addOrUpdateProductAssocation in interface Product
Parameters:
productAssociation - the product association

addOrUpdateSku

public void addOrUpdateSku(ProductSku productSku)
Adds or updates the given sku to the product. This method maintain the bidirectional relationships with ProductSku.

Specified by:
addOrUpdateSku in interface Product
Parameters:
productSku - the sku to add or update

addPrice

public void addPrice(Price price)
Convenience method for setting the price. If the price exists, its amount is updated. Otherwise the price is added.

Specified by:
addPrice in interface Product
Parameters:
price - the price to be added.

compareTo

public int compareTo(java.lang.Object object)
              throws EpDomainException
Compares this product with the specified object for order.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - the given object
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
EpDomainException - in case the given object is not a Product

equals

public boolean equals(java.lang.Object obj)
Returns true if this category equals to the given object.

Specified by:
equals in interface Product
Overrides:
equals in class java.lang.Object
Parameters:
obj - the given object
Returns:
true if this category equals to the given object

executeBeforePersistAction

public void executeBeforePersistAction()
Update the last modified date.

Specified by:
executeBeforePersistAction in interface Persistence
Overrides:
executeBeforePersistAction in class AbstractPersistenceImpl

getAssociationById

public ProductAssociation getAssociationById(long associationUid)
Return the product association with the specified UID.

Specified by:
getAssociationById in interface Product
Parameters:
associationUid - the UID of the ProductAssociation to be returned.
Returns:
the corresponding ProductAssociation or null if no matching association is found.

getAssociationsByType

public java.util.Set getAssociationsByType(int associationType)
Returns a set of ProductAssociations with the given association type. Only returns associations where the date range is valid for the current date.

Specified by:
getAssociationsByType in interface Product
Parameters:
associationType - the type of the association. The association type is a constant value defined on the ProductAssociation interface.
Returns:
a set of all defined associations of the specified type

getAssociationsByType

public java.util.Set getAssociationsByType(int associationType,
                                           boolean includeAll)
Returns a set of ProductAssociations with the given association type.

Specified by:
getAssociationsByType in interface Product
Parameters:
associationType - the type of the association. The association type is a constant value defined on the ProductAssociation interface.
includeAll - Set to true to return associations that are not in their valid date range
Returns:
a set of all defined associations of the specified type

getAssociationsByType

public java.util.Set getAssociationsByType(int associationType,
                                           java.util.List filterTargetProducts)
Returns a set of ProductAssociations with the given association type.

Specified by:
getAssociationsByType in interface Product
Parameters:
associationType - the type of the association. The association type is a constant value defined on the ProductAssociation interface.
filterTargetProducts - Excludes any provided target products from list of returned associations.
Returns:
a set of all defined associations of the specified type

getAttributeValueGroup

public AttributeValueGroup getAttributeValueGroup()
Get the attribute value group.

Specified by:
getAttributeValueGroup in interface Product
Returns:
the domain model's AttributeValueGroup

getAttributeValues

public java.util.List getAttributeValues(java.util.Locale locale)
Returns a list of AttributeValues with the given locale for those attributes have values.

Specified by:
getAttributeValues in interface Product
Parameters:
locale - the locale
Returns:
a list of AttributeValues
See Also:
AttributeValueGroup.getAttributeValues(AttributeGroup, Locale)

getBranchNode

public BranchNode getBranchNode()
Returns the branch node. A leaf node should have one and only one BranchNode.

Specified by:
getBranchNode in interface LeafNode
Returns:
the branch node

getBrand

public Brand getBrand()
Returns the brand/manufacturer of the product.

Specified by:
getBrand in interface Product
Returns:
the brand/manufacturer of the product

getCategories

public java.util.Set getCategories()
Returns the set of Categorys containing this product.

Specified by:
getCategories in interface Product
Returns:
a set of Category objects (Not ProductCategory

getCode

public java.lang.String getCode()
Returns the product code.

Specified by:
getCode in interface Product
Returns:
the product code

getDefaultCategory

public Category getDefaultCategory()
Return the default Category of this product.

Specified by:
getDefaultCategory in interface Product
Returns:
the default Category

getDefaultSku

public ProductSku getDefaultSku()
Returns the default SKU corresponding to this product.

Specified by:
getDefaultSku in interface Product
Returns:
the ProductSku

getDisplayName

public java.lang.String getDisplayName(java.util.Locale locale)
Returns the display name of the given locale. This method provides a faster way to just get display name. The result is the same with getLocaleDependantFields(Locale).getDisplayName().

Specified by:
getDisplayName in interface ObjectWithLocaleDependantFields
Parameters:
locale - the locale
Returns:
the display name

getEndDate

public java.util.Date getEndDate()
Get the end date. After the end date, the product will change to unavailable to customers.

Specified by:
getEndDate in interface Product
Returns:
the end date

getFullAttributeValues

public java.util.List getFullAttributeValues(java.util.Locale locale)
Returns a list of AttributeValues with the given locale for all attributes of the product type which this product belonging to. If an attribute has a value, the value will be returned. Otherwise, a null value will be returned.

Specified by:
getFullAttributeValues in interface Product
Parameters:
locale - the locale
Returns:
a list of AttributeValues
See Also:
AttributeValueGroup.getFullAttributeValues(AttributeGroup, Locale)

getGuid

public java.lang.String getGuid()
Return the guid.

Specified by:
getGuid in interface Entity
Overrides:
getGuid in class AbstractEntityImpl
Returns:
the guid.

getImage

public java.lang.String getImage()
Get the product default image.

Specified by:
getImage in interface Product
Returns:
the product default image

getLastModifiedDate

public java.util.Date getLastModifiedDate()
Returns the date when the product was last modified.

Specified by:
getLastModifiedDate in interface Product
Returns:
the date when the product was last modified

getLocaleDependantFields

public LocaleDependantFields getLocaleDependantFields(java.util.Locale locale)
Returns the LocaleDependantFields of the given locale.

Specified by:
getLocaleDependantFields in interface ObjectWithLocaleDependantFields
Parameters:
locale - the locale
Returns:
the LocaleDependantFields of the given locale if it exists, otherwise an empty LocaleDependantFields.

getLocaleDependantFieldsMap

public java.util.Map getLocaleDependantFieldsMap()
Gets the all LocaleDependantFields as a map.

Specified by:
getLocaleDependantFieldsMap in interface ObjectWithLocaleDependantFields
Specified by:
getLocaleDependantFieldsMap in interface Product
Returns:
the LocaleDependantFields map

getLocaleDependantFieldsWithoutFallBack

public LocaleDependantFields getLocaleDependantFieldsWithoutFallBack(java.util.Locale locale)
Returns the LocaleDependantFields of the given locale without fallback.

Specified by:
getLocaleDependantFieldsWithoutFallBack in interface ObjectWithLocaleDependantFields
Parameters:
locale - the locale
Returns:
the LocaleDependantFields of the given locale

getLowestSkuPrice

public Money getLowestSkuPrice(java.util.Currency currency)
This returns the lowest price of any sku belongs to this product as a Money object.

Specified by:
getLowestSkuPrice in interface Product
Parameters:
currency - The currency of the price to be retrieved
Returns:
the lowest price of a SKU, or null if there are no SKUs.

getMaxFeaturedProductOrder

public int getMaxFeaturedProductOrder()
Get the max featured product order from the productCateogiers of this product.

Specified by:
getMaxFeaturedProductOrder in interface Product
Returns:
the maximum featured product order.

getMinOrderQty

public int getMinOrderQty()
Get the minimum order quantity of the product.

Specified by:
getMinOrderQty in interface Product
Returns:
the minimum order quantity of the product.

getPrice

public Price getPrice(java.util.Currency currency)
Get the price of this product in the specified currency.

Specified by:
getPrice in interface Product
Parameters:
currency - the Currency of the price to be returned
Returns:
a Price object representing the price in the specified currency returns null if no price was found in the specified currency.

getProductAssociations

public java.util.Set getProductAssociations()
Get the ProductAssociations for merchandising this product.

Specified by:
getProductAssociations in interface Product
Returns:
a set of ProductAssociations

getProductCategories

public java.util.Set getProductCategories()
Gets all product category associations.

Specified by:
getProductCategories in interface Product
Returns:
all product category associations

getProductCategoryByUid

public ProductCategory getProductCategoryByUid(java.lang.Long categoryUid)
Get the product category by category uid.

Specified by:
getProductCategoryByUid in interface Product
Parameters:
categoryUid - the category uid
Returns:
productCategory the ProductCategory

getProductPrices

public java.util.Map getProductPrices()
Get the product-price associations belong to this product.

Specified by:
getProductPrices in interface Product
Returns:
the set of prices corresponding to this product

getProductSkus

public java.util.Map getProductSkus()
Get the product SKUs.

Specified by:
getProductSkus in interface Product
Returns:
the product's ProductSkus

getProductType

public ProductType getProductType()
Get the display template.

Specified by:
getProductType in interface Product
Returns:
the template

getSalesCount

public int getSalesCount()
Returns the total sales count of the product.

Specified by:
getSalesCount in interface Product
Returns:
the total sales count of the product

getSeoUrl

public java.lang.String getSeoUrl(java.util.Locale locale,
                                  Category category)
Returns the seo url of the given locale following the given category. Since there might be multiple categories to reach a product, the category you give will be a part of the seo url generated. If you give null, the default category of the product will be used instead.

Specified by:
getSeoUrl in interface Product
Parameters:
locale - the locale
category - the category to reach the product, give null to use the default category.
Returns:
the seo url

getSkuByGuid

public ProductSku getSkuByGuid(java.lang.String guid)
Retrieve a SKU by its GUID.

Specified by:
getSkuByGuid in interface Product
Parameters:
guid - the GUID of the SKU to retrieve
Returns:
the corresponding SKU, or null if not found

getStartDate

public java.util.Date getStartDate()
Get the start date that this product will become available to customers.

Specified by:
getStartDate in interface Product
Returns:
the start date

getTaxCode

public TaxCode getTaxCode()
Returns the TaxCode associated with this Product.

Specified by:
getTaxCode in interface Product
Returns:
the TaxCode

getTemplate

public java.lang.String getTemplate()
Get the display template.

Specified by:
getTemplate in interface Product
Returns:
the template

getTemplateWithFallBack

public java.lang.String getTemplateWithFallBack(java.lang.String defaultTemplate)
Get the display template name of this product.

Specified by:
getTemplateWithFallBack in interface Product
Parameters:
defaultTemplate - the default template name
Returns:
the template name if it is defined for this product, otherwise the given default template name

getUidPkInt

public int getUidPkInt()
Gets the unique identifier for this domain model object. Returns an int so that it can be accessed by Drools. Will likely remove this if rulesdon't use the uid.

Specified by:
getUidPkInt in interface Product
Returns:
the unique identifier.

hashCode

public int hashCode()
Generate the hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code.

hasMultipleSkus

public boolean hasMultipleSkus()
Returns true if the product has multiple SKUs.

Specified by:
hasMultipleSkus in interface Product
Returns:
true if the product has multiple SKUs.

hasPassedRuleEngine

public boolean hasPassedRuleEngine()
Return true if this product has passsed rule engine. Otherwise, false.

Specified by:
hasPassedRuleEngine in interface Product
Returns:
true if this product has passsed rule engine. Otherwise, false.

isAvailable

public boolean isAvailable()
Returns true if the product is available for purchase. Checks whether the current date is within the product's date range and the product has at least one sku in stock.

Specified by:
isAvailable in interface Product
Returns:
true if the product is available for purchase, false otherwise

isDisplayable

public boolean isDisplayable()
Returns true if the product can be displayed. Checks whether the product is not hidden, the current date is within the product's date range, and the product has at least one sku in stock or if out of stock but should be visible

Specified by:
isDisplayable in interface Product
Returns:
true if the product can be displayed, false otherwise

isHidden

public boolean isHidden()
Returns true if the product should not be displayed (e.g. in its category or as a search result).

Specified by:
isHidden in interface Product
Returns:
true if the product should not be displayed

isInCategory

public boolean isInCategory(long categoryUid)
Returns true if this product is in the category with the specified category uid or a child of that category.

Specified by:
isInCategory in interface Product
Parameters:
categoryUid - the category uid to check if this product is in it.
Returns:
true if the product is in the category

isWithinDateRange

public boolean isWithinDateRange()
Returns true if the current date is within the start and end dates for this product.

Specified by:
isWithinDateRange in interface Product
Returns:
true if the current date is within the start and end dates for this product

removeCategory

public void removeCategory(Category category)
Remove this product from the specified category.

Specified by:
removeCategory in interface Product
Parameters:
category - the category

removeSku

public void removeSku(ProductSku productSku)
Remove the given sku from the product.

Specified by:
removeSku in interface Product
Parameters:
productSku - the sku to remove

setAttributeValueGroup

public void setAttributeValueGroup(AttributeValueGroup attributeValueGroup)
Set the attribute value group.

Specified by:
setAttributeValueGroup in interface Product
Parameters:
attributeValueGroup - the AttributeValueGroup

setBrand

public void setBrand(Brand brand)
Sets the brand/manufacturer of the product.

Specified by:
setBrand in interface Product
Parameters:
brand - the brand/manufacturer of the product

setCategories

public void setCategories(java.util.Set newCategories)
Sets product categories from incoming set of Categories. Will add and remove from product categories according to new categories.

Specified by:
setCategories in interface Product
Parameters:
newCategories - new set of categories

setCode

public void setCode(java.lang.String code)
Sets the product code.

Specified by:
setCode in interface Product
Parameters:
code - the product code

setDefaultCategory

public void setDefaultCategory(Category category)
Set the given category to be the default category of this product. A Product should have one and only one default Category.

Specified by:
setDefaultCategory in interface Product
Parameters:
category - the category to be set as default

setDefaultSku

public void setDefaultSku(ProductSku defaultSku)
Sets the default SKU for this product.

Specified by:
setDefaultSku in interface Product
Parameters:
defaultSku - the default SKU

setDefaultValues

public void setDefaultValues()
Set default values for those fields need default values.

Specified by:
setDefaultValues in interface Persistence
Overrides:
setDefaultValues in class AbstractEntityImpl

setEndDate

public void setEndDate(java.util.Date endDate)
Set the end date. Precondition: endDate is after the start date

Specified by:
setEndDate in interface Product
Parameters:
endDate - the end date

setGuid

public void setGuid(java.lang.String guid)
Set the guid.

Specified by:
setGuid in interface Entity
Overrides:
setGuid in class AbstractEntityImpl
Parameters:
guid - the guid to set.

setHasPassedRuleEngine

public void setHasPassedRuleEngine(boolean value)
Sets the has-passsed-rule-engine flag to the given value.

Specified by:
setHasPassedRuleEngine in interface Product
Parameters:
value - the given value

setHidden

public void setHidden(boolean hidden)
Set to true if the product should not be displayed.

Specified by:
setHidden in interface Product
Parameters:
hidden - true if the product should not be displayed

setImage

public void setImage(java.lang.String image)
Set the product default image.

Specified by:
setImage in interface Product
Parameters:
image - the product default image

setLastModifiedDate

public void setLastModifiedDate(java.util.Date lastModifiedDate)
Set the date when the product was last modified.

Specified by:
setLastModifiedDate in interface Product
Parameters:
lastModifiedDate - the date when the product was last modified

setLocaleDependantFieldsMap

public void setLocaleDependantFieldsMap(java.util.Map localeDependantFieldsMap)
Sets the all LocaleDependantFields with the given map.

Specified by:
setLocaleDependantFieldsMap in interface ObjectWithLocaleDependantFields
Parameters:
localeDependantFieldsMap - the LocaleDependantFields map to set

setMinOrderQty

public void setMinOrderQty(int minOrderQty)
Set the MinOrderQty associated with this Product.

Specified by:
setMinOrderQty in interface Product
Parameters:
minOrderQty - - the minimum order quantity of the product.

setProductAssociations

public void setProductAssociations(java.util.Set productAssociations)
Set the ProductAssociations for merchandising this product.

Specified by:
setProductAssociations in interface Product
Parameters:
productAssociations - the set of ProductAssociations

setProductCategories

public void setProductCategories(java.util.Set productCategories)
Sets all product category associations.

Specified by:
setProductCategories in interface Product
Parameters:
productCategories - all product category associations

setProductPrices

public void setProductPrices(java.util.Map productPrices)
Set the product-price assocations of this product. Note: To be used by hibernate and test cases only

Parameters:
productPrices - the product prices to set

setProductSkus

public void setProductSkus(java.util.Map productSkus)
Set the variations of this product.

Specified by:
setProductSkus in interface Product
Parameters:
productSkus - the map of ProductSkus

setProductType

public void setProductType(ProductType productType)
Set the ProductType.

Specified by:
setProductType in interface Product
Parameters:
productType - the ProductType

setSalesCount

public void setSalesCount(int salesCount)
Sets the total sales count of the product.

Specified by:
setSalesCount in interface Product
Parameters:
salesCount - the total sales count of the product

setStartDate

public void setStartDate(java.util.Date startDate)
Set the start date that this product will become valid.

Specified by:
setStartDate in interface Product
Parameters:
startDate - the start date

setTaxCode

public void setTaxCode(TaxCode taxCode)
Set the TaxCode associated with this Product.

Specified by:
setTaxCode in interface Product
Parameters:
taxCode - - the sales tax code for this product type, i.e. "Books".