Revision 4d68581f
Added by Katja Luther over 3 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/TermVocabularyDto.java | ||
---|---|---|
18 | 18 |
|
19 | 19 |
import eu.etaxonomy.cdm.model.term.Representation; |
20 | 20 |
import eu.etaxonomy.cdm.model.term.TermType; |
21 |
import eu.etaxonomy.cdm.model.term.TermVocabulary; |
|
21 | 22 |
|
22 | 23 |
/** |
23 | 24 |
* @author k.luther |
... | ... | |
36 | 37 |
// TODO Auto-generated constructor stub |
37 | 38 |
} |
38 | 39 |
|
40 |
public static TermVocabularyDto fromVocabulary(TermVocabulary voc) { |
|
41 |
TermVocabularyDto dto = new TermVocabularyDto(voc.getUuid(), voc.getRepresentations(), voc.getTermType(), voc.getTitleCache(), voc.isAllowDuplicates(), voc.isOrderRelevant(), voc.isFlat()); |
|
42 |
return dto; |
|
43 |
} |
|
44 |
|
|
39 | 45 |
public static List<TermVocabularyDto> termVocabularyDtoListFrom(List<Object[]> results) { |
40 | 46 |
List<TermVocabularyDto> dtos = new ArrayList<>(); // list to ensure order |
41 | 47 |
// map to handle multiple representations because of LEFT JOIN |
Also available in: Unified diff
ref #8774: further implementations for using term dtos in editor