3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.cdm
.api
.service
;
13 import java
.util
.List
;
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
;
21 import eu
.etaxonomy
.cdm
.common
.monitor
.IProgressMonitor
;
22 import eu
.etaxonomy
.cdm
.model
.common
.UuidAndTitleCache
;
23 import eu
.etaxonomy
.cdm
.model
.description
.PolytomousKey
;
24 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
25 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
26 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
27 import eu
.etaxonomy
.cdm
.persistence
.dao
.reference
.IReferenceDao
;
28 import eu
.etaxonomy
.cdm
.strategy
.cache
.common
.IIdentifiableEntityCacheStrategy
;
32 @Transactional(propagation
= Propagation
.SUPPORTS
, readOnly
= true)
33 public class ReferenceServiceImpl
extends IdentifiableServiceBase
<Reference
,IReferenceDao
> implements IReferenceService
{
35 static Logger logger
= Logger
.getLogger(ReferenceServiceImpl
.class);
40 public ReferenceServiceImpl(){
41 if (logger
.isDebugEnabled()) { logger
.debug("Load ReferenceService Bean"); }
45 * @see eu.etaxonomy.cdm.api.service.IIdentifiableEntityService#updateTitleCache(java.lang.Integer, eu.etaxonomy.cdm.strategy.cache.common.IIdentifiableEntityCacheStrategy)
48 @Transactional(readOnly
= false)
49 public void updateTitleCache(Class
<?
extends Reference
> clazz
, Integer stepSize
, IIdentifiableEntityCacheStrategy
<Reference
> cacheStrategy
, IProgressMonitor monitor
) {
51 clazz
= Reference
.class;
53 super.updateTitleCacheImpl(clazz
, stepSize
, cacheStrategy
, monitor
);
58 protected void setDao(IReferenceDao dao
) {
62 public List
<UuidAndTitleCache
<Reference
>> getUuidAndTitle() {
64 return dao
.getUuidAndTitle();
67 public List
<Reference
> getAllReferencesForPublishing(){
68 return dao
.getAllNotNomenclaturalReferencesForPublishing();
71 public List
<Reference
> getAllNomenclaturalReferences() {
73 return dao
.getAllNomenclaturalReferences();
77 public List
<TaxonBase
> listCoveredTaxa(Reference reference
, boolean includeSubordinateReferences
, List
<String
> propertyPaths
) {
79 List
<TaxonBase
> taxonList
= dao
.listCoveredTaxa(reference
, includeSubordinateReferences
, propertyPaths
);