ref #8034: filter last selected references by inReference type
[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 import java.util.Set;
13 import java.util.UUID;
14
15 import eu.etaxonomy.cdm.model.reference.Reference;
16 import eu.etaxonomy.cdm.model.reference.ReferenceType;
17 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
18 import eu.etaxonomy.cdm.model.term.DefinedTermBase;
19 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
20 import eu.etaxonomy.cdm.persistence.dao.common.ITitledDao;
21 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
22 import eu.etaxonomy.cdm.persistence.query.MatchMode;
23 import eu.etaxonomy.cdm.persistence.query.OrderHint;
24
25 /**
26 * @author a.mueller
27 *
28 */
29 public interface IReferenceDao extends IIdentifiableDao<Reference>, ITitledDao<Reference> {
30
31 public List<UuidAndTitleCache<Reference>> getUuidAndTitle();
32
33 /**
34 * TODO candidate for harmonization: rename to listAllReferencesForPublishing
35 * @return all references marked with publish-flag
36 */
37 public List<Reference> getAllReferencesForPublishing();
38
39 /**
40 * TODO candidate for harmonization: rename to listAllNotNomenclaturalReferencesForPublishing
41 * @return all references not used as nomenclatural reference with publish flag
42 */
43 public List<Reference> getAllNotNomenclaturalReferencesForPublishing();
44
45 /**
46 * TODO candidate for harmonization: rename to listNomenclaturalReferences
47 * @return
48 */
49 public List<Reference> getAllNomenclaturalReferences();
50
51 /**
52 * recursively finds all references where the <code>referenceBase</code> given as parameter
53 * is the {@link Reference.getInReference inReference}.
54 * @param reference
55 * @return
56 */
57 public List<Reference> getSubordinateReferences(Reference reference);
58
59 /**
60 * searches for taxa using the following relations:
61 * <ul>
62 * <li>taxon.name.nomenclaturalreference</li>
63 * <li>taxon.descriptions.descriptionElement.sources.citation</li>
64 * <li>taxon.descriptions.descriptionSources</li>
65 * <li>taxon.name.descriptions.descriptionElement.sources</li>
66 * <li>taxon.name.descriptions.descriptionSources</li>
67 * </ul>
68 *
69 * @param reference
70 * @param orderHints TODO
71 * @param propertyPaths TODO
72 * @return
73 */
74 public List<TaxonBase> listCoveredTaxa(Reference reference, boolean includeSubordinateReferences, List<OrderHint> orderHints, List<String> propertyPaths);
75
76 /**
77 * @param limit
78 * @param pattern
79 * @param refType
80 * @return
81 */
82 List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCache(Integer limit, String pattern, ReferenceType refType);
83
84 /**
85 * @param limit
86 * @param pattern
87 * @param refType
88 * @return
89 */
90 List<UuidAndTitleCache<Reference>> getUuidAndTitleCache(Integer limit, String pattern, ReferenceType refType);
91
92 /**
93 * @param identifier
94 * @param identifierType
95 * @param matchmode
96 * @param limit
97 * @return
98 */
99 List<Object[]> findByIdentifierAbbrev(String identifier, DefinedTermBase identifierType, MatchMode matchmode,
100 Integer limit);
101
102 /**
103 * @param limit
104 * @param pattern
105 * @param refType
106 * @return
107 */
108 List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCacheForAuthor(Integer limit, String pattern,
109 ReferenceType refType);
110
111 /**
112 * @param uuids
113 * @return
114 */
115 List<UuidAndTitleCache<Reference>> getUuidAndTitle(Set<UUID> uuids);
116
117 /**
118 * @param uuids
119 * @param refType
120 * @return
121 */
122 List<UuidAndTitleCache<Reference>> getUuidAndTitle(Set<UUID> uuids, ReferenceType refType);
123
124
125 }