com.elasticpath.domain.catalogview.impl
Class ProductAdaptorForPriceFilterImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractTransientImpl
          extended by com.elasticpath.domain.catalogview.impl.AbstractProductAdaptorForFilterImpl
              extended by com.elasticpath.domain.catalogview.impl.ProductAdaptorForPriceFilterImpl
All Implemented Interfaces:
LeafNode, ProductAdaptorForFilter, ProductAdaptorForPriceFilter, EpDomain, Transient, java.io.Serializable, java.lang.Comparable

public class ProductAdaptorForPriceFilterImpl
extends AbstractProductAdaptorForFilterImpl
implements ProductAdaptorForPriceFilter

This is a default implementation of ProductAdaptorForPriceFilter.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
ProductAdaptorForPriceFilterImpl()
           
 
Method Summary
 int compareTo(java.lang.Object object)
          Compares this product adaptor with the given object.
 BranchNode getBranchNode()
          Returns the branch node.
 java.util.Currency getCurrency()
          Returns the currency.
 java.math.BigDecimal getPrice()
          Returns the price of the product.
 void setCurrency(java.util.Currency currency)
          Sets the currency.
 
Methods inherited from class com.elasticpath.domain.catalogview.impl.AbstractProductAdaptorForFilterImpl
getProduct, setProduct
 
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.catalogview.ProductAdaptorForFilter
getProduct, setProduct
 
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

ProductAdaptorForPriceFilterImpl

public ProductAdaptorForPriceFilterImpl()
Method Detail

compareTo

public int compareTo(java.lang.Object object)
              throws EpDomainException
Compares this product adaptor with the given object. This method is used to lookup the right price filter that this product adaptor belongs to. So, the given object must be a PriceFilter.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
object - the given object
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
EpDomainException - in case the given object is not a PriceFilter

getBranchNode

public BranchNode getBranchNode()
Returns the branch node. A leaf node should have one and only one BranchNode.

Specified by:
getBranchNode in interface LeafNode
Specified by:
getBranchNode in class AbstractProductAdaptorForFilterImpl
Returns:
the branch node

getCurrency

public java.util.Currency getCurrency()
Returns the currency.

Specified by:
getCurrency in interface ProductAdaptorForPriceFilter
Returns:
the currency

getPrice

public java.math.BigDecimal getPrice()
Returns the price of the product. This price is the lowest price of the product.

Specified by:
getPrice in interface ProductAdaptorForPriceFilter
Returns:
the price of the product

setCurrency

public void setCurrency(java.util.Currency currency)
Sets the currency.

Specified by:
setCurrency in interface ProductAdaptorForPriceFilter
Parameters:
currency - the currency to set