Project

General

Profile

Download (2.81 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2008 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*/
6

    
7
package eu.etaxonomy.cdm.persistence.dao.media;
8

    
9
import java.util.List;
10
import java.util.Set;
11

    
12
import eu.etaxonomy.cdm.model.description.MediaKey;
13
import eu.etaxonomy.cdm.model.location.NamedArea;
14
import eu.etaxonomy.cdm.model.media.Media;
15
import eu.etaxonomy.cdm.model.media.Rights;
16
import eu.etaxonomy.cdm.model.taxon.Taxon;
17
import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
18
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
19

    
20
/**
21
 * @author a.babadshanjan
22
 * @since 08.09.2008
23
 */
24
public interface IMediaDao extends IIdentifiableDao<Media> {
25

    
26
	/**
27
	 * Return a count of MediaKeys, optionally filtered by the parameters passed.
28
	 *
29
	 * @param taxonomicScope a Set of Taxon instances that define the taxonomic scope of the key (can be null)
30
	 * @param geoScopes a Set of NamedArea instances that define the geospatial scope of the key (can be null)
31
	 * @return a count of MediaKey instances
32
	 */
33
	public long countMediaKeys(Set<Taxon> taxonomicScope, Set<NamedArea> geoScopes);
34

    
35
	/**
36
	 * Return a List of MediaKeys, optionally filtered by the parameters passed. The MediaKey
37
	 * instances have the following properties initialized:
38
	 *
39
	 * MediaKey.title
40
	 *
41
	 * @param taxonomicScope a Set of Taxon instances that define the taxonomic scope of the key (can be null)
42
	 * @param geoScopes a Set of NamedArea instances that define the geospatial scope of the key (can be null)
43
	 * @param pageSize The maximum number of keys returned (can be null for all keys)
44
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
45
	 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
46
	 * @return a List of MediaKey instances
47
	 */
48
	public List<MediaKey> getMediaKeys(Set<Taxon> taxonomicScope, Set<NamedArea> geoScopes, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
49

    
50
	/**
51
	 * Return a count of the rights for this media entity
52
	 *
53
	 * @param t The media entity
54
	 * @return a count of Rights instances
55
	 */
56
    @Override
57
    public long countRights(Media t);
58

    
59
	/**
60
	 * Return a List of the rights for this media entity
61
	 *
62
	 * @param t The media entity
63
	 * @param pageSize The maximum number of rights returned (can be null for all rights)
64
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
65
	 * @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
66
	 * @return a List of Rights instances
67
	 */
68
	@Override
69
    public List<Rights> getRights(Media t, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
70

    
71
}
(1-1/3)