|
|||||||||
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.PriceFilterImpl
public class PriceFilterImpl
This class is a filter implementation on the product price.
Field Summary | |
---|---|
static long |
serialVersionUID
Serial version id. |
Fields inherited from interface com.elasticpath.domain.catalogview.PriceFilter |
---|
MAX_PRICE, MIN_PRICE |
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 |
Constructor Summary | |
---|---|
PriceFilterImpl()
Default Constructer. |
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. |
java.util.Currency |
getCurrency()
Returns the currency of this price filter. |
java.lang.String |
getDisplayName(java.util.Locale locale)
Returns the display name of the filter with the given locale. |
java.math.BigDecimal |
getLowerPrice()
Returns the lower price of the price filter. |
java.lang.String |
getSeoId()
Returns the SEO identifier of the filter with the given locale. |
java.lang.String |
getSeoName(java.util.Locale locale)
Returns the SEO url of the filter with the given locale. |
java.math.BigDecimal |
getUpperPrice()
Returns the upper price of the price filter. |
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 has the same brand with this filter. |
void |
setCurrency(java.util.Currency currency)
Set the currency of this price filter. |
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. |
void |
setUtility(Utility utility)
Sets the utility. |
Methods inherited from class com.elasticpath.domain.catalogview.impl.AbstractRangeFilterImpl |
---|
addChild, addDisplayInfo, contains, getChildren, getDisplayInfo, getLevel, getLocalizedDisplayMap, getLowerValue, getParent, getPath, getRangeType, getUpperValue, setLocalizedDisplayMap, setParent, setRangeType |
Methods inherited from class com.elasticpath.domain.catalogview.impl.AbstractFilterImpl |
---|
equals, filter, getId, hashCode, 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, isLocalized, setId, setLocalized |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Methods inherited from interface com.elasticpath.domain.catalogview.BranchNode |
---|
getLevel, getPath |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public PriceFilterImpl()
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 java.util.Currency getCurrency()
getCurrency
in interface PriceFilter
public java.lang.String getDisplayName(java.util.Locale locale)
getDisplayName
in interface Filter
getDisplayName
in class AbstractRangeFilterImpl
locale
- the locale
public java.math.BigDecimal getLowerPrice()
getLowerPrice
in interface PriceFilter
public java.lang.String getSeoId()
getSeoId
in interface Filter
getSeoId
in class AbstractFilterImpl
public java.lang.String getSeoName(java.util.Locale locale)
getSeoName
in interface Filter
getSeoName
in class AbstractRangeFilterImpl
locale
- the locale
public java.math.BigDecimal getUpperPrice()
getUpperPrice
in interface PriceFilter
public void initialize(java.lang.String filterId) throws EpCatalogViewRequestBindException
initialize
in interface Filter
filterId
- the id to set
EpCatalogViewRequestBindException
- when the given filter id is invalidpublic boolean match(java.lang.Object obj)
match
in interface Filter
match
in class AbstractRangeFilterImpl
obj
- the given object.
public void setCurrency(java.util.Currency currency)
setCurrency
in interface PriceFilter
currency
- the currency.public 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 setpublic void setUtility(Utility utility)
utility
- the utility to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |