com.elasticpath.domain.catalog.impl
Class ProductTypeImpl

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.ProductTypeImpl
All Implemented Interfaces:
ProductType, Entity, EpDomain, Persistence, java.io.Serializable

public class ProductTypeImpl
extends AbstractEntityImpl
implements ProductType

Represents the type of a Product, which determines the set of attributes that it has. An example of a product type is "Shoe." Note that this differs from a product category, which might also be called "Shoes" because this describes the characteristics of the product rather than how they are displayed and organized in the store.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
ProductTypeImpl()
          The default constructor.
 
Method Summary
 java.lang.String getDescription()
          Get the product type description.
 java.lang.String getName()
          Get the product type name.
 AttributeGroup getProductAttributeGroup()
          Returns the product attribute group.
 AttributeGroup getSkuAttributeGroup()
          Returns the product sku attribute group.
 java.util.Set getSkuOptions()
          Gets the available options for configuring SKUs of this product.
 java.util.Set getSkuOptions(ProductSku defaultSku)
          Gets the available options for configuring SKUs of this product.
 TaxCode getTaxCode()
          Returns the TaxCode associated with this ProductType.
 java.lang.String getTemplate()
          Returns the display template of this category type.
 boolean isWithMultipleSkus()
          Returns true if the product type may have multiple skus.
 void setDefaultValues()
          Set default values for those fields need default values.
 void setDescription(java.lang.String description)
          Set the product type description.
 void setName(java.lang.String name)
          Set the product type name.
 void setProductAttributeGroup(AttributeGroup productAttributeGroup)
          Sets the product attribute group.
 void setSkuAttributeGroup(AttributeGroup skuAttributeGroup)
          Sets the product sku attribute group.
 void setSkuOptions(java.util.Set skuOptions)
          Sets the available options for configuring SKUs of this product.
 void setTaxCode(TaxCode taxCode)
          Set the TaxCode associated with this ProductType.
 void setTemplate(java.lang.String template)
          Set the template.
 void setWithMultipleSkus(boolean multipleSkuFlag)
          Sets the multiple sku flag.
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEntityImpl
convertAttributeGroupAttributes, getGuid, setGuid
 
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl
executeBeforePersistAction, getUidPk, isPersistent, setUidPk
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.Entity
getGuid, setGuid
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, 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

ProductTypeImpl

public ProductTypeImpl()
The default constructor.

Method Detail

getDescription

public java.lang.String getDescription()
Get the product type description.

Specified by:
getDescription in interface ProductType
Returns:
the product type description

getName

public java.lang.String getName()
Get the product type name.

Specified by:
getName in interface ProductType
Returns:
the product type name

getProductAttributeGroup

public AttributeGroup getProductAttributeGroup()
Returns the product attribute group.

Specified by:
getProductAttributeGroup in interface ProductType
Returns:
the product attribute group

getSkuAttributeGroup

public AttributeGroup getSkuAttributeGroup()
Returns the product sku attribute group.

Specified by:
getSkuAttributeGroup in interface ProductType
Returns:
the product sku attribute group

getSkuOptions

public java.util.Set getSkuOptions()
Gets the available options for configuring SKUs of this product.

Specified by:
getSkuOptions in interface ProductType
Returns:
the set of options for configuring SKUs of this product or null if there are no configurable options

getSkuOptions

public java.util.Set getSkuOptions(ProductSku defaultSku)
Gets the available options for configuring SKUs of this product. Updates the default SKU option values based on the values specified in a given default SKU.

Specified by:
getSkuOptions in interface ProductType
Parameters:
defaultSku - the SKU whose option values are to be the defaults for the given options
Returns:
the set of options for configuring SKUs of this product or null if there are no configurable options

getTaxCode

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

Specified by:
getTaxCode in interface ProductType
Returns:
the TaxCode

getTemplate

public java.lang.String getTemplate()
Returns the display template of this category type.

Specified by:
getTemplate in interface ProductType
Returns:
the template

isWithMultipleSkus

public boolean isWithMultipleSkus()
Returns true if the product type may have multiple skus.

Specified by:
isWithMultipleSkus in interface ProductType
Returns:
true if the product type has multiple skus

setDefaultValues

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

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

setDescription

public void setDescription(java.lang.String description)
Set the product type description.

Specified by:
setDescription in interface ProductType
Parameters:
description - the product type description

setName

public void setName(java.lang.String name)
Set the product type name.

Specified by:
setName in interface ProductType
Parameters:
name - the product type name

setProductAttributeGroup

public void setProductAttributeGroup(AttributeGroup productAttributeGroup)
Sets the product attribute group.

Specified by:
setProductAttributeGroup in interface ProductType
Parameters:
productAttributeGroup - the product attribute group.

setSkuAttributeGroup

public void setSkuAttributeGroup(AttributeGroup skuAttributeGroup)
Sets the product sku attribute group.

Specified by:
setSkuAttributeGroup in interface ProductType
Parameters:
skuAttributeGroup - the product attribute group.

setSkuOptions

public void setSkuOptions(java.util.Set skuOptions)
Sets the available options for configuring SKUs of this product.

Specified by:
setSkuOptions in interface ProductType
Parameters:
skuOptions - the set of available options for configuring SKUs of this product

setTaxCode

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

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

setTemplate

public void setTemplate(java.lang.String template)
Set the template.

Specified by:
setTemplate in interface ProductType
Parameters:
template - the template

setWithMultipleSkus

public void setWithMultipleSkus(boolean multipleSkuFlag)
Sets the multiple sku flag.

Specified by:
setWithMultipleSkus in interface ProductType
Parameters:
multipleSkuFlag - sets it to true if the product type may have multiple skus.