* and a value greater than 0 if the argument is a string lexicographically less than this object.
* @throws ClassCastException if the argument is not a WorkflowTask.
*/
public int compareTo(final Object o)
{
WorkflowTask w1 = this;
WorkflowTask w2 = (WorkflowTask) o;
int ret;
Integer p1 = new Integer(w1.getPriority());
Integer p2 = new Integer(w2.getPriority());
ret = CommonUtil.compareNull(p1, p2);
if (ret != 0)
return ret;
Timestamp d1 = w1.getDueTime();
Timestamp d2 = w2.getDueTime();
ret = CommonUtil.compareNull(d1, d2);
if (ret != 0)
return ret;
Timestamp c1 = w1.getTimeCreated();
Timestamp c2 = w2.getTimeCreated();
ret = CommonUtil.compareNull(c1, c2);
if (ret != 0)
return ret;
String x1 = w1.getDisplayName();
String x2 = w2.getDisplayName();
ret = CommonUtil.compareNull(x1, x2);
if (ret != 0)
return ret;
String y1 = w1.getName();
String y2 = w2.getName();
return CommonUtil.compareNull(y1, y2);
}