com.elasticpath.domain.attribute.impl
Class AttributeUsageImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractPersistenceImpl
          extended by com.elasticpath.domain.impl.AbstractValueObjectImpl
              extended by com.elasticpath.domain.attribute.impl.AttributeUsageImpl
All Implemented Interfaces:
AttributeUsage, EpDomain, Persistence, ValueObject, java.io.Serializable

public class AttributeUsageImpl
extends AbstractValueObjectImpl
implements AttributeUsage

A default implementation of a specification of AttributeUsage.

See Also:
Serialized Form

Field Summary
static AttributeUsageImpl CATEGORY_USAGE
          The category usage.
static AttributeUsageImpl CUSTOMERPROFILE_USAGE
          The customerprofile usage.
static AttributeUsageImpl PRODUCT_USAGE
          The product usage.
static long serialVersionUID
          Serial version id.
static AttributeUsageImpl SKU_USAGE
          The sku usage.
 
Fields inherited from interface com.elasticpath.domain.attribute.AttributeUsage
CATEGORY, CUSTOMERPROFILE, PRODUCT, SKU
 
Constructor Summary
AttributeUsageImpl()
          Empty default constructor.
 
Method Summary
static java.util.Map getAttributeUsageMap()
          Return a map of attribute usages keyed by their value (int id).
 int getValue()
          Returns the attribute usage value.
 void setValue(int value)
          Sets the attribute usage value.
 java.lang.String toString()
          Returns the name of object if defined.
 
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Field Detail

CATEGORY_USAGE

public static final AttributeUsageImpl CATEGORY_USAGE
The category usage.


CUSTOMERPROFILE_USAGE

public static final AttributeUsageImpl CUSTOMERPROFILE_USAGE
The customerprofile usage.


PRODUCT_USAGE

public static final AttributeUsageImpl PRODUCT_USAGE
The product usage.


serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values

SKU_USAGE

public static final AttributeUsageImpl SKU_USAGE
The sku usage.

Constructor Detail

AttributeUsageImpl

public AttributeUsageImpl()
Empty default constructor.

Method Detail

getAttributeUsageMap

public static java.util.Map getAttributeUsageMap()
Return a map of attribute usages keyed by their value (int id). Created to get rid of duplicate info in the attribute service.

Returns:
map of attribute usages.

getValue

public int getValue()
Returns the attribute usage value.

Specified by:
getValue in interface AttributeUsage
Returns:
the attribute usage value

setValue

public void setValue(int value)
Sets the attribute usage value.

Specified by:
setValue in interface AttributeUsage
Parameters:
value - the attribute usage value

toString

public java.lang.String toString()
Returns the name of object if defined.

Overrides:
toString in class java.lang.Object
Returns:
attribute usage name.