com.webmethods.caf.jcr.faces.data
Class NodePropertyComparator

java.lang.Object
  extended by com.webmethods.caf.faces.data.object.DefaultComparator
      extended by com.webmethods.caf.jcr.faces.data.NodePropertyComparator
All Implemented Interfaces:
Comparator

public class NodePropertyComparator
extends DefaultComparator

Node property comparator used to sort the list of nodes


Field Summary
protected  String m_rowVariable
          The row variable name
protected  ISortInfo m_sortInfo
          Reference to the sort info
 
Fields inherited from class com.webmethods.caf.faces.data.object.DefaultComparator
m_ascending, m_collator
 
Constructor Summary
NodePropertyComparator(ISortInfo sort, String rowVar)
          Constructor
 
Method Summary
 int compare(Node o1, Node o2)
          Compares the two nodes
 int compare(Object o1, Object o2)
          Compares the two objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

m_sortInfo

protected ISortInfo m_sortInfo
Reference to the sort info


m_rowVariable

protected String m_rowVariable
The row variable name

Constructor Detail

NodePropertyComparator

public NodePropertyComparator(ISortInfo sort,
                              String rowVar)
Constructor

Parameters:
sort - the sort info
rowVar - the row variable name
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Compares the two objects

Specified by:
compare in interface Comparator
Overrides:
compare in class DefaultComparator

compare

public int compare(Node o1,
                   Node o2)
Compares the two nodes

Specified by:
compare in interface Comparator
Overrides:
compare in class DefaultComparator