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.
9 package eu
.etaxonomy
.cdm
.persistence
.dao
.name
;
11 import java
.util
.List
;
13 import org
.hibernate
.criterion
.Criterion
;
15 import eu
.etaxonomy
.cdm
.model
.name
.BotanicalName
;
16 import eu
.etaxonomy
.cdm
.model
.name
.HybridRelationship
;
17 import eu
.etaxonomy
.cdm
.model
.name
.HybridRelationshipType
;
18 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
19 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationshipType
;
20 import eu
.etaxonomy
.cdm
.model
.name
.Rank
;
21 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
22 import eu
.etaxonomy
.cdm
.model
.name
.TypeDesignationBase
;
23 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignationStatus
;
24 import eu
.etaxonomy
.cdm
.persistence
.dao
.BeanInitializer
;
25 import eu
.etaxonomy
.cdm
.persistence
.dao
.common
.IIdentifiableDao
;
26 import eu
.etaxonomy
.cdm
.persistence
.query
.MatchMode
;
27 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
33 public interface ITaxonNameDao
extends IIdentifiableDao
<TaxonNameBase
> {
36 * Return a count of names related to this name, optionally filtered by
42 * the relationship type (or null to return all relationships)
43 * @return a count of NameRelationship instances
45 public int countRelatedNames(TaxonNameBase name
, NameRelationshipType type
);
48 * Return a List of relationships related to this name, optionally filtered
49 * by relationship type
54 * the relationship type (or null to return all relationships)
56 * The maximum number of relationships returned (can be null for
59 * The offset (in pageSize chunks) from the start of the result
60 * set (0 - based) of the result set (0 - based)
61 * @param orderHints may be null
62 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
63 * @return a List of NameRelationship instances
65 public List
<NameRelationship
> getRelatedNames(TaxonNameBase name
, NameRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
68 * Return a count of hybrids related to this name, optionally filtered by
69 * hybrid relationship type
74 * the hybrid relationship type (or null to return all hybrid)
75 * @return a count of HybridRelationship instances
77 public int countHybridNames(BotanicalName name
, HybridRelationshipType type
);
80 * Return a List of hybrids related to this name, optionally filtered by
81 * hybrid relationship type
86 * the hybrid relationship type (or null to return all hybrids)
88 * The maximum number of hybrid relationships returned (can be
89 * null for all relationships)
91 * The offset (in pageSize chunks) from the start of the result
93 * @return a List of HybridRelationship instances
95 public List
<HybridRelationship
> getHybridNames(BotanicalName name
, HybridRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
98 * Return a count of types related to this name, optionally filtered by type
104 * the type designation status (or null to return all types)
105 * @return a count of TypeDesignationBase instances
107 public int countTypeDesignations(TaxonNameBase name
,
108 SpecimenTypeDesignationStatus status
);
111 * Return a List of types related to this name, optionally filtered by type
117 * the type designation status (or null to return all types)
119 * The maximum number of types returned (can be null for all
122 * The offset (in pageSize chunks) from the start of the result
124 * @return a List of TypeDesignationBase instances
126 public List
<TypeDesignationBase
> getTypeDesignations(TaxonNameBase name
,
127 SpecimenTypeDesignationStatus status
, Integer pageSize
, Integer pageNumber
);
130 * Return a List of types related to this name, optionally filtered by type
136 * the type designation status (or null to return all types)
138 * The maximum number of types returned (can be null for all
141 * The offset (in pageSize chunks) from the start of the result
143 * @param propertyPaths
144 * @return a List of TypeDesignationBase instances
146 public List
<TypeDesignationBase
> getTypeDesignations(TaxonNameBase name
,
147 SpecimenTypeDesignationStatus status
, Integer pageSize
, Integer pageNumber
,
148 List
<String
> propertyPaths
);
151 * Returns a List of TaxonNameBase instances that match the properties
155 * @param infraGenericEpithet
156 * @param specificEpithet
157 * @param infraspecificEpithet
160 * The maximum number of names returned (can be null for all
163 * The offset (in pageSize chunks) from the start of the result
165 * @return a List of TaxonNameBase instances
167 public List
<TaxonNameBase
> searchNames(String uninomial
,
168 String infraGenericEpithet
, String specificEpithet
,
169 String infraspecificEpithet
, Rank rank
, Integer pageSize
,
173 * Returns a count of TaxonNameBase instances that match the properties
177 * @param infraGenericEpithet
178 * @param specificEpithet
179 * @param infraspecificEpithet
181 * @return a count of TaxonNameBase instances
183 public int countNames(String uninomial
, String infraGenericEpithet
,
184 String specificEpithet
, String infraspecificEpithet
, Rank rank
);
187 * Returns a List of TaxonNameBase instances which nameCache matches the
192 * The maximum number of names returned (can be null for all
195 * The offset (in pageSize chunks) from the start of the result
197 * @return a List of TaxonNameBase instances
199 public List
<TaxonNameBase
<?
, ?
>> searchNames(String queryString
,
200 Integer pageSize
, Integer pageNumber
);
203 * Returns a count of TaxonNameBase instances which nameCache matches the
207 * @return a count of TaxonNameBase instances
209 public int countNames(String queryString
);
219 public List
<?
extends TaxonNameBase
<?
, ?
>> findByName(String queryString
,
220 MatchMode matchmode
, Integer pageSize
, Integer pageNumber
,
221 List
<Criterion
> criteria
);
230 public Integer
countByName(String queryString
,
231 MatchMode matchmode
, List
<Criterion
> criteria
);