Project

General

Profile

Download (2.75 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2014 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.molecular;
10

    
11
import java.util.List;
12
import java.util.UUID;
13

    
14
import org.hibernate.criterion.Criterion;
15

    
16
import eu.etaxonomy.cdm.model.molecular.Primer;
17
import eu.etaxonomy.cdm.persistence.dao.common.IAnnotatableDao;
18
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
19
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
20
import eu.etaxonomy.cdm.persistence.query.MatchMode;
21
import eu.etaxonomy.cdm.persistence.query.OrderHint;
22

    
23
/**
24
 * @author pplitzner
25
 * @date 11.03.2014
26
 *
27
 */
28
public interface IPrimerDao extends IAnnotatableDao<Primer>{
29

    
30
    /**
31
     * Retrieves the {@link UUID} and the string representation (title cache) of all
32
     * {@link Primer}s found in the data base.
33
     * @return a list of {@link UuidAndTitleCache}
34
     */
35
    public List<UuidAndTitleCache<Primer>> getPrimerUuidAndTitleCache();
36

    
37

    
38
    /**
39
     * Return a count of {@link Primer}s matching the given query string in the titleCache, optionally with a particular MatchMode
40
     *
41
     * @param queryString the query string to filter by
42
     * @param matchmode use a particular type of matching (can be null - defaults to exact matching)
43
     * @param criteria extra restrictions to apply
44
     * @return a count of instances of type T matching the queryString
45
     */
46
    public long countByTitle(String queryString, MatchMode matchmode, List<Criterion> criteria);
47

    
48
    /**
49
    * Return a List of {@link Primer}s matching the given query string, optionally with a particular MatchMode
50
    *
51
    * @param queryString the query string to filter by
52
    * @param matchmode use a particular type of matching (can be null - defaults to exact matching)
53
    * @param criteria extra restrictions to apply
54
    * @param pageSize The maximum number of rights returned (can be null for all rights)
55
    * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
56
    * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
57
    * @param orderHints
58
    *            Supports path like <code>orderHints.propertyNames</code> which
59
    *            include *-to-one properties like createdBy.username or
60
    *            authorTeam.persistentTitleCache
61
    * @return a List of instances of type T matching the queryString
62
    */
63
    public List<Primer> findByTitle(String queryString, MatchMode matchmode, List<Criterion> criteria,
64
            Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
65

    
66
}
(2-2/4)