Revision 6b8b51a2
Added by Patrick Plitzner about 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/term/TermSearchResult.java | ||
---|---|---|
13 | 13 |
|
14 | 14 |
import eu.etaxonomy.cdm.persistence.dto.TermDto; |
15 | 15 |
import eu.etaxonomy.cdm.remote.l10n.TermRepresentation_L10n; |
16 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
17 | 16 |
import eu.etaxonomy.taxeditor.view.search.facet.Facet; |
18 | 17 |
import eu.etaxonomy.taxeditor.view.search.facet.SearchResult; |
19 | 18 |
|
... | ... | |
36 | 35 |
return facets; |
37 | 36 |
} |
38 | 37 |
|
39 |
@Override |
|
40 |
public int compareTo(SearchResult<TermDto> o) { |
|
41 |
if(this.getContent()==null || o.getContent()==null){ |
|
42 |
MessagingUtils.error(this.getClass(), "SearchResult with no content!", null); |
|
43 |
return 0; |
|
44 |
} |
|
45 |
return this.getContent().compareTo(o.getContent()); |
|
46 |
} |
|
47 |
|
|
48 | 38 |
} |
Also available in: Unified diff
ref #8011 Enhance sort on search results