1
|
/**
|
2
|
* Copyright (C) 2009 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.description;
|
11
|
|
12
|
import java.util.List;
|
13
|
|
14
|
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
|
15
|
import eu.etaxonomy.cdm.model.media.Media;
|
16
|
import eu.etaxonomy.cdm.persistence.dao.common.IAnnotatableDao;
|
17
|
import eu.etaxonomy.cdm.persistence.dao.common.ISearchableDao;
|
18
|
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
|
19
|
|
20
|
public interface IDescriptionElementDao extends IAnnotatableDao<DescriptionElementBase>,ISearchableDao<DescriptionElementBase> {
|
21
|
|
22
|
/**
|
23
|
* Returns a List of Media that are associated with a given description element
|
24
|
*
|
25
|
* @param descriptionElement the description element associated with these media
|
26
|
* @param pageSize The maximum number of media returned (can be null for all related media)
|
27
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
28
|
* @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
|
29
|
* @return a List of media instances
|
30
|
*/
|
31
|
public List<Media> getMedia(DescriptionElementBase descriptionElement, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
|
32
|
|
33
|
/**
|
34
|
* Returns a count of Media that are associated with a given description element
|
35
|
*
|
36
|
* @param descriptionElement the description element associated with these media
|
37
|
* @return a count of media instances
|
38
|
*/
|
39
|
public int countMedia(DescriptionElementBase descriptionElement);
|
40
|
}
|