Updated tests to reflect the new unique uuid constraint, corrected the CacheStrategyG...
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / persistence / dao / occurrence / IOccurrenceDao.java
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.occurrence;
8
9 import java.util.List;
10
11 import eu.etaxonomy.cdm.model.media.Media;
12 import eu.etaxonomy.cdm.model.occurrence.DerivationEvent;
13 import eu.etaxonomy.cdm.model.occurrence.DeterminationEvent;
14 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
15 import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;
16 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
17
18 /**
19 * @author a.babadshanjan
20 * @created 01.09.2008
21 */
22 public interface IOccurrenceDao extends IIdentifiableDao<SpecimenOrObservationBase> {
23
24 /**
25 * Returns a count of Media that are associated with a given occurence
26 *
27 * @param occurence the occurence associated with these media
28 * @return a count of media instances
29 */
30 public int countMedia(SpecimenOrObservationBase occurence);
31
32 /**
33 * Returns a List of Media that are associated with a given occurence
34 *
35 * @param occurence the occurence associated with these media
36 * @param pageSize The maximum number of media returned (can be null for all related media)
37 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
38 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
39 * @return a List of media instances
40 */
41 public List<Media> getMedia(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
42
43 /**
44 * Returns a count of determinations that have been made for a given occurence
45 *
46 * @param occurence the occurence associated with these determinations
47 * @return a count of determination events
48 */
49 public int countDeterminations(SpecimenOrObservationBase occurence);
50
51 /**
52 * Returns a List of determinations that have been made for a given occurence
53 *
54 * @param occurence the occurence associated with these determinations
55 * @param pageSize The maximum number of determinations returned (can be null for all related determinations)
56 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
57 * @return a List of determination instances
58 */
59 public List<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
60
61 /**
62 * Returns a count of derivation events that have involved creating new DerivedUnits from this occurence
63 *
64 * @param occurence the occurence that was a source of these derivation events
65 * @return a count of derivation events
66 */
67 public int countDerivationEvents(SpecimenOrObservationBase occurence);
68
69 /**
70 * Returns a list of derivation events that have involved creating new DerivedUnits from this occurence
71 *
72 * @param occurence the occurence that was a source of these derivation events
73 * @param pageSize The maximum number of derivation events returned (can be null for all related derivation events)
74 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
75 * @return a List of derivation events
76 */
77 public List<DerivationEvent> getDerivationEvents(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
78 }