com.elasticpath.domain.catalogview.impl
Class PriceSorterImpl

java.lang.Object
  extended by com.elasticpath.domain.impl.AbstractEpDomainImpl
      extended by com.elasticpath.domain.impl.AbstractTransientImpl
          extended by com.elasticpath.domain.catalogview.impl.PriceSorterImpl
All Implemented Interfaces:
Sorter, EpDomain, Transient, java.io.Serializable

public class PriceSorterImpl
extends AbstractTransientImpl
implements Sorter

The default implementation of PriceSorter.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Fields inherited from interface com.elasticpath.domain.catalogview.Sorter
ASC, DSC
 
Constructor Summary
PriceSorterImpl()
          Default Constructer.
 
Method Summary
 java.lang.String getId()
          Returns the id of the sorter.
 void initialize(java.lang.String sorterId)
          Sets the sorter id and initialize the sorter.
 void setProductLowestPriceComparator(ProductLowestPriceComparator productLowestPriceComparator)
          Sets the display name comparator.
 void setUtility(Utility utility)
          Sets the utility.
 java.util.List sort(java.util.List products)
          Sorts the given list of products and return the sorted list.
 
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.EpDomain
getElasticPath, setElasticPath
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

PriceSorterImpl

public PriceSorterImpl()
Default Constructer.

Method Detail

getId

public java.lang.String getId()
Returns the id of the sorter. Every sorter has a unique id.

Specified by:
getId in interface Sorter
Returns:
the id of the sorter

initialize

public void initialize(java.lang.String sorterId)
                throws EpCatalogViewRequestBindException
Sets the sorter id and initialize the sorter.

Specified by:
initialize in interface Sorter
Parameters:
sorterId - the id to set
Throws:
EpCatalogViewRequestBindException - when the given sorter id is invalid

setProductLowestPriceComparator

public void setProductLowestPriceComparator(ProductLowestPriceComparator productLowestPriceComparator)
Sets the display name comparator.

Parameters:
productLowestPriceComparator - the display name comparator

setUtility

public void setUtility(Utility utility)
Sets the utility.

Parameters:
utility - the utility

sort

public java.util.List sort(java.util.List products)
Sorts the given list of products and return the sorted list.

Specified by:
sort in interface Sorter
Parameters:
products - the list of products to sort
Returns:
the sorted list