com.endeca.infront.cartridge
Class ResultsList

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by com.endeca.infront.assembler.BasicContentItem
              extended by com.endeca.infront.cartridge.ResultsList
All Implemented Interfaces:
ContentItem, Serializable, Cloneable, Map<String,Object>

public class ResultsList
extends BasicContentItem

ResultsListHandler output model.

See Also:
SortOptionLabel, Record, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ResultsList(ResultsListConfig pConfig)
          Creates the ResultsList output model, using the type and data present in the input ResultsListConfig.
 
Method Summary
 long getFirstRecNum()
          One-based index of the first record in the records list.
 long getLastRecNum()
          One-based index of the last record in the records list.
 NavigationAction getPagingActionTemplate()
          Gets an action that can be modified to retrieve a page in the ResultsList.
 List<Sort> getPrecomputedSorts()
          Returns the list of precomputed sorts (as configured in the mdex engine)
 List<Record> getRecords()
          Returns the list of records.
 long getRecsPerPage()
          Returns the records per page in the rendering code.
 List<SortOptionLabel> getSortOptions()
          Returns the list of sort options to display.
 long getTotalNumRecs()
          Total number of records in the result set; not the same as the number of records in this ResultsList.
 void setFirstRecNum(long firstRecNum)
          Sets the one-based index of the first record in the record list.
 void setLastRecNum(long lastRecNum)
          Sets one-based index of the last record in the records list.
 void setPagingActionTemplate(NavigationAction pagingAction)
          Sets the paging action template.
 void setPrecomputedSorts(List<Sort> precomputedSorts)
          Sets the list of precomputed sorts.
 void setRecords(List<Record> records)
          Sets the list of records.
 void setRecsPerPage(long recsPerPage)
          Sets records per page in the rendering code.
 void setSortOptions(List<SortOptionLabel> sortOptions)
          Sets the list of sort options to display.
 void setTotalNumRecs(long totalNumRecs)
          Sets total number of records.
 
Methods inherited from class com.endeca.infront.assembler.BasicContentItem
getBooleanProperty, getIntProperty, getLongProperty, getType, getTypedProperty, setType
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

ResultsList

public ResultsList(ResultsListConfig pConfig)
Creates the ResultsList output model, using the type and data present in the input ResultsListConfig.

Method Detail

getRecords

public List<Record> getRecords()
Returns the list of records.


setRecords

public void setRecords(List<Record> records)
Sets the list of records.


getFirstRecNum

public long getFirstRecNum()
One-based index of the first record in the records list. If the list of records is empty, this method returns 0.


setFirstRecNum

public void setFirstRecNum(long firstRecNum)
Sets the one-based index of the first record in the record list.


getLastRecNum

public long getLastRecNum()
One-based index of the last record in the records list. If the list of records is empty, this method returns 0.


setLastRecNum

public void setLastRecNum(long lastRecNum)
Sets one-based index of the last record in the records list.


getTotalNumRecs

public long getTotalNumRecs()
Total number of records in the result set; not the same as the number of records in this ResultsList.

If aggregate records are enabled, this is the total number of aggregate records in the result set.


setTotalNumRecs

public void setTotalNumRecs(long totalNumRecs)
Sets total number of records.

See Also:
getTotalNumRecs()

getPagingActionTemplate

public NavigationAction getPagingActionTemplate()
Gets an action that can be modified to retrieve a page in the ResultsList.

e.g. /_/N-349584?No={offset}&Nrpp={recordPerPage}

Returns:
an action that can be used by renderers to retrieve records using well-known URL parameters like "No" for offsets and "Nrpp" for number of records to retrieve.

Format of this action URL depends on application configuration and cartridge handler configuration.


setPagingActionTemplate

public void setPagingActionTemplate(NavigationAction pagingAction)
Sets the paging action template.

See Also:
getPagingActionTemplate()

getSortOptions

public List<SortOptionLabel> getSortOptions()
Returns the list of sort options to display.


setSortOptions

public void setSortOptions(List<SortOptionLabel> sortOptions)
Sets the list of sort options to display.


getRecsPerPage

public long getRecsPerPage()
Returns the records per page in the rendering code.


setRecsPerPage

public void setRecsPerPage(long recsPerPage)
Sets records per page in the rendering code.


getPrecomputedSorts

public List<Sort> getPrecomputedSorts()
Returns the list of precomputed sorts (as configured in the mdex engine)

Note: Unless precomputed sorts are explicitly selected to be returned by the app, this list will be empty


setPrecomputedSorts

public void setPrecomputedSorts(List<Sort> precomputedSorts)
Sets the list of precomputed sorts.



Copyright © 2012, Oracle and/or its affiliates. All rights reserved.