Project

General

Profile

Download (3.94 KB) Statistics
| Branch: | Tag: | Revision:
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

    
10
package eu.etaxonomy.cdm.persistence.dao.agent;
11

    
12
import java.util.List;
13

    
14
import org.hibernate.criterion.Criterion;
15

    
16
import eu.etaxonomy.cdm.model.agent.Address;
17
import eu.etaxonomy.cdm.model.agent.AgentBase;
18
import eu.etaxonomy.cdm.model.agent.Institution;
19
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
20
import eu.etaxonomy.cdm.model.agent.Person;
21
import eu.etaxonomy.cdm.model.agent.Team;
22
import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
23
import eu.etaxonomy.cdm.persistence.dto.TeamOrPersonUuidAndTitleCache;
24
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
25
import eu.etaxonomy.cdm.persistence.query.MatchMode;
26
import eu.etaxonomy.cdm.persistence.query.OrderHint;
27

    
28
public interface IAgentDao extends IIdentifiableDao<AgentBase> {
29

    
30
	public List<Institution> getInstitutionByCode(String code);
31

    
32
	/**
33
	 * Return a List of the institutional memberships of a given person
34
	 *
35
	 * @param person the person
36
	 * @param pageSize The maximum number of institutional memberships returned (can be null for all memberships)
37
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
38
	 * @return a List of InstitutionalMembership instances
39
	 */
40
	public List<InstitutionalMembership> getInstitutionalMemberships(Person person, Integer pageSize, Integer pageNumber);
41

    
42
	/**
43
	 * Return a count of institutional memberships held by a person
44
	 *
45
	 * @param person the person
46
	 * @return a count of InstitutionalMembership instances
47
	 */
48
	public long countInstitutionalMemberships(Person person);
49

    
50
	/**
51
	 * Return a List of members of a given team
52
	 *
53
	 * @param team the team
54
	 * @param pageSize The maximum number of people returned (can be null for all members)
55
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
56
	 * @return a List of Person instances
57
	 */
58
	public List<Person> getMembers(Team team, Integer pageSize, Integer pageNumber);
59

    
60
	/**
61
	 * Return a count of members of a given team
62
	 *
63
	 * @param team the team
64
	 * @return a count of Person instances
65
	 */
66
	public long countMembers(Team team);
67

    
68
	/**
69
	 * Return a count of addresses of a given agent
70
	 *
71
	 * @param agent the agent
72
	 * @return a count of Address instances
73
	 */
74
	public long countAddresses(AgentBase agent);
75

    
76
	/**
77
	 * Return a List of addresses of a given agent
78
	 *
79
	 * @param agent the agent
80
	 * @param pageSize The maximum number of addresses returned (can be null for all addresses)
81
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
82
	 * @return a List of Address instances
83
	 */
84
	public List<Address> getAddresses(AgentBase agent, Integer pageSize,Integer pageNumber);
85

    
86
	/**
87
	 * Returns a list of <code>UuidAndTitleCache</code> containing all <code>TeamOrPersonBase</code> obejcts
88
	 * with their respective nomenclaturalTitle instead of regular titleCache
89
	 *
90
	 * @return a list of <code>UuidAndTitleCache</code> instances
91
	 */
92
	public List<UuidAndTitleCache<Team>> getTeamUuidAndNomenclaturalTitle();
93

    
94
    public <T extends AgentBase> List<TeamOrPersonUuidAndTitleCache<T>> getUuidAndAbbrevTitleCache(Class<T> clazz, Integer limit, String pattern);
95

    
96
    public <T extends AgentBase<?>> List<T> findByTitleAndAbbrevTitle(Class<T> clazz, String queryString, MatchMode matchmode,
97
            List<Criterion> criterion, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints,
98
            List<String> propertyPaths);
99

    
100
    public <T extends AgentBase> List<TeamOrPersonUuidAndTitleCache<T>> getUuidAndTitleCacheWithCollector(Class<T> clazz, Integer limit, String pattern);
101

    
102
    public <T extends AgentBase> List<TeamOrPersonUuidAndTitleCache<T>> getTeamOrPersonUuidAndTitleCache(Class<T> clazz, Integer limit, String pattern);
103
}
    (1-1/1)