else if (row1 == null) return 0;
// Compare the two rows.
for (int i=0; i<columns.size(); i++) {
DataColumn column = columns.get(i);
SortOrder order = orders.get(i);
Comparable value1 = (Comparable) column.getValues().get(row1);
Comparable value2 = (Comparable) column.getValues().get(row2);
int comp = ComparatorUtils.compare(value1, value2, order.asInt());
if (comp != 0) return comp;
}
return 0;
}