merge trunk to hibernate4
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / persistence / dao / reference / IReferenceDao.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 package eu.etaxonomy.cdm.persistence.dao.reference;
10
11 import java.util.List;
12
13 import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
14 import eu.etaxonomy.cdm.model.reference.Reference;
15 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
16 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
17 import eu.etaxonomy.cdm.persistence.dao.common.ITitledDao;
18 import eu.etaxonomy.cdm.persistence.query.OrderHint;
19
20 /**
21 * @author a.mueller
22 *
23 */
24 public interface IReferenceDao extends IIdentifiableDao<Reference>, ITitledDao<Reference> {
25
26 public List<UuidAndTitleCache<Reference>> getUuidAndTitle();
27
28 /**
29 * TODO candidate for harmonization: rename to listAllReferencesForPublishing
30 * @return all references marked with publish-flag
31 */
32 public List<Reference> getAllReferencesForPublishing();
33
34 /**
35 * TODO candidate for harmonization: rename to listAllNotNomenclaturalReferencesForPublishing
36 * @return all references not used as nomenclatural reference with publish flag
37 */
38 public List<Reference> getAllNotNomenclaturalReferencesForPublishing();
39
40 /**
41 * TODO candidate for harmonization: rename to listNomenclaturalReferences
42 * @return
43 */
44 public List<Reference> getAllNomenclaturalReferences();
45
46 /**
47 * recursively finds all references where the <code>referenceBase</code> given as parameter
48 * is the {@link Reference.getInReference inReference}.
49 * @param reference
50 * @return
51 */
52 public List<Reference> getSubordinateReferences(Reference reference);
53
54 /**
55 * searches for taxa using the following relations:
56 * <ul>
57 * <li>taxon.name.nomenclaturalreference</li>
58 * <li>taxon.descriptions.descriptionElement.sources.citation</li>
59 * <li>taxon.descriptions.descriptionSources</li>
60 * <li>taxon.name.descriptions.descriptionElement.sources</li>
61 * <li>taxon.name.descriptions.descriptionSources</li>
62 * </ul>
63 *
64 * @param reference
65 * @param orderHints TODO
66 * @param propertyPaths TODO
67 * @return
68 */
69 public List<TaxonBase> listCoveredTaxa(Reference reference, boolean includeSubordinateReferences, List<OrderHint> orderHints, List<String> propertyPaths);
70
71 }