Project

General

Profile

Download (2.76 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2014 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.cdm.persistence.dao.molecular;
11

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

    
15
import org.hibernate.criterion.Criterion;
16

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

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

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

    
38

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

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

    
67
}
(2-2/4)