Project

General

Profile

Download (1.91 KB) Statistics
| Branch: | Tag: | Revision:
1 78c2bf74 Katja Luther
/**
2
* Copyright (C) 2009 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 3a6c7a0d ben.clark
package eu.etaxonomy.cdm.api.service;
11
12
import java.util.List;
13
14
import org.apache.log4j.Logger;
15 c4e812bc ben.clark
import org.springframework.beans.factory.annotation.Autowired;
16 3a6c7a0d ben.clark
import org.springframework.stereotype.Service;
17
import org.springframework.transaction.annotation.Transactional;
18
19 79c0eaa0 Andreas Müller
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
20 f197a589 Andreas Müller
import eu.etaxonomy.cdm.model.common.TermVocabulary;
21 3a6c7a0d ben.clark
import eu.etaxonomy.cdm.model.occurrence.Collection;
22 f197a589 Andreas Müller
import eu.etaxonomy.cdm.model.taxon.Classification;
23 3a6c7a0d ben.clark
import eu.etaxonomy.cdm.persistence.dao.occurrence.ICollectionDao;
24 f197a589 Andreas Müller
import eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy;
25 3a6c7a0d ben.clark
26
@Service
27
@Transactional(readOnly = true)
28
public class CollectionServiceImpl extends	IdentifiableServiceBase<Collection, ICollectionDao> implements	ICollectionService {
29
	
30
	static private final Logger logger = Logger.getLogger(CollectionServiceImpl.class);
31
32 c4e812bc ben.clark
    @Autowired
33 3a6c7a0d ben.clark
	@Override
34
	protected void setDao(ICollectionDao dao) {
35
		this.dao = dao;
36
	}
37
38 f197a589 Andreas Müller
39
40 b17d9121 Andreas Müller
	/* (non-Javadoc)
41 f197a589 Andreas Müller
	 * @see eu.etaxonomy.cdm.api.service.IIdentifiableEntityService#updateTitleCache(java.lang.Integer, eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy)
42 b17d9121 Andreas Müller
	 */
43
	@Override
44 4116e48b Andreas Müller
	@Transactional(readOnly = false)
45
    public void updateTitleCache(Class<? extends Collection> clazz, Integer stepSize, IIdentifiableEntityCacheStrategy<Collection> cacheStrategy, IProgressMonitor monitor) {
46 f197a589 Andreas Müller
		if (clazz == null){
47
			clazz = Collection.class;
48
		}
49
		super.updateTitleCacheImpl(clazz, stepSize, cacheStrategy, monitor);
50 3a6c7a0d ben.clark
	}
51 f197a589 Andreas Müller
 
52
53 c4e812bc ben.clark
	
54
	public List<Collection> searchByCode(String code) {
55
		return this.dao.getCollectionByCode(code);
56
	}
57 3a6c7a0d ben.clark
}