com.stc.eindex.master.search.transaction
Class TransactionSummaryComparator

java.lang.Object
  extended bycom.stc.eindex.master.search.transaction.TransactionSummaryComparator
All Implemented Interfaces:
java.util.Comparator, java.io.Serializable

public class TransactionSummaryComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable

The TransactionSummaryComparator class is used to sort and compare TransactionSummary objects in a transaction iterator.

See Also:
Serialized Form

Constructor Summary
TransactionSummaryComparator(java.lang.String field, boolean reverse)
          Creates a new instance of the TransactionSummaryComparator class, and sorts the transaction summaries by the specified field.
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          Compares the field by which the transaction summaries in the transaction iterator are sorted to determine the order in which they will be displayed.
 
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
compare, equals
 

Constructor Detail

TransactionSummaryComparator

public TransactionSummaryComparator(java.lang.String field,
                                    boolean reverse)
Creates a new instance of the TransactionSummaryComparator class, and sorts the transaction summaries by the specified field.

Parameters:
field - The name of the field to use as sorting criteria. The following field names can be used.
  • LID1
  • LID2
  • EUID1
  • EUID2
  • Function
  • SystemUser
  • TimeStamp
  • SystemCode
  • LID
  • EUID
reverse - An indicator of whether to sort in ascending or descending order. Specify true to sort in descending order, or specify false to sort in ascending order.
Throws:
None.
Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Compares the field by which the transaction summaries in the transaction iterator are sorted to determine the order in which they will be displayed.

Parameters:
obj1 - The first transaction summary to compare.
obj2 - The second transaction summary to compare.
Returns:
int - An integer representing the results of the comparison. Possible results are:
  • Negative integer - The value of the 'sort by' field in the first object is less than that of the second object.
  • Zero (0) - The 'sort by' field in the two objects are equal.
  • Positive integer - The value of the 'sort by' field in the first object is greater than that of the second object.
Throws:
None.


Copyright 2007 by Sun Microsystems, Inc. All Rights Reserved.