com.raritantechnologies.searchApp
Class ResultSetSorter

java.lang.Object
  extended bycom.raritantechnologies.searchApp.ResultSetSorter
All Implemented Interfaces:
IConfigurable, ISorter

public class ResultSetSorter
extends java.lang.Object
implements ISorter

Sort a result set using a specified IResultComparator.

XML Configuration Template:
   <Sorter class="com.raritantechnologies.searchApp.ResultSetSorter" >
     <Comparator class="[ class of com.raritantechnologies.searchApp.IResultComparator ]" >

     </Comparator>
   </Sorter>
 

Developed by Raritan Technologies .

Author:
Kepler Gelotte

Constructor Summary
ResultSetSorter()
           
ResultSetSorter(java.util.Comparator comparator)
           
 
Method Summary
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 java.util.List sort(IResultSet resultSet, RaritanPageContext pageContext)
           
 void sort(java.util.List results, RaritanPageContext pageContext)
          Sort a list of IResult objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetSorter

public ResultSetSorter()

ResultSetSorter

public ResultSetSorter(java.util.Comparator comparator)
Method Detail

sort

public void sort(java.util.List results,
                 RaritanPageContext pageContext)
Description copied from interface: ISorter
Sort a list of IResult objects.

Specified by:
sort in interface ISorter

sort

public java.util.List sort(IResultSet resultSet,
                           RaritanPageContext pageContext)

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable