Project

General

Profile

Download (1.91 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.cdm.api.service;
12

    
13
import java.util.List;
14

    
15
import org.apache.log4j.Logger;
16
import org.springframework.beans.factory.annotation.Autowired;
17
import org.springframework.stereotype.Service;
18
import org.springframework.transaction.annotation.Propagation;
19
import org.springframework.transaction.annotation.Transactional;
20

    
21
import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
22
import eu.etaxonomy.cdm.model.reference.ReferenceBase;
23
import eu.etaxonomy.cdm.persistence.dao.reference.IReferenceDao;
24

    
25

    
26
@Service
27
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
28
public class ReferenceServiceImpl extends IdentifiableServiceBase<ReferenceBase,IReferenceDao> implements IReferenceService {
29
	
30
	static Logger logger = Logger.getLogger(ReferenceServiceImpl.class);
31

    
32
	/**
33
	 * Constructor
34
	 */
35
	public ReferenceServiceImpl(){
36
		if (logger.isDebugEnabled()) { logger.debug("Load ReferenceService Bean"); }
37
	}
38

    
39
	/* (non-Javadoc)
40
	 * @see eu.etaxonomy.cdm.api.service.IIdentifiableEntityService#updateTitleCache()
41
	 */
42
	@Override
43
	public void updateTitleCache() {
44
		Class<ReferenceBase> clazz = ReferenceBase.class;
45
		super.updateTitleCache(clazz, null, null);
46
	}
47

    
48
	@Autowired
49
	protected void setDao(IReferenceDao dao) {
50
		this.dao = dao;
51
	}
52

    
53
	public List<UuidAndTitleCache<ReferenceBase>> getUuidAndTitle() {
54
		
55
		return dao.getUuidAndTitle();
56
	}
57
	
58
	public List<ReferenceBase> getAllReferencesForPublishing(){
59
		return dao.getAllNotNomenclaturalReferencesForPublishing();
60
	}
61

    
62
	public List<ReferenceBase> getAllNomenclaturalReferences() {
63
		
64
		return dao.getAllNomenclaturalReferences();
65
	}
66

    
67
}
(56-56/67)