Class SkuAttributeImpl

java.lang.Object
org.broadleafcommerce.core.catalog.domain.SkuAttributeImpl
All Implemented Interfaces:
Serializable, org.broadleafcommerce.common.copy.MultiTenantCloneable<SkuAttribute>, org.broadleafcommerce.common.value.ValueAssignable<String>, SkuAttribute

@Entity public class SkuAttributeImpl extends Object implements SkuAttribute
The Class SkuAttributeImpl is the default implementation of SkuAttribute. A SKU Attribute is a designator on a SKU that differentiates it from other similar SKUs (for example: Blue attribute for hat). 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_ATTRIBUTES,
Author:
btaylor
See Also:
  • Field Details

    • id

      protected Long id
      The id.
    • name

      protected String name
      The name.
    • value

      protected String value
      The value.
    • sku

      protected Sku sku
      The sku.
  • Constructor Details

    • SkuAttributeImpl

      public SkuAttributeImpl()
  • Method Details

    • getId

      public Long getId()
      Description copied from interface: SkuAttribute
      Gets the id.
      Specified by:
      getId in interface SkuAttribute
      Returns:
      the id
    • setId

      public void setId(Long id)
      Description copied from interface: SkuAttribute
      Sets the id.
      Specified by:
      setId in interface SkuAttribute
      Parameters:
      id - the new id
    • getValue

      public String getValue()
      Specified by:
      getValue in interface org.broadleafcommerce.common.value.ValueAssignable<String>
    • setValue

      public void setValue(String value)
      Specified by:
      setValue in interface org.broadleafcommerce.common.value.ValueAssignable<String>
    • getName

      public String getName()
      Description copied from interface: SkuAttribute
      Gets the name.
      Specified by:
      getName in interface SkuAttribute
      Specified by:
      getName in interface org.broadleafcommerce.common.value.ValueAssignable<String>
      Returns:
      the name
    • setName

      public void setName(String name)
      Description copied from interface: SkuAttribute
      Sets the name.
      Specified by:
      setName in interface SkuAttribute
      Specified by:
      setName in interface org.broadleafcommerce.common.value.ValueAssignable<String>
      Parameters:
      name - the new name
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSku

      public Sku getSku()
      Description copied from interface: SkuAttribute
      Gets the sku.
      Specified by:
      getSku in interface SkuAttribute
      Returns:
      the sku
    • setSku

      public void setSku(Sku sku)
      Description copied from interface: SkuAttribute
      Sets the sku.
      Specified by:
      setSku in interface SkuAttribute
      Parameters:
      sku - the new sku
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • createOrRetrieveCopyInstance

      public <G extends SkuAttribute> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException
      Specified by:
      createOrRetrieveCopyInstance in interface org.broadleafcommerce.common.copy.MultiTenantCloneable<SkuAttribute>
      Throws:
      CloneNotSupportedException