Project

General

Profile

« Previous | Next » 

Revision f8b73f93

Added by Andreas Müller over 2 years ago

cleanup

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/term/DefinedTermDaoImpl.java
650 650

  
651 651
    @Override
652 652
    public <S extends DefinedTermBase> List<S> list(Class<S> clazz, List<TermVocabulary> vocs, Integer pageNumber, Integer limit, String pattern, MatchMode matchmode){
653
        Session session = getSession();
654 653
        if (clazz == null){
655 654
            clazz = (Class)type;
656 655
        }
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/TermCollectionDto.java
1
// $Id$
2 1
/**
3 2
* Copyright (C) 2018 EDIT
4 3
* European Distributed Institute of Taxonomy
......
21 20
/**
22 21
 * @author pplitzner
23 22
 * @date 05.11.2018
24
 *
25 23
 */
26 24
public class TermCollectionDto extends AbstractTermDto {
27 25

  
......
33 31
    private boolean containsDuplicates = false;
34 32
    private boolean isOrderRelevant;
35 33
    private boolean isFlat;
36
    private boolean isAllowModifications = true;
37 34

  
38 35
    public TermCollectionDto(UUID uuid, Set<Representation> representations, TermType termType, String titleCache, boolean isAllowDuplicate, boolean isOrderRelevant, boolean isFlat) {
39 36
        super(uuid, representations, titleCache);
......
68 65
        terms.remove(term);
69 66
    }
70 67

  
71

  
72

  
73
    /**
74
     * @return the isAllowDuplicate
75
     */
76 68
    public boolean isAllowDuplicate() {
77 69
        return isAllowDuplicate;
78 70
    }
79

  
80
    /**
81
     * @param isAllowDuplicate the isAllowDuplicate to set
82
     */
83 71
    public void setAllowDuplicate(boolean isAllowDuplicate) {
84 72
        this.isAllowDuplicate = isAllowDuplicate;
85 73
    }
......
97 85
        this.containsDuplicates = containsDuplicates;
98 86
    }
99 87

  
100
    /**
101
     * @return the isOrderRelevant
102
     */
103 88
    public boolean isOrderRelevant() {
104 89
        return isOrderRelevant;
105 90
    }
106

  
107
    /**
108
     * @param isOrderRelevant the isOrderRelevant to set
109
     */
110 91
    public void setOrderRelevant(boolean isOrderRelevant) {
111 92
        this.isOrderRelevant = isOrderRelevant;
112 93
    }
113 94

  
114
    /**
115
     * @return the isFlat
116
     */
117 95
    public boolean isFlat() {
118 96
        return isFlat;
119 97
    }
120

  
121
    /**
122
     * @param isFlat the isFlat to set
123
     */
124 98
    public void setFlat(boolean isFlat) {
125 99
        this.isFlat = isFlat;
126 100
    }
......
139 113
                + "a.orderRelevant,"
140 114
                + "a.isFlat "
141 115

  
142

  
143 116
                + "FROM "+fromTable+" as a "
144 117
                + "LEFT JOIN a.representations AS r ";
145

  
146 118
    }
147

  
148

  
149

  
150

  
151
}
119
}
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/VocabularyServiceImpl.java
6 6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
* See LICENSE.TXT at the top of this package for the full license terms.
8 8
*/
9

  
10 9
package eu.etaxonomy.cdm.api.service;
11 10

  
12 11
import java.util.ArrayList;
......
48 47
		this.dao = dao;
49 48
	}
50 49

  
51

  
52 50
	@Override
53 51
	@Transactional(readOnly = false)
54 52
    public UpdateResult updateCaches(Class<? extends TermVocabulary> clazz, Integer stepSize, IIdentifiableEntityCacheStrategy<TermVocabulary> cacheStrategy, IProgressMonitor monitor) {
......
58 56
		return super.updateCachesImpl(clazz, stepSize, cacheStrategy, monitor);
59 57
	}
60 58

  
61

  
62 59
    @Override
63 60
    public List<TermVocabulary> listByTermType(TermType termType, boolean includeSubTypes,
64 61
            Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths) {
......
186 183
    @Transactional(readOnly = false)
187 184
    @Override
188 185
    public TermDto addNewTerm(TermType termType, UUID vocabularyUUID) {
189
        DefinedTermBase term = termType.getEmptyDefinedTermBase();
186
        DefinedTermBase<?> term = termType.getEmptyDefinedTermBase();
190 187
        termService.save(term);
191 188
        TermVocabulary vocabulary = dao.load(vocabularyUUID);
192 189
        vocabulary.addTerm(term);
......
200 197
        return dao.getUuidAndTitleCache(clazz, termType, limit, pattern);
201 198
    }
202 199

  
203

  
204 200
    @Override
205 201
    public List<TermVocabularyDto> findVocabularyDtoByVocabularyUuids(List<UUID> vocUuids) {
206 202
        return dao.findVocabularyDtoByUuids(vocUuids);

Also available in: Unified diff