audiojury.domain
Class TestStatusComparator

java.lang.Object
  |
  +--audiojury.domain.TestStatusComparator
All Implemented Interfaces:
java.util.Comparator

public class TestStatusComparator
extends java.lang.Object
implements java.util.Comparator

Compares the tests according the test Status.


Constructor Summary
TestStatusComparator()
          Creates a new instance of TestStausComparator.
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          Compares the current test with the specified test according the test Status.
 
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
 

Constructor Detail

TestStatusComparator

public TestStatusComparator()
Creates a new instance of TestStausComparator.

Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Compares the current test with the specified test according the test Status. Ordering of test is important for save operation, when first are saved VIRGIN tests, then RENAMED, NEW and last DELETED. ( TMP test is not taken into account) For NEW tests, first are saved tests which have no Origin, that means a test is not a duplicate.

Specified by:
compare in interface java.util.Comparator