Revision df366db5
Added by Katja Luther about 7 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java | ||
---|---|---|
342 | 342 |
} |
343 | 343 |
|
344 | 344 |
|
345 |
class ReferencingClassComparator implements Comparator<CdmBase> { |
|
345 |
class ReferencingClassComparator implements Comparator<CdmBase> {
|
|
346 | 346 |
|
347 | 347 |
@Override |
348 | 348 |
public int compare(CdmBase o1, CdmBase o2) { |
349 | 349 |
String string1 = o1.getClass().getSimpleName(); |
350 | 350 |
String string2 = o2.getClass().getSimpleName(); |
351 |
int classCompare = string1.compareToIgnoreCase(string2);
|
|
352 |
if (classCompare == 0) {
|
|
351 |
int result = string1.compareToIgnoreCase(string2);
|
|
352 |
if (result == 0) {
|
|
353 | 353 |
string1 = DescriptionHelper.getObjectDescription(o1); |
354 | 354 |
string2 = DescriptionHelper.getObjectDescription(o2); |
355 | 355 |
|
356 |
return string1.compareToIgnoreCase(string2); |
|
357 |
} else { |
|
358 |
return classCompare; |
|
356 |
result = string1.compareToIgnoreCase(string2); |
|
357 |
if (result == 0){ |
|
358 |
return o1.getUuid().compareTo(o2.getUuid()); |
|
359 |
} |
|
359 | 360 |
} |
361 |
return result; |
|
360 | 362 |
} |
361 | 363 |
} |
362 | 364 |
|
Also available in: Unified diff
ref #4232: some more comparators to adapt