Implemented generic user & group dao's and ported additional methods for querying...
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / persistence / dao / common / IIdentifiableDao.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.persistence.dao.common;
11
12 import java.util.List;
13
14 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
15 import eu.etaxonomy.cdm.model.common.OriginalSource;
16 import eu.etaxonomy.cdm.model.media.Rights;
17
18 public interface IIdentifiableDao <T extends IdentifiableEntity> extends IAnnotatableDao<T>, ITitledDao<T>{
19
20 /**
21 * Return a count of the sources for this identifiable entity
22 *
23 * @param identifiableEntity The identifiable entity
24 * @return a count of OriginalSource instances
25 */
26 public int countSources(T identifiableEntity);
27
28 /**
29 * Return a List of the sources for this identifiable entity
30 *
31 * @param identifiableEntity The identifiable entity
32 * @param pageSize The maximum number of sources returned (can be null for all sources)
33 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
34 * @return a List of OriginalSource instances
35 */
36 public List<OriginalSource> getSources(T identifiableEntity, Integer pageSize, Integer pageNumber);
37
38 /**
39 * Return a count of the rights for this identifiable entity
40 *
41 * @param identifiableEntity The identifiable entity
42 * @return a count of Rights instances
43 */
44 public int countRights(T identifiableEntity);
45
46 /**
47 * Return a List of the rights for this identifiable entity
48 *
49 * @param identifiableEntity The identifiable entity
50 * @param pageSize The maximum number of rights returned (can be null for all rights)
51 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
52 * @return a List of Rights instances
53 */
54 public List<Rights> getRights(T identifiableEntity, Integer pageSize, Integer pageNumber);
55
56 // TODO Migrated from IOriginalSourceDao
57 public List<T> findOriginalSourceByIdInSource(String idInSource, String idNamespace);
58 }