Project

General

Profile

Revision 549e8cc5

ID549e8cc54ef0e1d0c12904df0fb06b0336d55b24
Parent 2d6c8502
Child 98b0b483

Added by Andreas Müller 12 months ago

ref #6794 rename IFeatureTreeDao in ITermTreeDao

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/description/IFeatureTreeDao.java
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

  
10
package eu.etaxonomy.cdm.persistence.dao.description;
11

  
12
import java.util.List;
13
import java.util.UUID;
14

  
15
import eu.etaxonomy.cdm.model.term.TermTree;
16
import eu.etaxonomy.cdm.model.term.TermNode;
17
import eu.etaxonomy.cdm.model.term.TermType;
18
import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
19
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
20

  
21
/**
22
 * @author a.mueller
23
 * @since 10.07.2008
24
 */
25
public interface IFeatureTreeDao extends IIdentifiableDao<TermTree> {
26

  
27
    public List<TermTree> list();
28

  
29
    public UUID DefaultFeatureTreeUuid = UUID.fromString("ac8d4e58-926d-4f81-ac77-cebdd295df7c");
30

  
31
    /**
32
     * Loads nodes and the nodes child nodes recursively
33
     * @param nodes
34
     * @param nodePaths
35
     */
36
    public void deepLoadNodes(List<TermNode> nodes, List<String> nodePaths);
37

  
38
    public <S extends TermTree> List<UuidAndTitleCache<S>> getUuidAndTitleCacheByTermType(Class<S> clazz, TermType termType, Integer limit,
39
            String pattern);
40
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/description/ITermTreeDao.java
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

  
10
package eu.etaxonomy.cdm.persistence.dao.description;
11

  
12
import java.util.List;
13
import java.util.UUID;
14

  
15
import eu.etaxonomy.cdm.model.term.TermTree;
16
import eu.etaxonomy.cdm.model.term.TermNode;
17
import eu.etaxonomy.cdm.model.term.TermType;
18
import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
19
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
20

  
21
/**
22
 * @author a.mueller
23
 * @since 10.07.2008
24
 */
25
public interface ITermTreeDao extends IIdentifiableDao<TermTree> {
26

  
27
    public List<TermTree> list();
28

  
29
    public UUID DefaultFeatureTreeUuid = UUID.fromString("ac8d4e58-926d-4f81-ac77-cebdd295df7c");
30

  
31
    /**
32
     * Loads nodes and the nodes child nodes recursively
33
     * @param nodes
34
     * @param nodePaths
35
     */
36
    public void deepLoadNodes(List<TermNode> nodes, List<String> nodePaths);
37

  
38
    public <S extends TermTree> List<UuidAndTitleCache<S>> getUuidAndTitleCacheByTermType(Class<S> clazz, TermType termType, Integer limit,
39
            String pattern);
40
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/description/TermTreeDaoImpl.java
26 26
import eu.etaxonomy.cdm.model.term.TermType;
27 27
import eu.etaxonomy.cdm.model.term.TermVocabulary;
28 28
import eu.etaxonomy.cdm.model.term.VocabularyEnum;
29
import eu.etaxonomy.cdm.persistence.dao.description.IFeatureTreeDao;
29
import eu.etaxonomy.cdm.persistence.dao.description.ITermTreeDao;
30 30
import eu.etaxonomy.cdm.persistence.dao.hibernate.common.IdentifiableDaoBase;
31 31
import eu.etaxonomy.cdm.persistence.dao.term.ITermVocabularyDao;
32 32
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
......
36 36
 * @since 10.07.2008
37 37
 */
38 38
@Repository
39
public class TermTreeDaoImpl extends IdentifiableDaoBase<TermTree> implements IFeatureTreeDao{
39
public class TermTreeDaoImpl extends IdentifiableDaoBase<TermTree> implements ITermTreeDao{
40 40

  
41 41
    @SuppressWarnings("unused")
42 42
    private static final Logger logger = Logger.getLogger(TermTreeDaoImpl.class);
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptionServiceImpl.java
60 60
import eu.etaxonomy.cdm.persistence.dao.description.IDescriptionDao;
61 61
import eu.etaxonomy.cdm.persistence.dao.description.IDescriptionElementDao;
62 62
import eu.etaxonomy.cdm.persistence.dao.description.IDescriptiveDataSetDao;
63
import eu.etaxonomy.cdm.persistence.dao.description.IFeatureTreeDao;
63
import eu.etaxonomy.cdm.persistence.dao.description.ITermTreeDao;
64 64
import eu.etaxonomy.cdm.persistence.dao.description.IStatisticalMeasurementValueDao;
65 65
import eu.etaxonomy.cdm.persistence.dao.description.ITermNodeDao;
66 66
import eu.etaxonomy.cdm.persistence.dao.name.ITaxonNameDao;
......
90 90
    private static final Logger logger = Logger.getLogger(DescriptionServiceImpl.class);
91 91

  
92 92
    protected IDescriptionElementDao descriptionElementDao;
93
    protected IFeatureTreeDao featureTreeDao;
93
    protected ITermTreeDao featureTreeDao;
94 94
    protected IDescriptiveDataSetDao descriptiveDataSetDao;
95 95
    protected ITermNodeDao termNodeDao;
96 96
    protected ITermVocabularyDao vocabularyDao;
......
109 109
    private NaturalLanguageGenerator naturalLanguageGenerator;
110 110

  
111 111
    @Autowired
112
    protected void setFeatureTreeDao(IFeatureTreeDao featureTreeDao) {
112
    protected void setFeatureTreeDao(ITermTreeDao featureTreeDao) {
113 113
        this.featureTreeDao = featureTreeDao;
114 114
    }
115 115

  
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/FeatureTreeServiceImpl.java
28 28
import eu.etaxonomy.cdm.model.term.TermNode;
29 29
import eu.etaxonomy.cdm.model.term.TermTree;
30 30
import eu.etaxonomy.cdm.model.term.TermType;
31
import eu.etaxonomy.cdm.persistence.dao.description.IFeatureTreeDao;
31
import eu.etaxonomy.cdm.persistence.dao.description.ITermTreeDao;
32 32
import eu.etaxonomy.cdm.persistence.dao.description.ITermNodeDao;
33 33
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
34 34
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
35 35

  
36 36
@Service
37 37
@Transactional(readOnly = false)
38
public class FeatureTreeServiceImpl extends IdentifiableServiceBase<TermTree, IFeatureTreeDao> implements IFeatureTreeService {
38
public class FeatureTreeServiceImpl extends IdentifiableServiceBase<TermTree, ITermTreeDao> implements IFeatureTreeService {
39 39

  
40 40
    private ITermNodeDao termNodeDao;
41 41

  
......
44 44

  
45 45
    @Override
46 46
    @Autowired
47
    protected void setDao(IFeatureTreeDao dao) {
47
    protected void setDao(ITermTreeDao dao) {
48 48
        this.dao = dao;
49 49
    }
50 50

  
......
122 122

  
123 123
    @Override
124 124
    public TermTree createTransientDefaultFeatureTree() {
125
        return load(IFeatureTreeDao.DefaultFeatureTreeUuid);
125
        return load(ITermTreeDao.DefaultFeatureTreeUuid);
126 126
    }
127 127

  
128 128
    @Override
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TermTreeServiceImpl.java
29 29
import eu.etaxonomy.cdm.model.term.TermNode;
30 30
import eu.etaxonomy.cdm.model.term.TermTree;
31 31
import eu.etaxonomy.cdm.model.term.TermType;
32
import eu.etaxonomy.cdm.persistence.dao.description.IFeatureTreeDao;
33 32
import eu.etaxonomy.cdm.persistence.dao.description.ITermNodeDao;
33
import eu.etaxonomy.cdm.persistence.dao.description.ITermTreeDao;
34 34
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
35 35
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
36 36

  
37 37
@Service
38 38
@Transactional(readOnly = false)
39 39
public class TermTreeServiceImpl
40
            extends IdentifiableServiceBase<TermTree, IFeatureTreeDao>
40
            extends IdentifiableServiceBase<TermTree, ITermTreeDao>
41 41
            implements ITermTreeService {
42 42

  
43 43
    private ITermNodeDao termNodeDao;
......
47 47

  
48 48
    @Override
49 49
    @Autowired
50
    protected void setDao(IFeatureTreeDao dao) {
50
    protected void setDao(ITermTreeDao dao) {
51 51
        this.dao = dao;
52 52
    }
53 53

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)