Merge branch 'develop' of ssh://dev.e-taxonomy.eu/var/git/cdmlib into develop
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / RightsServiceImpl.java
1 /**
2 * Copyright (C) 2017 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 package eu.etaxonomy.cdm.api.service;
10
11 import java.util.List;
12
13 import org.apache.log4j.Logger;
14 import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.stereotype.Service;
16 import org.springframework.transaction.annotation.Transactional;
17
18 import eu.etaxonomy.cdm.model.media.Rights;
19 import eu.etaxonomy.cdm.persistence.dao.common.IRightsDao;
20 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
21
22 /**
23 * @author k.luther
24 * @since 15.02.2017
25 *
26 */
27 @Service
28 @Transactional(readOnly = true)
29 public class RightsServiceImpl extends AnnotatableServiceBase<Rights, IRightsDao> implements IRightsService {
30 private static final Logger logger = Logger.getLogger(RightsServiceImpl.class);
31 /**
32 * {@inheritDoc}
33 */
34 @Override
35 @Autowired
36 protected void setDao(IRightsDao dao) {
37 this.dao = dao;
38 }
39
40 /**
41 * Constructor
42 */
43 public RightsServiceImpl(){
44 if (logger.isDebugEnabled()) { logger.debug("Load RightsService Bean"); }
45 }
46
47 @Override
48 public List<UuidAndTitleCache<Rights>> getUuidAndLabelText(Integer limit, String pattern){
49 return dao.getUuidAndTitleCache(limit, pattern);
50 }
51
52
53
54
55 }