clean up dto methods
authorKatja Luther <k.luther@bgbm.org>
Mon, 3 Jul 2023 12:27:28 +0000 (14:27 +0200)
committerKatja Luther <k.luther@bgbm.org>
Mon, 3 Jul 2023 12:27:48 +0000 (14:27 +0200)
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/term/TermTreeDaoImpl.java
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/term/TermVocabularyDaoImpl.java
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/term/ITermTreeDao.java
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/term/ITermVocabularyDao.java
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/TermCollectionDto.java
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/TermVocabularyDto.java
cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/term/TermVocabularyDaoImplTest.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/ITermTreeService.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IVocabularyService.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TermTreeServiceImpl.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/VocabularyServiceImpl.java

index dacd2e5dcfec47b281c90fda9487565a9d252094..9025ce92ce762e72a9eb83b82f59266ec1c8f44b 100644 (file)
@@ -136,7 +136,7 @@ public class TermTreeDaoImpl
     }
 
     @Override
-    public List<TermCollectionDto> listTermTreeDtosByTermType(TermType termType) {
+    public List<TermTreeDto> listTermTreeDtosByTermType(TermType termType) {
         String queryString = TermCollectionDto.getTermCollectionDtoSelect("TermTree")
                 + " WHERE a.termType = :termType"
                 + " ORDER BY a.titleCache";
@@ -146,11 +146,15 @@ public class TermTreeDaoImpl
         List<Object[]> result = query.list();
 
         List<TermCollectionDto> list = TermTreeDto.termTreeDtoListFrom(result);
-        return list;
+        List<TermTreeDto> treeList = new ArrayList<>();
+        for (TermCollectionDto coll: list) {
+            treeList.add((TermTreeDto)coll);
+        }
+        return treeList;
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByUuids(List<UUID> termType) {
+    public List<TermTreeDto> findTermTreeDtoByUuids(List<UUID> termType) {
         String queryString = TermTreeDto.getTermTreeDtoSelect()
                 + " WHERE a.termType = :termType"
                 + " ORDER BY a.titleCache";
@@ -158,14 +162,17 @@ public class TermTreeDaoImpl
         query.setParameter("termType", termType);
 
         List<Object[]> result = query.list();
-
-        List<TermCollectionDto> list = TermTreeDto.termTreeDtoListFrom(result);
+        List<TermCollectionDto> collDtos = TermTreeDto.termTreeDtoListFrom(result);
+        List<TermTreeDto> list = new ArrayList<>();
+        for (TermCollectionDto coll: collDtos) {
+            list.add((TermTreeDto)coll);
+        }
         return list;
     }
 
     @Override
-    public TermCollectionDto getTermTreeDtosByUuid(UUID uuid) {
-        String queryString = TermTreeDto.getTermCollectionDtoSelect()
+    public TermTreeDto getTermTreeDtosByUuid(UUID uuid) {
+        String queryString = TermTreeDto.getTermTreeDtoSelect()
                 + " WHERE a.uuid = :uuid"
                 + " ORDER BY a.titleCache";
         Query<Object[]> query =  getSession().createQuery(queryString, Object[].class);
@@ -173,6 +180,7 @@ public class TermTreeDaoImpl
 
         List<Object[]> result = query.list();
         List<TermCollectionDto> list = TermTreeDto.termTreeDtoListFrom(result);
-        return !list.isEmpty()? list.get(0): null;
+
+        return !list.isEmpty()? (TermTreeDto)list.get(0): null;
     }
 }
\ No newline at end of file
index 6a9220daa0574584888d2c8be16f4bf51725369b..3e4430194c5fa894604062269b9998bfe7923260 100644 (file)
@@ -339,17 +339,17 @@ public class TermVocabularyDaoImpl
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes) {
         return findVocabularyDtoByTermTypes(termTypes, true);
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, boolean includeSubtypes) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, boolean includeSubtypes) {
         return findVocabularyDtoByTermTypes(termTypes, null, includeSubtypes);
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByAvailableFor(Set<CdmClass> availableForSet) {
+    public List<TermVocabularyDto> findVocabularyDtoByAvailableFor(Set<CdmClass> availableForSet) {
 
         String queryVocWithFittingTerms = "SELECT DISTINCT(v.uuid) FROM DefinedTermBase term JOIN term.vocabulary as v WHERE " ;
         for (CdmClass availableFor: availableForSet){
@@ -364,12 +364,16 @@ public class TermVocabularyDaoImpl
         query.setParameter("feature", TermType.Feature);
 
         List<Object[]> result = query.list();
-        List<TermCollectionDto>  dtos = TermVocabularyDto.termVocabularyDtoListFrom(result);
+        List<TermCollectionDto>  collDtos = TermVocabularyDto.termVocabularyDtoListFrom(result);
+        List<TermVocabularyDto>  dtos = new ArrayList<>();
+        for (TermCollectionDto coll: collDtos) {
+            dtos.add((TermVocabularyDto)coll);
+        }
         return dtos;
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, String pattern, boolean includeSubtypes) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, String pattern, boolean includeSubtypes) {
         Set<TermType> termTypeWithSubType = new HashSet<>();
         if (! (termTypes.isEmpty() || (termTypes.size() == 1 && termTypes.iterator().next() == null))){
             termTypeWithSubType = new HashSet<>(termTypes);
@@ -408,12 +412,16 @@ public class TermVocabularyDaoImpl
         }
 
         List<Object[]> result = query.list();
-        List<TermCollectionDto> dtos = TermVocabularyDto.termVocabularyDtoListFrom(result);
+        List<TermVocabularyDto> dtos = new ArrayList<>();
+        List<TermCollectionDto> collDtos = TermVocabularyDto.termVocabularyDtoListFrom(result);
+        for (TermCollectionDto coll:collDtos) {
+            dtos.add((TermVocabularyDto)coll);
+        }
         return dtos;
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermType(TermType termType) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermType(TermType termType) {
         return findVocabularyDtoByTermTypes(Collections.singleton(termType));
     }
 
@@ -451,7 +459,7 @@ public class TermVocabularyDaoImpl
     }
 
     @Override
-    public TermCollectionDto findVocabularyDtoByUuid(UUID vocUuid) {
+    public TermVocabularyDto findVocabularyDtoByUuid(UUID vocUuid) {
         if (vocUuid == null ){
             return null;
         }
@@ -464,18 +472,18 @@ public class TermVocabularyDaoImpl
 
         List<Object[]> result = query.list();
         if (result.size() == 1){
-            return TermVocabularyDto.termVocabularyDtoListFrom(result).get(0);
+            return (TermVocabularyDto) TermVocabularyDto.termVocabularyDtoListFrom(result).get(0);
         }
         return null;
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByUuids(List<UUID> vocUuids) {
+    public List<TermVocabularyDto> findVocabularyDtoByUuids(List<UUID> vocUuids) {
 
         if (vocUuids == null || vocUuids.isEmpty()){
             return null;
         }
-        List<TermCollectionDto> list = new ArrayList<>();
+        List<TermVocabularyDto> list = new ArrayList<>();
 
         String queryString = TermCollectionDto.getTermCollectionDtoSelect()
                 + " WHERE a.uuid IN :uuidList ";
@@ -484,7 +492,10 @@ public class TermVocabularyDaoImpl
         query.setParameterList("uuidList", vocUuids);
 
         List<Object[]> result = query.list();
-        list = TermCollectionDto.termCollectionDtoListFrom(result);
+        List<TermCollectionDto> collDtos = TermVocabularyDto.termVocabularyDtoListFrom(result);
+        for (TermCollectionDto coll: collDtos) {
+            list.add((TermVocabularyDto)coll);
+        }
         return list;
     }
 
index b60df863c4db6b9b407c6f51ec6ce0fc48fa86f4..b5390a503a45e077572d0d5516f2a7aee5acc41a 100644 (file)
@@ -15,7 +15,7 @@ import eu.etaxonomy.cdm.model.term.TermNode;
 import eu.etaxonomy.cdm.model.term.TermTree;
 import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
-import eu.etaxonomy.cdm.persistence.dto.TermCollectionDto;
+import eu.etaxonomy.cdm.persistence.dto.TermTreeDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 
 /**
@@ -36,9 +36,9 @@ public interface ITermTreeDao extends IIdentifiableDao<TermTree> {
     public <S extends TermTree> List<UuidAndTitleCache<S>> getUuidAndTitleCacheByTermType(Class<S> clazz, TermType termType, Integer limit,
             String pattern);
 
-    public <S extends TermTree> List<TermCollectionDto> listTermTreeDtosByTermType(TermType termType);
+    public <S extends TermTree> List<TermTreeDto> listTermTreeDtosByTermType(TermType termType);
 
-    public TermCollectionDto getTermTreeDtosByUuid(UUID uuid);
+    public TermTreeDto getTermTreeDtosByUuid(UUID uuid);
 
     /**
      * Returns list of term trees for list of UUIDs
@@ -46,6 +46,6 @@ public interface ITermTreeDao extends IIdentifiableDao<TermTree> {
      * @param vocUuids the {@link UUID} of the trees
      * @return term trees
      */
-    public List<TermCollectionDto> findVocabularyDtoByUuids(List<UUID> vocUuids);
+    public List<TermTreeDto> findTermTreeDtoByUuids(List<UUID> vocUuids);
 
 }
index ff09108eb416a1063bf50c622b4c64720b2ace9b..c9868b16bca524633023265b436269a8ca031614 100644 (file)
@@ -19,8 +19,8 @@ import eu.etaxonomy.cdm.model.term.DefinedTermBase;
 import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.term.TermVocabulary;
 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
-import eu.etaxonomy.cdm.persistence.dto.TermCollectionDto;
 import eu.etaxonomy.cdm.persistence.dto.TermDto;
+import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
 
@@ -144,7 +144,7 @@ public interface ITermVocabularyDao extends IIdentifiableDao<TermVocabulary> {
      * @param termType the {@link TermType} of the terms in the vocabulary and of the vocabulary
      * @return a list of term vocabularies
      */
-    public List<TermCollectionDto> findVocabularyDtoByTermType(TermType termType);
+    public List<TermVocabularyDto> findVocabularyDtoByTermType(TermType termType);
 
     /**
      * Returns term vocabularies that contain terms of a certain {@link TermType} e.g. Feature, Modifier, State. containing pattern
@@ -154,7 +154,7 @@ public interface ITermVocabularyDao extends IIdentifiableDao<TermVocabulary> {
      * @param includeSubTypes
      * @return a list of term vocabularies
      */
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, String pattern, boolean includeSubtypes);
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, String pattern, boolean includeSubtypes);
 
     /**
      * Returns term vocabularies that contain terms of a certain {@link TermType} e.g. Feature, Modifier, State.
@@ -162,7 +162,7 @@ public interface ITermVocabularyDao extends IIdentifiableDao<TermVocabulary> {
      * @param termType the {@link TermType} of the terms in the vocabulary and of the vocabulary
      * @return a list of term vocabularies
      */
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termType);
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termType);
 
     /**
      * Returns term vocabularies that contain terms of a certain {@link TermType} e.g. Feature, Modifier, State.
@@ -172,7 +172,7 @@ public interface ITermVocabularyDao extends IIdentifiableDao<TermVocabulary> {
      * will be considered
      * @return a list of term vocabularies
      */
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termType, boolean includeSubtypes);
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termType, boolean includeSubtypes);
 
     /**
      * Returns term vocabulary for UUID
@@ -180,7 +180,7 @@ public interface ITermVocabularyDao extends IIdentifiableDao<TermVocabulary> {
      * @param UUID the {@link UUID} of the vocabulary
      * @return term vocabularies
      */
-    public TermCollectionDto findVocabularyDtoByUuid(UUID vocUuid);
+    public TermVocabularyDto findVocabularyDtoByUuid(UUID vocUuid);
 
     /**
      * Returns list of term vocabularies for list of UUIDs
@@ -188,7 +188,7 @@ public interface ITermVocabularyDao extends IIdentifiableDao<TermVocabulary> {
      * @param vocUuids the {@link UUID} of the vocabularies
      * @return term vocabularies
      */
-    public List<TermCollectionDto> findVocabularyDtoByUuids(List<UUID> vocUuids);
+    public List<TermVocabularyDto> findVocabularyDtoByUuids(List<UUID> vocUuids);
 
     /**
      *
@@ -215,5 +215,5 @@ public interface ITermVocabularyDao extends IIdentifiableDao<TermVocabulary> {
      * @param availableFor
      * @return
      */
-    public List<TermCollectionDto> findVocabularyDtoByAvailableFor(Set<CdmClass> availableFor);
+    public List<TermVocabularyDto> findVocabularyDtoByAvailableFor(Set<CdmClass> availableFor);
 }
index d43c188bdd25e840dd0e7d623176325c3f20d429..bad9ce8bee4f5f10f7c8c6c2a8c155e4326800c5 100644 (file)
@@ -204,7 +204,8 @@ public abstract class TermCollectionDto extends AbstractTermDto {
 
         } else {
             if (elements[9]== null) {
-                TermVocabularyDto.extractedVocabularies(dtos, dtoMap, elements);
+               TermVocabularyDto.extractedVocabularies(dtos, dtoMap, elements);
+
             }else {
                 TermTreeDto.extracted(dtos, dtoMap, elements);
             }
index 75bf2bf4a38f87070dc1b9550aa1f8bdaa097677..179f74ec3c3f86196dbd75bd3f21850dbf3f07c7 100755 (executable)
@@ -41,7 +41,7 @@ public class TermVocabularyDto extends TermCollectionDto {
     }
 
     public static List<TermCollectionDto> termVocabularyDtoListFrom(List<Object[]> queryResult) {
-        List<TermCollectionDto> dtos = new ArrayList<>(); // list to ensure order
+        List<TermCollectionDto> dtos = new ArrayList<>();// list to ensure order
         // map to handle multiple representations because of LEFT JOIN
         Map<UUID, TermCollectionDto> dtoMap = new HashMap<>(queryResult.size());
         for (Object[] elements : queryResult) {
@@ -58,6 +58,7 @@ public class TermVocabularyDto extends TermCollectionDto {
      */
     protected static void extractedVocabularies(List<TermCollectionDto> dtos, Map<UUID, TermCollectionDto> dtoMap, Object[] elements) {
         UUID uuid = (UUID)elements[0];
+
         if(dtoMap.containsKey(uuid)){
             // multiple results for one voc -> multiple (voc) representation
             if(elements[1]!=null){
index 28ae2642c7cd3cfa22b82b8486c7a31c02806990..2b2347047ac8c107c6aac3fc85ea9323c6535e1b 100644 (file)
@@ -34,7 +34,7 @@ import eu.etaxonomy.cdm.model.term.Representation;
 import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.term.TermVocabulary;
 import eu.etaxonomy.cdm.persistence.dao.term.ITermVocabularyDao;
-import eu.etaxonomy.cdm.persistence.dto.TermCollectionDto;
+import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
 import eu.etaxonomy.cdm.test.integration.CdmTransactionalIntegrationTest;
 import eu.etaxonomy.cdm.test.unitils.CleanSweepInsertLoadStrategy;
 
@@ -174,7 +174,7 @@ public class TermVocabularyDaoImplTest extends CdmTransactionalIntegrationTest {
        public void testFindVocabularyDtoByTermTypes(){
            Set<TermType> termTypes = new HashSet<>();
            termTypes.add(TermType.NamedArea);
-           List<TermCollectionDto> vocDtos = dao.findVocabularyDtoByTermTypes(termTypes, true);
+           List<TermVocabularyDto> vocDtos = dao.findVocabularyDtoByTermTypes(termTypes, true);
            Assert.assertEquals(4, vocDtos.size());
 
            //#9825 test deduplication
index 67831b2f259078e588516151bd9c2d2cec5dd034..9aa2f6c7a327bd037f14da67011b0007472dcbab 100644 (file)
@@ -18,7 +18,6 @@ import eu.etaxonomy.cdm.model.term.TermNode;
 import eu.etaxonomy.cdm.model.term.TermTree;
 import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.persistence.dao.common.Restriction;
-import eu.etaxonomy.cdm.persistence.dto.TermCollectionDto;
 import eu.etaxonomy.cdm.persistence.dto.TermTreeDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
@@ -49,14 +48,14 @@ public interface ITermTreeService extends IIdentifiableEntityService<TermTree> {
 
     public List<Restriction<?>> buildTermTypeFilterRestrictions(TermType termType);
 
-    public List<TermCollectionDto> listTermTreeDtosByTermType(TermType termType);
+    public List<TermTreeDto> listTermTreeDtosByTermType(TermType termType);
 
-    public TermCollectionDto getTermTreeDtoByUuid(UUID uuid);
+    public TermTreeDto getTermTreeDtoByUuid(UUID uuid);
 
     public UpdateResult saveOrUpdateTermTreeDtoList(List<TermTreeDto> dtos);
 
 
-    List<TermCollectionDto> getTermTreeDtosByUuids(List<UUID> uuid);
+    List<TermTreeDto> getTermTreeDtosByUuids(List<UUID> uuid);
 
 
 }
index b61615a3eb480d320950d1ee63dbb6a8f06d0b20..83ddfdbc8cfe8c9a151ea06a7c827b19777f633b 100644 (file)
@@ -22,6 +22,7 @@ import eu.etaxonomy.cdm.model.term.TermType;
 import eu.etaxonomy.cdm.model.term.TermVocabulary;
 import eu.etaxonomy.cdm.persistence.dto.TermCollectionDto;
 import eu.etaxonomy.cdm.persistence.dto.TermDto;
+import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
 
@@ -122,7 +123,7 @@ public interface IVocabularyService extends IIdentifiableEntityService<TermVocab
      * @param termType the {@link TermType} of the terms in the vocabulary and of the vocabulary
      * @return a list of term vocabulary DTOs
      */
-    public List<TermCollectionDto> findVocabularyDtoByTermType(TermType termType);
+    public List<TermVocabularyDto> findVocabularyDtoByTermType(TermType termType);
 
     /**
      * Returns term vocabularies that contain terms of the given types {@link TermType} e.g. Feature, Modifier, State.
@@ -130,7 +131,7 @@ public interface IVocabularyService extends IIdentifiableEntityService<TermVocab
      * @param termTypes a set of {@link TermType}s of the terms in the vocabulary and of the vocabulary
      * @return a list of term vocabulary DTOs
      */
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes);
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes);
 
     /**
      * Returns term vocabularies that contain terms of a certain {@link TermType} e.g. Feature, Modifier, State.
@@ -140,7 +141,7 @@ public interface IVocabularyService extends IIdentifiableEntityService<TermVocab
      * will be returned
      * @return a list of term vocabulary DTOs
      */
-    public List<TermCollectionDto> findVocabularyDtoByTermType(TermType termType, boolean includeSubtypes);
+    public List<TermVocabularyDto> findVocabularyDtoByTermType(TermType termType, boolean includeSubtypes);
 
     /**
      * Returns term vocabularies that contain terms of the given types {@link TermType} e.g. Feature, Modifier, State.
@@ -150,7 +151,7 @@ public interface IVocabularyService extends IIdentifiableEntityService<TermVocab
      * will be returned
      * @return a list of term vocabulary DTOs
      */
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, boolean includeSubtypes);
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, boolean includeSubtypes);
 
     /**
      * Creates a new term as a direct child of the given vocabulary.
@@ -192,16 +193,16 @@ public interface IVocabularyService extends IIdentifiableEntityService<TermVocab
      * @param vocUuid
      * @return
      */
-    public List<TermCollectionDto> findVocabularyDtoByVocabularyUuids(List<UUID> vocUuid);
+    public List<TermVocabularyDto> findVocabularyDtoByVocabularyUuids(List<UUID> vocUuid);
 
-    public List<TermCollectionDto> findVocabularyDtoByTermTypeAndPattern(String pattern, TermType termType);
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypeAndPattern(String pattern, TermType termType);
 
     /**
      * @param termTypes
      * @param includeSubtypes
      * @return
      */
-    public List<TermCollectionDto> findFeatureVocabularyDtoByTermTypes(Set<CdmClass> availableFor);
+    public List<TermVocabularyDto> findFeatureVocabularyDtoByTermTypes(Set<CdmClass> availableFor);
 
     /**
      * Returns a list of vocabulary {@link UUID uuids} according to the given filter.
index 673c8ed7a8166c11444698559a09ce72a2234ca5..1b9138f0b9ddfd4370d958a041831910d1e0d2ab 100644 (file)
@@ -35,7 +35,6 @@ import eu.etaxonomy.cdm.persistence.dao.common.Restriction;
 import eu.etaxonomy.cdm.persistence.dao.term.ITermNodeDao;
 import eu.etaxonomy.cdm.persistence.dao.term.ITermTreeDao;
 import eu.etaxonomy.cdm.persistence.dto.MergeResult;
-import eu.etaxonomy.cdm.persistence.dto.TermCollectionDto;
 import eu.etaxonomy.cdm.persistence.dto.TermTreeDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
@@ -198,18 +197,18 @@ public class TermTreeServiceImpl
     }
 
     @Override
-    public List<TermCollectionDto> listTermTreeDtosByTermType(TermType termType) {
+    public List<TermTreeDto> listTermTreeDtosByTermType(TermType termType) {
         return dao.listTermTreeDtosByTermType(termType);
     }
 
     @Override
-    public TermCollectionDto getTermTreeDtoByUuid(UUID uuid) {
+    public TermTreeDto getTermTreeDtoByUuid(UUID uuid) {
         return dao.getTermTreeDtosByUuid(uuid);
     }
 
     @Override
-    public List<TermCollectionDto> getTermTreeDtosByUuids(List<UUID> uuid) {
-        return dao.findVocabularyDtoByUuids(uuid);
+    public List<TermTreeDto> getTermTreeDtosByUuids(List<UUID> uuid) {
+        return dao.findTermTreeDtoByUuids(uuid);
     }
 
 }
index 265629bca2eb7ba36fd86df1bd13cb199ceadaea..491c7ec4e7b085f4d7d07d3609f2f027d08a53c2 100644 (file)
@@ -33,6 +33,7 @@ import eu.etaxonomy.cdm.persistence.dao.term.ITermCollectionDao;
 import eu.etaxonomy.cdm.persistence.dao.term.ITermVocabularyDao;
 import eu.etaxonomy.cdm.persistence.dto.TermCollectionDto;
 import eu.etaxonomy.cdm.persistence.dto.TermDto;
+import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.cdm.persistence.query.OrderHint;
 import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
@@ -183,32 +184,32 @@ public class VocabularyServiceImpl
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermType(TermType termType) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermType(TermType termType) {
         return findVocabularyDtoByTermTypes(Collections.singleton(termType), true);
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermTypeAndPattern(String pattern, TermType termType) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypeAndPattern(String pattern, TermType termType) {
         return dao.findVocabularyDtoByTermTypes(Collections.singleton(termType), pattern, true);
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes) {
         return findVocabularyDtoByTermTypes(termTypes, true);
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermType(TermType termType, boolean includeSubtypes) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermType(TermType termType, boolean includeSubtypes) {
         return findVocabularyDtoByTermTypes(Collections.singleton(termType), includeSubtypes);
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, boolean includeSubtypes) {
+    public List<TermVocabularyDto> findVocabularyDtoByTermTypes(Set<TermType> termTypes, boolean includeSubtypes) {
         return dao.findVocabularyDtoByTermTypes(termTypes, includeSubtypes);
     }
 
     @Override
-    public List<TermCollectionDto> findFeatureVocabularyDtoByTermTypes(Set<CdmClass> availableFor) {
+    public List<TermVocabularyDto> findFeatureVocabularyDtoByTermTypes(Set<CdmClass> availableFor) {
         return dao.findVocabularyDtoByAvailableFor(availableFor);
     }
 
@@ -235,7 +236,7 @@ public class VocabularyServiceImpl
     }
 
     @Override
-    public List<TermCollectionDto> findVocabularyDtoByVocabularyUuids(List<UUID> vocUuids) {
+    public List<TermVocabularyDto> findVocabularyDtoByVocabularyUuids(List<UUID> vocUuids) {
         return dao.findVocabularyDtoByUuids(vocUuids);
     }