com.elasticpath.domain.catalogview.impl
Class CatalogViewResultHistoryImpl

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

public class CatalogViewResultHistoryImpl
extends AbstractTransientImpl
implements CatalogViewResultHistory

The default implementation of CatalogViewResultHistory.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serial version id.
 
Constructor Summary
CatalogViewResultHistoryImpl()
           
 
Method Summary
 CatalogViewResult addRequest(CatalogViewRequest newRequest)
          Add the given catalog view request and returns a catalog view result.
 CatalogViewResult getLastResult()
          Returns the last catalog view result.
 java.util.List getResultList()
          Returns the catalog view results as a List.
 int size()
          Returns the size of catalog view results.
 
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

CatalogViewResultHistoryImpl

public CatalogViewResultHistoryImpl()
Method Detail

addRequest

public CatalogViewResult addRequest(CatalogViewRequest newRequest)
Add the given catalog view request and returns a catalog view result. If we can find similar catalog view request in the history stack, products in the returned catalog view result will be populated so you don't need to load them again.

Specified by:
addRequest in interface CatalogViewResultHistory
Parameters:
newRequest - the catalog view request to add
Returns:
a catalog view result of the given catalog view request

getLastResult

public CatalogViewResult getLastResult()
Returns the last catalog view result.

Specified by:
getLastResult in interface CatalogViewResultHistory
Returns:
the last catalog view result

getResultList

public java.util.List getResultList()
Returns the catalog view results as a List. The most recent catalog view result is at the tail.

Specified by:
getResultList in interface CatalogViewResultHistory
Returns:
the catalog view result as a List.

size

public int size()
Returns the size of catalog view results.

Specified by:
size in interface CatalogViewResultHistory
Returns:
the size of catalog view results