2 * Copyright (C) 2007 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
.persistence
.dao
;
13 import java
.io
.Serializable
;
14 import java
.util
.List
;
16 import org
.apache
.log4j
.Logger
;
17 import org
.springframework
.dao
.DataAccessException
;
18 import org
.springframework
.orm
.hibernate3
.HibernateTemplate
;
20 import eu
.etaxonomy
.cdm
.model
.Description
;
21 import eu
.etaxonomy
.cdm
.model
.common
.Enumeration
;
24 * an data access interface that all data access classes implement
27 * @created 02-Nov-2007 19:36:10
29 public interface IDao
<T
, ID
extends Serializable
> {
30 public void saveOrUpdate(T transientObject
) throws DataAccessException
;
33 * @see eu.etaxonomy.cdm.persistence.dao.IDAO#save(java.lang.Object)
35 public Serializable
save(T newInstance
) throws DataAccessException
;
38 * @see eu.etaxonomy.cdm.persistence.dao.IDAO#update(java.lang.Object)
40 public void update(T transientObject
) throws DataAccessException
;
43 * @see eu.etaxonomy.cdm.persistence.dao.IDAO#delete(java.lang.Object)
45 public void delete(T persistentObject
) throws DataAccessException
;
48 * @see eu.etaxonomy.cdm.persistence.dao.IDAO#findById(java.io.Serializable)
50 public T
findById(ID id
) throws DataAccessException
;
52 //********************************************//
55 public List
<T
> find(String queryString
);
57 public Boolean
exists(ID id
);
59 public List
<T
> list(Integer limit
);