com.elasticpath.domain.attribute.impl
Class AttributeImpl

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.attribute.impl.AttributeImpl
All Implemented Interfaces:
Attribute, Entity, EpDomain, Persistence, java.io.Serializable, java.lang.Comparable

public class AttributeImpl
extends AbstractEntityImpl
implements Attribute

Attribute reprents a customized property of an object like Category or Product.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
AttributeImpl()
           
 
Method Summary
 int compareTo(java.lang.Object object)
          Compares this attribute with the specified object for order.
 AttributeType getAttributeType()
          Return the AttributeType of this attribute.
 AttributeUsage getAttributeUsage()
          Return the AttributeUsage of this attribute.
 java.lang.String getGuid()
          Return the guid.
 java.lang.String getKey()
          Get the attribute key.
 java.lang.String getName()
          Get the product system name.
 boolean isIncludedInSearchIndex()
          Return true if the attribute should be included in the search index.
 boolean isLocaleDependant()
          Return true if the attribute is dependant on the locale.
 boolean isMultiValueEnabled()
          Return true if the attribute can have multi value.
 boolean isRequired()
          Return true if the attribute is required.
 boolean isSystem()
          Return true if the attribute is system attribute.
 boolean isUsedInGuidedNavigation()
          Return true if this attribute is used in guided navigation.
 boolean isValueLookupEnabled()
          Return true if the value lookup for this attribute is enabled.
 void setAttributeType(AttributeType attributeType)
          Set the AttributeType of this attribute.
 void setAttributeUsage(AttributeUsage attributeUsage)
          Set the AttributeUsage of this attribute.
 void setGuid(java.lang.String guid)
          Set the guid.
 void setIncludedInSearchIndex(boolean includedInSearchIndex)
          Set the included in search index flag.
 void setKey(java.lang.String key)
          Set the attribute key.
 void setLocaleDependant(boolean localeDependant)
          Set the locale dependant flag.
 void setMultiValueEnabled(boolean multiValueEnabled)
          Set the attribute can have multi value.
 void setName(java.lang.String name)
          Set the product system name.
 void setRequired(boolean required)
          Set the required flag.
 void setSystem(boolean system)
          Set the system flag.
 void setUsedInGuidedNavigation(boolean usedInGuidedNavigation)
          Set this attribute is used in guided navigation.
 void setValueLookupEnabled(boolean valueLookupEnabled)
          Sets whether or not the user will have the option of selecting from previously existing values when editing an attribute.
 
Methods inherited from class com.elasticpath.domain.impl.AbstractEntityImpl
convertAttributeGroupAttributes, setDefaultValues
 
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.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, 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

AttributeImpl

public AttributeImpl()
Method Detail

compareTo

public int compareTo(java.lang.Object object)
              throws EpDomainException
Compares this attribute 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 if this object is less than, equal to, or greater than the specified object.
Throws:
EpDomainException - in case the given object is not a Attribute

getAttributeType

public AttributeType getAttributeType()
Return the AttributeType of this attribute.

Specified by:
getAttributeType in interface Attribute
Returns:
the AttributeType of this attribute

getAttributeUsage

public AttributeUsage getAttributeUsage()
Return the AttributeUsage of this attribute.

Specified by:
getAttributeUsage in interface Attribute
Returns:
the AttributeUsage of this attribute

getGuid

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

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

getKey

public java.lang.String getKey()
Get the attribute key.

Specified by:
getKey in interface Attribute
Returns:
the attribute key

getName

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

Specified by:
getName in interface Attribute
Returns:
the product system name

isIncludedInSearchIndex

public boolean isIncludedInSearchIndex()
Return true if the attribute should be included in the search index.

Specified by:
isIncludedInSearchIndex in interface Attribute
Returns:
true if the attribute should be included in the search index

isLocaleDependant

public boolean isLocaleDependant()
Return true if the attribute is dependant on the locale.

Specified by:
isLocaleDependant in interface Attribute
Returns:
true if the attribute is dependant on the locale

isMultiValueEnabled

public boolean isMultiValueEnabled()
Return true if the attribute can have multi value.

Specified by:
isMultiValueEnabled in interface Attribute
Returns:
true if the attribute can have multi value.

isRequired

public boolean isRequired()
Return true if the attribute is required.

Specified by:
isRequired in interface Attribute
Returns:
true if the attribute is required

isSystem

public boolean isSystem()
Return true if the attribute is system attribute.

Specified by:
isSystem in interface Attribute
Returns:
true if the attribute is system attribute

isUsedInGuidedNavigation

public boolean isUsedInGuidedNavigation()
Return true if this attribute is used in guided navigation.

Specified by:
isUsedInGuidedNavigation in interface Attribute
Returns:
true if this attribute is used in guided navigation.

isValueLookupEnabled

public boolean isValueLookupEnabled()
Return true if the value lookup for this attribute is enabled. If value-lookup is enabled, users have the option of selecting from existing previously existing attribute values when setting the attribute's value.

Specified by:
isValueLookupEnabled in interface Attribute
Returns:
true if the value lookup for this attribute is enabled.

setAttributeType

public void setAttributeType(AttributeType attributeType)
Set the AttributeType of this attribute.

Specified by:
setAttributeType in interface Attribute
Parameters:
attributeType - the attribute type.

setAttributeUsage

public void setAttributeUsage(AttributeUsage attributeUsage)
Set the AttributeUsage of this attribute.

Specified by:
setAttributeUsage in interface Attribute
Parameters:
attributeUsage - the attribute usage

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.

setIncludedInSearchIndex

public void setIncludedInSearchIndex(boolean includedInSearchIndex)
Set the included in search index flag.

Specified by:
setIncludedInSearchIndex in interface Attribute
Parameters:
includedInSearchIndex - the included in search index flag

setKey

public void setKey(java.lang.String key)
Set the attribute key.

Specified by:
setKey in interface Attribute
Parameters:
key - the key to set

setLocaleDependant

public void setLocaleDependant(boolean localeDependant)
Set the locale dependant flag.

Specified by:
setLocaleDependant in interface Attribute
Parameters:
localeDependant - the locale-dependant flag.

setMultiValueEnabled

public void setMultiValueEnabled(boolean multiValueEnabled)
Set the attribute can have multi value.

Specified by:
setMultiValueEnabled in interface Attribute
Parameters:
multiValueEnabled - the multiValueEnabled to set

setName

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

Specified by:
setName in interface Attribute
Parameters:
name - the product system name

setRequired

public void setRequired(boolean required)
Set the required flag.

Specified by:
setRequired in interface Attribute
Parameters:
required - the required flag

setSystem

public void setSystem(boolean system)
Set the system flag.

Specified by:
setSystem in interface Attribute
Parameters:
system - the system flag

setUsedInGuidedNavigation

public void setUsedInGuidedNavigation(boolean usedInGuidedNavigation)
Set this attribute is used in guided navigation.

Specified by:
setUsedInGuidedNavigation in interface Attribute
Parameters:
usedInGuidedNavigation - the usedInGuidedNavigation to set

setValueLookupEnabled

public void setValueLookupEnabled(boolean valueLookupEnabled)
Sets whether or not the user will have the option of selecting from previously existing values when editing an attribute.

Specified by:
setValueLookupEnabled in interface Attribute
Parameters:
valueLookupEnabled - set to true if lookup is to be enabled.