Project

General

Profile

Revision d10ceac8

IDd10ceac8055ffe6f14929f2fe30d53a47276ca4f
Parent 62779ba1
Child c5564cac

Added by Andreas Müller over 1 year ago

ref #6794 delete FeatureDao

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/description/IFeatureDao.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

  
14
import eu.etaxonomy.cdm.model.description.Feature;
15
import eu.etaxonomy.cdm.persistence.dao.common.ICdmEntityDao;
16

  
17
public interface IFeatureDao extends ICdmEntityDao<Feature> {
18
	public List<Feature> list();
19
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/description/FeatureDaoImpl.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.hibernate.description;
11

  
12
import java.util.List;
13

  
14
import org.apache.log4j.Logger;
15
import org.hibernate.Criteria;
16
import org.springframework.stereotype.Repository;
17

  
18
import eu.etaxonomy.cdm.model.description.Feature;
19
import eu.etaxonomy.cdm.persistence.dao.description.IFeatureDao;
20
import eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase;
21

  
22

  
23
@Repository
24
public class FeatureDaoImpl extends CdmEntityDaoBase<Feature> implements IFeatureDao{
25
	@SuppressWarnings("unused")
26
	private static final Logger logger = Logger.getLogger(FeatureDaoImpl.class);
27

  
28
	public FeatureDaoImpl() {
29
		super(Feature.class);
30
	}
31

  
32
	@Override
33
    public List<Feature> list() {
34
		Criteria crit = getSession().createCriteria(type);
35
		@SuppressWarnings("unchecked")
36
	    List<Feature> result = crit.list();
37
		return result;
38
	}
39
}
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.IFeatureDao;
64
import eu.etaxonomy.cdm.persistence.dao.description.ITermNodeDao;
65 63
import eu.etaxonomy.cdm.persistence.dao.description.IFeatureTreeDao;
66 64
import eu.etaxonomy.cdm.persistence.dao.description.IStatisticalMeasurementValueDao;
65
import eu.etaxonomy.cdm.persistence.dao.description.ITermNodeDao;
67 66
import eu.etaxonomy.cdm.persistence.dao.name.ITaxonNameDao;
68 67
import eu.etaxonomy.cdm.persistence.dao.occurrence.IOccurrenceDao;
69 68
import eu.etaxonomy.cdm.persistence.dao.taxon.ITaxonDao;
......
94 93
    protected IFeatureTreeDao featureTreeDao;
95 94
    protected IDescriptiveDataSetDao descriptiveDataSetDao;
96 95
    protected ITermNodeDao termNodeDao;
97
    protected IFeatureDao featureDao;
98 96
    protected ITermVocabularyDao vocabularyDao;
99 97
    protected IDefinedTermDao definedTermDao;
100 98
    protected IStatisticalMeasurementValueDao statisticalMeasurementValueDao;
......
121 119
    }
122 120

  
123 121
    @Autowired
124
    protected void setFeatureNodeDao(ITermNodeDao featureNodeDao) {
122
    protected void setTermNodeDao(ITermNodeDao featureNodeDao) {
125 123
        this.termNodeDao = featureNodeDao;
126 124
    }
127 125

  
128 126
    @Autowired
129
    protected void setFeatureDao(IFeatureDao featureDao) {
130
        this.featureDao = featureDao;
131
    }
132

  
133
    @Autowired
134 127
    protected void setVocabularyDao(ITermVocabularyDao vocabularyDao) {
135 128
        this.vocabularyDao = vocabularyDao;
136 129
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)