atg.svc.ui.treetable
Class ReferenceImplementation.ItemComparator

java.lang.Object
  extended by atg.svc.ui.treetable.ReferenceImplementation.ItemComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator
Enclosing class:
ReferenceImplementation

protected class ReferenceImplementation.ItemComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable

The ReferenceImplementation.ItemComparator class performs comparisons between items for the purpose of sorting the table component items.

See Also:
Serialized Form

Field Summary
protected  ReferenceImplementation.Context mCtx
          The page context for evaluating expressions.
protected  boolean mIgnoreCase
          Flag indicating whether case should be ignored during comparisons.
protected  boolean mIsAscending
          Flag indicating whehter the direction of the sort should be ascending.
protected  java.lang.String mItemAttributeName
          The attribute name for the item referenced in the sort value expression for a field.
protected  java.lang.String mSortValueExpression
          The expression whose object binding contains a field value within the item held in the specified attribute.
 
Constructor Summary
ReferenceImplementation.ItemComparator(ReferenceImplementation.Context context, java.lang.String itemAttributeName, java.lang.String sortValueExpression, boolean isAscending, boolean ignoreCase)
          Constructs a new comparator for the specified column, case-sensitivity and sort direction.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares two table component items.
 
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

mIgnoreCase

protected boolean mIgnoreCase
Flag indicating whether case should be ignored during comparisons.


mIsAscending

protected boolean mIsAscending
Flag indicating whehter the direction of the sort should be ascending.


mCtx

protected ReferenceImplementation.Context mCtx
The page context for evaluating expressions.


mItemAttributeName

protected java.lang.String mItemAttributeName
The attribute name for the item referenced in the sort value expression for a field.


mSortValueExpression

protected java.lang.String mSortValueExpression
The expression whose object binding contains a field value within the item held in the specified attribute.

Constructor Detail

ReferenceImplementation.ItemComparator

public ReferenceImplementation.ItemComparator(ReferenceImplementation.Context context,
                                              java.lang.String itemAttributeName,
                                              java.lang.String sortValueExpression,
                                              boolean isAscending,
                                              boolean ignoreCase)
Constructs a new comparator for the specified column, case-sensitivity and sort direction.

Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares two table component items.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - The first item to compare.
o2 - The second item to compare.
Returns:
[int] The result of the comparison as described by the Comparator interface contract.