2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.util
.List
;
14 import org
.apache
.logging
.log4j
.LogManager
;import org
.apache
.logging
.log4j
.Logger
;
15 import org
.springframework
.beans
.factory
.annotation
.Autowired
;
16 import org
.springframework
.stereotype
.Service
;
17 import org
.springframework
.transaction
.annotation
.Transactional
;
19 import eu
.etaxonomy
.cdm
.common
.monitor
.IProgressMonitor
;
20 import eu
.etaxonomy
.cdm
.model
.occurrence
.Collection
;
21 import eu
.etaxonomy
.cdm
.persistence
.dao
.occurrence
.ICollectionDao
;
22 import eu
.etaxonomy
.cdm
.strategy
.cache
.common
.IIdentifiableEntityCacheStrategy
;
25 @Transactional(readOnly
= true)
26 public class CollectionServiceImpl
27 extends IdentifiableServiceBase
<Collection
, ICollectionDao
>
28 implements ICollectionService
{
30 @SuppressWarnings("unused")
31 static private final Logger logger
= LogManager
.getLogger(CollectionServiceImpl
.class);
35 protected void setDao(ICollectionDao dao
) {
41 @Transactional(readOnly
= false)
42 public UpdateResult
updateCaches(Class
<?
extends Collection
> clazz
, Integer stepSize
, IIdentifiableEntityCacheStrategy
<Collection
> cacheStrategy
, IProgressMonitor monitor
) {
44 clazz
= Collection
.class;
46 return super.updateCachesImpl(clazz
, stepSize
, cacheStrategy
, monitor
);
51 public List
<Collection
> searchByCode(String code
) {
52 return this.dao
.getCollectionByCode(code
);