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
;
21 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
22 import eu
.etaxonomy
.cdm
.model
.common
.Enumeration
;
25 * an data access interface that all data access classes implement
28 * @created 02-Nov-2007 19:36:10
30 public interface IDao
<T
extends CdmBase
> {
31 public String
saveOrUpdate(T transientObject
) throws DataAccessException
;
34 * @see eu.etaxonomy.cdm.persistence.dao.IDAO#save(java.lang.Object)
36 public String
save(T newOrManagedObject
) throws DataAccessException
;
39 * @see eu.etaxonomy.cdm.persistence.dao.IDAO#update(java.lang.Object)
41 public String
update(T transientObject
) throws DataAccessException
;
44 * @see eu.etaxonomy.cdm.persistence.dao.IDAO#delete(java.lang.Object)
46 public String
delete(T persistentObject
) throws DataAccessException
;
49 * @see eu.etaxonomy.cdm.persistence.dao.IDAO#findById(java.io.Serializable)
51 public T
findById(int id
) throws DataAccessException
;
53 public T
findByUuid(String Uuid
) throws DataAccessException
;
55 public Boolean
exists(String uuid
);
57 public List
<T
> find(String queryString
);
59 public List
<CdmBase
> executeHsql(String hsql
);
61 public List
<T
> list(int limit
, int start
);