(no commit message)
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IdentifiableServiceBase.java
1 /**
2 * Copyright (C) 2007 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 package eu.etaxonomy.cdm.api.service;
11
12 import java.util.List;
13
14 import org.apache.log4j.Logger;
15
16 import eu.etaxonomy.cdm.model.common.CdmBase;
17 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
18 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
19
20 public abstract class IdentifiableServiceBase<T extends IdentifiableEntity> extends ServiceBase<T>
21 implements IIdentifiableEntityService<T>{
22 static Logger logger = Logger.getLogger(IdentifiableServiceBase.class);
23 // protected IIdentifiableDao<T> dao;
24 //
25 // protected void setEntityDao(IIdentifiableDao<T> dao){
26 // this.dao=dao;
27 // }
28
29 protected List<T> findCdmObjectsByTitle(String title){
30 return ((IIdentifiableDao)dao).findByTitle(title);
31 }
32
33 protected List<T> findCdmObjectsByTitle(String title, CdmBase sessionObject){
34 return ((IIdentifiableDao)dao).findByTitle(title, sessionObject);
35 }
36 }