|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.domain.impl.AbstractEpDomainImpl com.elasticpath.domain.impl.AbstractTransientImpl com.elasticpath.domain.catalogview.impl.AbstractFilterImpl com.elasticpath.domain.catalogview.impl.AbstractRangeFilterImpl com.elasticpath.domain.catalogview.impl.AttributeRangeFilterImpl
public class AttributeRangeFilterImpl
The attribute filter with a range defined.
Field Summary |
---|
Fields inherited from class com.elasticpath.domain.impl.AbstractTransientImpl |
---|
serialVersionUID |
Fields inherited from interface com.elasticpath.domain.catalogview.RangeFilter |
---|
ALL, AND, BETWEEN, LESSTHAN, LOWER_VALUE_POSITION, MORETHAN, RANGE_TOKENS, UPPER_VALUE_POSITION |
Fields inherited from interface com.elasticpath.domain.catalogview.Filter |
---|
ERROR_MSG, SEPARATOR, SEPARATOR_IN_REGEX |
Fields inherited from interface com.elasticpath.domain.catalogview.Filter |
---|
ERROR_MSG, SEPARATOR, SEPARATOR_IN_REGEX |
Constructor Summary | |
---|---|
AttributeRangeFilterImpl()
Default constructor. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object object)
Compares this price filter with the specified object for order. |
int |
compareWithValue(java.lang.Object firstObj,
java.lang.Object secondObj)
Compare the given objs. |
boolean |
equals(java.lang.Object object)
Returns true if this filter equals to the given object. |
Attribute |
getAttribute()
Get the attribute object. |
java.lang.String |
getAttributeKey()
Get the attribute key. |
java.lang.String |
getAttributeRangeFilterId(java.lang.String attributeKey,
java.lang.String lowerAttributeStr,
java.lang.String upperAttributeStr)
Generates and returns a attribute range filter id based on the given attributeKey, lower value and upper value. |
AttributeService |
getAttributeService()
|
java.lang.String |
getDisplayName(java.util.Locale locale)
Returns the display name of the filter with the given locale. |
java.util.Locale |
getLocale()
Get the locale for this attribute. |
java.lang.String |
getSeoId()
This method returns the seo id. |
int |
hashCode()
Returns the hash code. |
void |
initialize(java.lang.String filterId)
Sets the filter id and initialize the filter. |
boolean |
match(java.lang.Object obj)
Check whether the given object matchs this filter. |
boolean |
match(java.lang.Object obj,
java.util.Locale locale)
Check whether the given object matchs this filter. |
void |
setAttribute(Attribute attribute)
|
void |
setAttributeKey(java.lang.String attributeKey)
Set the attribute Key. |
void |
setAttributeService(AttributeService attributeService)
|
void |
setLocale(java.util.Locale locale)
Set the locale for this attribute. |
void |
setLowerValue(java.lang.Object lowerValue)
Set the lower value for the range. |
void |
setUpperValue(java.lang.Object upperValue)
Set the upper value for the range. |
Methods inherited from class com.elasticpath.domain.catalogview.impl.AbstractRangeFilterImpl |
---|
addChild, addDisplayInfo, contains, getChildren, getDisplayInfo, getLevel, getLocalizedDisplayMap, getLowerValue, getParent, getPath, getRangeType, getSeoName, getUpperValue, setLocalizedDisplayMap, setParent, setRangeType |
Methods inherited from class com.elasticpath.domain.catalogview.impl.AbstractFilterImpl |
---|
filter, getId, isLocalized, setId, setLocalized |
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.domain.catalogview.RangeFilter |
---|
addChild, addDisplayInfo, contains, getChildren, getDisplayInfo, getLocalizedDisplayMap, getLowerValue, getParent, getRangeType, getUpperValue, setLocalizedDisplayMap, setParent, setRangeType |
Methods inherited from interface com.elasticpath.domain.catalogview.Filter |
---|
filter, getId, getSeoName, isLocalized, setId, setLocalized |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Methods inherited from interface com.elasticpath.domain.catalogview.BranchNode |
---|
getLevel, getPath |
Methods inherited from interface com.elasticpath.domain.catalogview.Filter |
---|
filter, getId, getSeoName, isLocalized, setId, setLocalized |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Constructor Detail |
---|
public AttributeRangeFilterImpl()
Method Detail |
---|
public int compareTo(java.lang.Object object) throws EpDomainException
compareTo
in interface java.lang.Comparable
object
- the given object
EpDomainException
- in case the given object is not a PriceFilter
or they are overlapping with each otherpublic int compareWithValue(java.lang.Object firstObj, java.lang.Object secondObj)
compareWithValue
in class AbstractRangeFilterImpl
firstObj
- the given object.secondObj
- the given value.
public boolean equals(java.lang.Object object)
true
if this filter equals to the given object.
equals
in class AbstractFilterImpl
object
- the object to compare
true
if this filter equals to the given object.public Attribute getAttribute()
AttributeFilter
getAttribute
in interface AttributeFilter
public java.lang.String getAttributeKey()
getAttributeKey
in interface AttributeFilter
public java.lang.String getAttributeRangeFilterId(java.lang.String attributeKey, java.lang.String lowerAttributeStr, java.lang.String upperAttributeStr) throws EpBindException
getAttributeRangeFilterId
in interface AttributeRangeFilter
attributeKey
- the attribute keylowerAttributeStr
- the lower valueupperAttributeStr
- the upper value
EpBindException
- when the given value is not valid to be convertedpublic AttributeService getAttributeService()
public java.lang.String getDisplayName(java.util.Locale locale)
getDisplayName
in interface Filter
getDisplayName
in class AbstractRangeFilterImpl
locale
- the locale
public java.util.Locale getLocale()
public java.lang.String getSeoId()
getSeoId
in interface Filter
getSeoId
in class AbstractFilterImpl
public int hashCode()
hashCode
in class AbstractFilterImpl
public void initialize(java.lang.String filterId) throws EpCatalogViewRequestBindException
Filter
initialize
in interface Filter
filterId
- the filter id
EpCatalogViewRequestBindException
- the exceptionpublic boolean match(java.lang.Object obj)
match
in interface Filter
match
in class AbstractRangeFilterImpl
obj
- the given object.
public boolean match(java.lang.Object obj, java.util.Locale locale)
match
in interface AttributeRangeFilter
obj
- the given object.locale
- the given locale
public void setAttribute(Attribute attribute)
attribute
- the attribute to setpublic void setAttributeKey(java.lang.String attributeKey)
setAttributeKey
in interface AttributeFilter
attributeKey
- the attributeKey to setpublic void setAttributeService(AttributeService attributeService)
attributeService
- the attributeService to setpublic void setLocale(java.util.Locale locale)
locale
- the locale to setpublic void setLowerValue(java.lang.Object lowerValue)
setLowerValue
in interface RangeFilter
setLowerValue
in class AbstractRangeFilterImpl
lowerValue
- the lowerValue to setpublic void setUpperValue(java.lang.Object upperValue)
setUpperValue
in interface RangeFilter
setUpperValue
in class AbstractRangeFilterImpl
upperValue
- the upperValue to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |