cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Tue, 2 Nov 2021 17:36:13 +0000 (18:36 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Tue, 2 Nov 2021 17:44:47 +0000 (18:44 +0100)
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/term/DefinedTermDaoImpl.java
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/TermCollectionDto.java
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/VocabularyServiceImpl.java

index 17f4580f1ccda9a2d3a618c9c74dbc75982927c1..14b205be8ddf6a6062564863d8ae5e0d8bf2e189 100644 (file)
@@ -650,7 +650,6 @@ public class DefinedTermDaoImpl
 
     @Override
     public <S extends DefinedTermBase> List<S> list(Class<S> clazz, List<TermVocabulary> vocs, Integer pageNumber, Integer limit, String pattern, MatchMode matchmode){
-        Session session = getSession();
         if (clazz == null){
             clazz = (Class)type;
         }
index 99716df88ade8574dd63fb4bfd80dd651c733b06..58371b7661487e5c8d6c444eb33a13755bdd2093 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**
 * Copyright (C) 2018 EDIT
 * European Distributed Institute of Taxonomy
@@ -21,7 +20,6 @@ import eu.etaxonomy.cdm.model.term.TermType;
 /**
  * @author pplitzner
  * @date 05.11.2018
- *
  */
 public class TermCollectionDto extends AbstractTermDto {
 
@@ -33,7 +31,6 @@ public class TermCollectionDto extends AbstractTermDto {
     private boolean containsDuplicates = false;
     private boolean isOrderRelevant;
     private boolean isFlat;
-    private boolean isAllowModifications = true;
 
     public TermCollectionDto(UUID uuid, Set<Representation> representations, TermType termType, String titleCache, boolean isAllowDuplicate, boolean isOrderRelevant, boolean isFlat) {
         super(uuid, representations, titleCache);
@@ -68,18 +65,9 @@ public class TermCollectionDto extends AbstractTermDto {
         terms.remove(term);
     }
 
-
-
-    /**
-     * @return the isAllowDuplicate
-     */
     public boolean isAllowDuplicate() {
         return isAllowDuplicate;
     }
-
-    /**
-     * @param isAllowDuplicate the isAllowDuplicate to set
-     */
     public void setAllowDuplicate(boolean isAllowDuplicate) {
         this.isAllowDuplicate = isAllowDuplicate;
     }
@@ -97,30 +85,16 @@ public class TermCollectionDto extends AbstractTermDto {
         this.containsDuplicates = containsDuplicates;
     }
 
-    /**
-     * @return the isOrderRelevant
-     */
     public boolean isOrderRelevant() {
         return isOrderRelevant;
     }
-
-    /**
-     * @param isOrderRelevant the isOrderRelevant to set
-     */
     public void setOrderRelevant(boolean isOrderRelevant) {
         this.isOrderRelevant = isOrderRelevant;
     }
 
-    /**
-     * @return the isFlat
-     */
     public boolean isFlat() {
         return isFlat;
     }
-
-    /**
-     * @param isFlat the isFlat to set
-     */
     public void setFlat(boolean isFlat) {
         this.isFlat = isFlat;
     }
@@ -139,13 +113,7 @@ public class TermCollectionDto extends AbstractTermDto {
                 + "a.orderRelevant,"
                 + "a.isFlat "
 
-
                 + "FROM "+fromTable+" as a "
                 + "LEFT JOIN a.representations AS r ";
-
     }
-
-
-
-
-}
+}
\ No newline at end of file
index 095d91b5c3e315d928e6f96c1df8c10169c568b2..4e077885745c61ab5924d5b7f47fa2999f6e27ad 100644 (file)
@@ -6,7 +6,6 @@
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
-
 package eu.etaxonomy.cdm.api.service;
 
 import java.util.ArrayList;
@@ -48,7 +47,6 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase<TermVocabular
                this.dao = dao;
        }
 
-
        @Override
        @Transactional(readOnly = false)
     public UpdateResult updateCaches(Class<? extends TermVocabulary> clazz, Integer stepSize, IIdentifiableEntityCacheStrategy<TermVocabulary> cacheStrategy, IProgressMonitor monitor) {
@@ -58,7 +56,6 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase<TermVocabular
                return super.updateCachesImpl(clazz, stepSize, cacheStrategy, monitor);
        }
 
-
     @Override
     public List<TermVocabulary> listByTermType(TermType termType, boolean includeSubTypes,
             Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths) {
@@ -186,7 +183,7 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase<TermVocabular
     @Transactional(readOnly = false)
     @Override
     public TermDto addNewTerm(TermType termType, UUID vocabularyUUID) {
-        DefinedTermBase term = termType.getEmptyDefinedTermBase();
+        DefinedTermBase<?> term = termType.getEmptyDefinedTermBase();
         termService.save(term);
         TermVocabulary vocabulary = dao.load(vocabularyUUID);
         vocabulary.addTerm(term);
@@ -200,7 +197,6 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase<TermVocabular
         return dao.getUuidAndTitleCache(clazz, termType, limit, pattern);
     }
 
-
     @Override
     public List<TermVocabularyDto> findVocabularyDtoByVocabularyUuids(List<UUID> vocUuids) {
         return dao.findVocabularyDtoByUuids(vocUuids);