com.hlcl.rql.util.as
Class StandardFieldDatePageComparator

java.lang.Object
  extended by com.hlcl.rql.util.as.PageComparator
      extended by com.hlcl.rql.util.as.StandardFieldDatePageComparator
All Implemented Interfaces:
java.util.Comparator

public class StandardFieldDatePageComparator
extends PageComparator

Author:
lejafr This class implements the compare method to sort a list of pages by a standard field date element. All pages in the list needs to have this date element. Very often they are instances of the same template.

Constructor Summary
StandardFieldDatePageComparator(java.lang.String dateTmpltElemName)
          Creates a Comparator for date elements.
 
Method Summary
 int comparePages(Page p1, Page p2)
          Compare given pages by the value of the standard field date element.
 
Methods inherited from class com.hlcl.rql.util.as.PageComparator
compare, forceDescendingOrdering
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

StandardFieldDatePageComparator

public StandardFieldDatePageComparator(java.lang.String dateTmpltElemName)
Creates a Comparator for date elements. Assume ascending ordering per default.

Method Detail

comparePages

public int comparePages(Page p1,
                        Page p2)
Compare given pages by the value of the standard field date element.

Specified by:
comparePages in class PageComparator
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.