Project

General

Profile

« Previous | Next » 

Revision 6e52cede

Added by Patrick Plitzner almost 6 years ago

ref #6330 Adapt comparator to specific sorting

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/SourceSection.java
3 3
 */
4 4
package eu.etaxonomy.taxeditor.ui.section.supplemental;
5 5

  
6
import java.util.ArrayList;
7 6
import java.util.Collection;
8
import java.util.Collections;
9 7
import java.util.Comparator;
10
import java.util.List;
11 8

  
12 9
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
13 10
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
......
17 14
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
18 15
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
19 16
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
20
import eu.etaxonomy.taxeditor.ui.section.DefaultCdmBaseComparator;
21 17
import eu.etaxonomy.taxeditor.ui.section.description.SourceComparator;
22 18

  
23 19
/**
......
60 56
	@Override
61 57
	public Collection<IdentifiableSource> getCollection(
62 58
			IIdentifiableEntity entity) {
63
		List<IdentifiableSource> sources = new ArrayList<IdentifiableSource>(entity.getSources());
64
		Collections.sort(sources, new SourceComparator());
65
        return sources;
59
		return entity.getSources();
66 60
	}
67 61

  
68 62
	@Override
69 63
	public Comparator<IdentifiableSource> getComparator() {
70
        return new DefaultCdmBaseComparator<>();
64
        return new SourceComparator();
71 65
	}
72 66

  
73 67
	/** {@inheritDoc} */

Also available in: Unified diff