@Override
	public int compare(Row rowOne, Row rowTwo) {
		if (rowOne.getParent() == rowTwo.getParent()) {
			for (Column column : mSortingOrder) {
				int result;

				if (column == null) {
					return 0;
				}
				result = column.getRowCell(null).compare(column, rowOne, rowTwo);
				if (result != 0) {
					return column.isSortAscending() ? result : -result;
				}
			}
		} else {
			if (rowOne.isDescendantOf(rowTwo)) {
				return 1;
			}
			if (rowTwo.isDescendantOf(rowOne)) {
				return -1;
			}

			// Find common parents and compare them...
			Row[] oneParents = rowOne.getPath();
			Row[] twoParents = rowTwo.getPath();
			int max = Math.min(oneParents.length, twoParents.length);
			int i = 0;

			for (i = 0; i < max; i++) {
				if (oneParents[i] != twoParents[i]) {
					break;
				}
			}

			return compare(oneParents[i], twoParents[i]);
		}
		return 0;
	}