Project

General

Profile

Download (3.62 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 eu.etaxonomy.cdm.model.agent.Address;
15
import eu.etaxonomy.cdm.model.agent.AgentBase;
16
import eu.etaxonomy.cdm.model.agent.Institution;
17
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
18
import eu.etaxonomy.cdm.model.agent.Person;
19
import eu.etaxonomy.cdm.model.agent.Team;
20
import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
21
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
22

    
23
public interface IAgentDao extends IIdentifiableDao<AgentBase> {
24

    
25
	public List<Institution> getInstitutionByCode(String code);
26

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

    
37
	/**
38
	 * Return a count of institutional memberships held by a person
39
	 *
40
	 * @param person the person
41
	 * @return a count of InstitutionalMembership instances
42
	 */
43
	public int countInstitutionalMemberships(Person person);
44

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

    
55
	/**
56
	 * Return a count of members of a given team
57
	 *
58
	 * @param team the team
59
	 * @return a count of Person instances
60
	 */
61
	public int countMembers(Team team);
62

    
63
	/**
64
	 * Return a count of addresses of a given agent
65
	 *
66
	 * @param agent the agent
67
	 * @return a count of Address instances
68
	 */
69
	public Integer countAddresses(AgentBase agent);
70

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

    
81
	/**
82
	 * Returns a list of <code>UuidAndTitleCache</code> containing all <code>Person</code>s
83
	 *
84
	 * @return a list of <code>UuidAndTitleCache</code> instances
85
	 */
86
	public List<UuidAndTitleCache<Person>> getPersonUuidAndTitleCache();
87

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

    
96
	/**
97
	 * Returns a list of <code>UuidAndTitleCache</code> containing all <code>TeamOrPersonBase</code> obejcts
98
	 * with their respective titleCache
99
	 *
100
	 * @return a list of <code>UuidAndTitleCache</code> instances
101
	 */
102
	public List<UuidAndTitleCache<Team>> getTeamUuidAndTitleCache();
103

    
104
	/**
105
	 * @return
106
	 */
107
	public List<UuidAndTitleCache<Institution>> getInstitutionUuidAndTitleCache();
108
}
    (1-1/1)