|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.elasticpath.domain.impl.AbstractEpDomainImpl
com.elasticpath.domain.impl.AbstractPersistenceImpl
com.elasticpath.domain.impl.AbstractEntityImpl
com.elasticpath.domain.attribute.impl.AttributeValueGroupImpl
public class AttributeValueGroupImpl
This is a default implementation of AttributeValueGroup
.
Field Summary | |
---|---|
static long |
serialVersionUID
Serial version id. |
Constructor Summary | |
---|---|
AttributeValueGroupImpl()
|
Method Summary | |
---|---|
AttributeValue |
getAttributeValue(java.lang.String attributeKey,
java.util.Locale locale)
Get the value of an attribute with the specified key in the given locale. |
java.util.Map |
getAttributeValueMap()
Returns the attribute value map. |
java.util.List |
getAttributeValues(AttributeGroup attributeGroup,
java.util.Locale locale)
Get a list of AttributeValue s with the given locale for attributes defined in the given attribute group. |
ElasticPath |
getElasticPath()
Get the ElasticPath singleton. |
java.util.List |
getFullAttributeValues(AttributeGroup attributeGroup)
Get a list of AttributeValue s for all attributes defined in the given attribute group. |
java.util.List |
getFullAttributeValues(AttributeGroup attributeGroup,
java.util.Locale locale)
Get a list of AttributeValue s with the given locale for all attributes defined in the given attribute group. |
java.lang.String |
getStringAttributeValue(java.lang.String attributeKey,
java.util.Locale locale)
Get the value of a string attribute with the specified key in the given locale. |
void |
removeByAttribute(Attribute attToRemove)
Removes all attribute values that match incoming attribute key. |
void |
removeByAttributes(java.util.Set toRemove)
Removes all attribute values that match incoming attribute keys. |
void |
setAttributeValue(Attribute attribute,
java.util.Locale locale,
java.lang.Object value)
Set the attribute value of the domain object. |
void |
setAttributeValueMap(java.util.Map attributeValueMap)
Sets the attribute value map. |
void |
setDefaultValues()
Set default values for those fields need default values. |
void |
setStringAttributeValue(Attribute attribute,
java.util.Locale locale,
java.lang.String stringValue)
Set the attribute value of the domain object based on the given string value. |
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 |
---|
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, setUidPk |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
setElasticPath |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public AttributeValueGroupImpl()
Method Detail |
---|
public AttributeValue getAttributeValue(java.lang.String attributeKey, java.util.Locale locale)
getAttributeValue
in interface AttributeValueGroup
attributeKey
- the key of the attribute to be retrievedlocale
- the locale for which the attribute is requested
AttributeValue
public java.util.Map getAttributeValueMap()
getAttributeValueMap
in interface AttributeValueGroup
public java.util.List getAttributeValues(AttributeGroup attributeGroup, java.util.Locale locale)
AttributeValue
s with the given locale for attributes defined in the given attribute group. If an attribute in
the given attribute group has a value, the value will be returned. Otherwise, it won't be returned in the list.
getAttributeValues
in interface AttributeValueGroup
attributeGroup
- the attribute grouplocale
- the locale
AttributeValue
spublic ElasticPath getElasticPath()
getElasticPath
in interface EpDomain
getElasticPath
in class AbstractEpDomainImpl
public java.util.List getFullAttributeValues(AttributeGroup attributeGroup)
AttributeValue
s for all attributes defined in the given attribute group. If an attribute in the given attribute
group has a value, the value will be returned. Otherwise, a null
value will be returned.
getFullAttributeValues
in interface AttributeValueGroup
attributeGroup
- the attribute group
AttributeValue
spublic java.util.List getFullAttributeValues(AttributeGroup attributeGroup, java.util.Locale locale)
AttributeValue
s with the given locale for all attributes defined in the given attribute group. If an attribute
in the given attribute group has a value, the value will be returned. Otherwise, a null
value will be returned.
getFullAttributeValues
in interface AttributeValueGroup
attributeGroup
- the attribute grouplocale
- the locale
AttributeValue
spublic java.lang.String getStringAttributeValue(java.lang.String attributeKey, java.util.Locale locale)
getStringAttributeValue
in interface AttributeValueGroup
attributeKey
- the key of the attribute to be retrievedlocale
- the locale for which the attribute is requested
String
value of the attributepublic void removeByAttribute(Attribute attToRemove)
removeByAttribute
in interface AttributeValueGroup
attToRemove
- attribute to remove.public void removeByAttributes(java.util.Set toRemove)
removeByAttributes
in interface AttributeValueGroup
toRemove
- contains all attributes to remove.public void setAttributeValue(Attribute attribute, java.util.Locale locale, java.lang.Object value)
setAttributeValue
in interface AttributeValueGroup
attribute
- the attribute to set the valuelocale
- the locale of the value, set it to null
if it's not locale-dependantvalue
- the valuepublic void setAttributeValueMap(java.util.Map attributeValueMap)
setAttributeValueMap
in interface AttributeValueGroup
attributeValueMap
- the attribute value mappublic void setDefaultValues()
setDefaultValues
in interface Persistence
setDefaultValues
in class AbstractEntityImpl
public void setStringAttributeValue(Attribute attribute, java.util.Locale locale, java.lang.String stringValue) throws EpBindException
setStringAttributeValue
in interface AttributeValueGroup
attribute
- the attribute to set the valuelocale
- the locale of the value, set it to null
if it's not locale-dependantstringValue
- the string value
EpBindException
- in case the given string value is invalid
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |