ref #10222 add supplemental data (cont.) + change labels for TaxonBaseDto
[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 org.hibernate.criterion.Criterion;
16
17 import eu.etaxonomy.cdm.model.reference.Reference;
18 import eu.etaxonomy.cdm.model.reference.ReferenceType;
19 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
20 import eu.etaxonomy.cdm.model.term.DefinedTermBase;
21 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
22 import eu.etaxonomy.cdm.persistence.dao.common.ITitledDao;
23 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
24 import eu.etaxonomy.cdm.persistence.query.MatchMode;
25 import eu.etaxonomy.cdm.persistence.query.OrderHint;
26
27 /**
28 * @author a.mueller
29 */
30 public interface IReferenceDao extends IIdentifiableDao<Reference>, ITitledDao<Reference> {
31
32 public List<UuidAndTitleCache<Reference>> getUuidAndTitle();
33
34 /**
35 * TODO candidate for harmonization: rename to listAllReferencesForPublishing
36 * @return all references marked with publish-flag
37 */
38 public List<Reference> getAllReferencesForPublishing();
39
40 /**
41 * TODO candidate for harmonization: rename to listAllNotNomenclaturalReferencesForPublishing
42 * @return all references not used as nomenclatural reference with publish flag
43 */
44 public List<Reference> getAllNotNomenclaturalReferencesForPublishing();
45
46 /**
47 * TODO candidate for harmonization: rename to listNomenclaturalReferences
48 * @return
49 */
50 public List<Reference> getAllNomenclaturalReferences();
51
52 /**
53 * recursively finds all references where the <code>referenceBase</code> given as parameter
54 * is the {@link Reference.getInReference inReference}.
55 * @param reference
56 * @return
57 */
58 public List<Reference> getSubordinateReferences(Reference reference);
59
60 /**
61 * searches for taxa using the following relations:
62 * <ul>
63 * <li>taxon.name.nomenclaturalSource.citation</li>
64 * <li>taxon.descriptions.descriptionElement.sources.citation</li>
65 * <li>taxon.descriptions.descriptionSources</li>
66 * <li>taxon.name.descriptions.descriptionElement.sources</li>
67 * <li>taxon.name.descriptions.descriptionSources</li>
68 * </ul>
69 *
70 * @param reference
71 * @param orderHints TODO
72 * @param propertyPaths TODO
73 * @return
74 */
75 public List<TaxonBase> listCoveredTaxa(Reference reference, boolean includeSubordinateReferences, List<OrderHint> orderHints, List<String> propertyPaths);
76
77 /**
78 * @param limit
79 * @param pattern
80 * @param refType
81 * @return
82 */
83 List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCache(Integer limit, String pattern, ReferenceType refType);
84
85 /**
86 * @param limit
87 * @param pattern
88 * @param refType
89 * @return
90 */
91 List<UuidAndTitleCache<Reference>> getUuidAndTitleCache(Integer limit, String pattern, ReferenceType refType);
92
93 /**
94 * @param identifier
95 * @param identifierType
96 * @param matchmode
97 * @param limit
98 * @return
99 */
100 List<Object[]> findByIdentifierAbbrev(String identifier, DefinedTermBase identifierType, MatchMode matchmode,
101 Integer limit);
102
103 /**
104 * @param limit
105 * @param pattern
106 * @param refType
107 * @return
108 */
109 List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCacheForAuthor(Integer limit, String pattern,
110 ReferenceType refType);
111
112 /**
113 * @param uuids
114 * @return
115 */
116 List<UuidAndTitleCache<Reference>> getUuidAndTitle(Set<UUID> uuids);
117
118 /**
119 * @param uuids
120 * @param refType
121 * @return
122 */
123 List<UuidAndTitleCache<Reference>> getUuidAndTitle(Set<UUID> uuids, ReferenceType refType);
124
125 /**
126 * @param clazz
127 * @param queryString
128 * @param matchmode
129 * @param criterion
130 * @param pageSize
131 * @param pageNumber
132 * @param orderHints
133 * @param propertyPaths
134 * @return
135 */
136 List<Reference> findByTitleAndAbbrevTitle(Class clazz, String queryString, MatchMode matchmode,
137 List<Criterion> criterion, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints,
138 List<String> propertyPaths);
139
140 List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitleCacheForAuthorID(Integer limit, Integer authorID,
141 ReferenceType refType);
142
143 /**
144 * @param uuids
145 * @param refType
146 * @return
147 */
148 List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitle(Set<UUID> uuids, ReferenceType refType);
149
150 /**
151 * @param uuids
152 * @return
153 */
154 List<UuidAndTitleCache<Reference>> getUuidAndAbbrevTitle(Set<UUID> uuids);
155
156
157 }