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