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
.common
.RelationshipBase
;
16 import eu
.etaxonomy
.cdm
.model
.name
.BotanicalName
;
17 import eu
.etaxonomy
.cdm
.model
.name
.HybridRelationship
;
18 import eu
.etaxonomy
.cdm
.model
.name
.HybridRelationshipType
;
19 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationship
;
20 import eu
.etaxonomy
.cdm
.model
.name
.NameRelationshipType
;
21 import eu
.etaxonomy
.cdm
.model
.name
.Rank
;
22 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
23 import eu
.etaxonomy
.cdm
.model
.name
.TypeDesignationBase
;
24 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignationStatus
;
25 import eu
.etaxonomy
.cdm
.persistence
.dao
.BeanInitializer
;
26 import eu
.etaxonomy
.cdm
.persistence
.dao
.common
.IIdentifiableDao
;
27 import eu
.etaxonomy
.cdm
.persistence
.query
.MatchMode
;
28 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
34 public interface ITaxonNameDao
extends IIdentifiableDao
<TaxonNameBase
> {
37 * Return a count of names related to this name, optionally filtered by
43 * the relationship type (or null to return all relationships)
44 * @return a count of NameRelationship instances
46 public int countRelatedNames(TaxonNameBase name
, NameRelationshipType type
);
49 * Return a List of relationships related to this name, optionally filtered
50 * by relationship type
55 * the relationship type (or null to return all relationships)
57 * The maximum number of relationships returned (can be null for
60 * The offset (in pageSize chunks) from the start of the result
61 * set (0 - based) of the result set (0 - based)
62 * @param orderHints may be null
63 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
64 * @return a List of NameRelationship instances
66 public List
<NameRelationship
> getRelatedNames(TaxonNameBase name
, NameRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
69 * Return a count of hybrids related to this name, optionally filtered by
70 * hybrid relationship type
75 * the hybrid relationship type (or null to return all hybrid)
76 * @return a count of HybridRelationship instances
78 public int countHybridNames(BotanicalName name
, HybridRelationshipType type
);
81 * Return a List of hybrids related to this name, optionally filtered by
82 * hybrid relationship type
87 * the hybrid relationship type (or null to return all hybrids)
89 * The maximum number of hybrid relationships returned (can be
90 * null for all relationships)
92 * The offset (in pageSize chunks) from the start of the result
94 * @return a List of HybridRelationship instances
96 public List
<HybridRelationship
> getHybridNames(BotanicalName name
, HybridRelationshipType type
, Integer pageSize
, Integer pageNumber
, List
<OrderHint
> orderHints
, List
<String
> propertyPaths
);
99 * Return a count of types related to this name, optionally filtered by type
105 * the type designation status (or null to return all types)
106 * @return a count of TypeDesignationBase instances
108 public int countTypeDesignations(TaxonNameBase name
,
109 SpecimenTypeDesignationStatus status
);
112 * Return a List of types related to this name, optionally filtered by type
118 * the type designation status (or null to return all types)
120 * The maximum number of types returned (can be null for all
123 * The offset (in pageSize chunks) from the start of the result
125 * @return a List of TypeDesignationBase instances
127 public List
<TypeDesignationBase
> getTypeDesignations(TaxonNameBase name
,
128 SpecimenTypeDesignationStatus status
, Integer pageSize
, Integer pageNumber
);
131 * Return a List of types related to this name, optionally filtered by type
137 * the type designation status (or null to return all types)
139 * The maximum number of types returned (can be null for all
142 * The offset (in pageSize chunks) from the start of the result
144 * @param propertyPaths
145 * @return a List of TypeDesignationBase instances
147 public List
<TypeDesignationBase
> getTypeDesignations(TaxonNameBase name
,
148 SpecimenTypeDesignationStatus status
, Integer pageSize
, Integer pageNumber
,
149 List
<String
> propertyPaths
);
152 * Returns a List of TaxonNameBase instances that match the properties
156 * @param infraGenericEpithet
157 * @param specificEpithet
158 * @param infraspecificEpithet
161 * The maximum number of names returned (can be null for all
164 * The offset (in pageSize chunks) from the start of the result
166 * @return a List of TaxonNameBase instances
168 public List
<TaxonNameBase
> searchNames(String uninomial
,
169 String infraGenericEpithet
, String specificEpithet
,
170 String infraspecificEpithet
, Rank rank
, Integer pageSize
,
174 * Returns a count of TaxonNameBase instances that match the properties
178 * @param infraGenericEpithet
179 * @param specificEpithet
180 * @param infraspecificEpithet
182 * @return a count of TaxonNameBase instances
184 public int countNames(String uninomial
, String infraGenericEpithet
,
185 String specificEpithet
, String infraspecificEpithet
, Rank rank
);
188 * Returns a List of TaxonNameBase instances which nameCache matches the
193 * The maximum number of names returned (can be null for all
196 * The offset (in pageSize chunks) from the start of the result
198 * @return a List of TaxonNameBase instances
200 public List
<TaxonNameBase
<?
, ?
>> searchNames(String queryString
,
201 Integer pageSize
, Integer pageNumber
);
204 * Returns a count of TaxonNameBase instances which nameCache matches the
208 * @return a count of TaxonNameBase instances
210 public int countNames(String queryString
);
220 public List
<?
extends TaxonNameBase
<?
, ?
>> findByName(String queryString
,
221 MatchMode matchmode
, Integer pageSize
, Integer pageNumber
,
222 List
<Criterion
> criteria
);
231 public Integer
countByName(String queryString
,
232 MatchMode matchmode
, List
<Criterion
> criteria
);
234 public List
<RelationshipBase
> getAllRelationships(Integer limit
, Integer start
);