eu.etaxonomy.cdm.persistence.dao.occurrence
Interface IOccurrenceDao

All Superinterfaces:
IAnnotatableDao<SpecimenOrObservationBase>, ICdmEntityDao<SpecimenOrObservationBase>, IIdentifiableDao<SpecimenOrObservationBase>, ISearchableDao<SpecimenOrObservationBase>, ITitledDao<SpecimenOrObservationBase>, IVersionableDao<SpecimenOrObservationBase>
All Known Implementing Classes:
OccurrenceDaoHibernateImpl

public interface IOccurrenceDao
extends IIdentifiableDao<SpecimenOrObservationBase>

Author:
a.babadshanjan

Method Summary
 int count(Class<? extends SpecimenOrObservationBase> clazz, TaxonBase determinedAs)
          Returns the number of occurences belonging to a certain subclass - which must extend SpecimenOrObservationBase
 int countDerivationEvents(SpecimenOrObservationBase occurence)
          Returns a count of derivation events that have involved creating new DerivedUnits from this occurence
 int countDeterminations(SpecimenOrObservationBase occurence, TaxonBase taxonbase)
          Returns a count of determinations that have been made for a given occurence and for a given taxon concept
 int countMedia(SpecimenOrObservationBase occurence)
          Returns a count of Media that are associated with a given occurence
 List<DerivationEvent> getDerivationEvents(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Returns a list of derivation events that have involved creating new DerivedUnits from this occurence
 List<UuidAndTitleCache<DerivedUnitBase>> getDerivedUnitBaseUuidAndTitleCache()
           
 List<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence, TaxonBase taxonbase, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Returns a List of determinations that have been made for a given occurence and for a given taxon concept
 List<UuidAndTitleCache<FieldObservation>> getFieldObservationUuidAndTitleCache()
           
 List<Media> getMedia(SpecimenOrObservationBase occurence, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Returns a List of Media that are associated with a given occurence
 List<SpecimenOrObservationBase> list(Class<? extends SpecimenOrObservationBase> type, TaxonBase determinedAs, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths)
          Returns a sublist of SpecimenOrObservationBase instances stored in the database.
<T extends SpecimenOrObservationBase>
List<T>
listByAssociatedTaxon(Class<T> type, Taxon associatedTaxon, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths)
          Lists all instances of SpecimenOrObservationBase which are associated with the taxon specified as parameter.
 
Methods inherited from interface eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao
countByReferenceTitle, countByTitle, countRights, countSources, countTitleCache, find, findByReferenceTitle, findByTitle, findOriginalSourceByIdInSource, findTitleCache, getRights, getSources, getUuidAndTitleCache
 
Methods inherited from interface eu.etaxonomy.cdm.persistence.dao.common.IAnnotatableDao
countAnnotations, countMarkers, countMarkers, getAnnotations, getMarkers, groupMarkers
 
Methods inherited from interface eu.etaxonomy.cdm.persistence.dao.common.IVersionableDao
countAuditEvents, countAuditEvents, getAuditEvents, getAuditEvents, getNextAuditEvent, getPreviousAuditEvent
 
Methods inherited from interface eu.etaxonomy.cdm.persistence.dao.common.ICdmEntityDao
clear, count, count, count, delete, exists, findById, findByUuid, flush, getSession, getType, group, list, list, list, list, list, list, list, listByIds, load, load, load, lock, merge, refresh, refresh, replace, rows, save, saveAll, saveOrUpdate, saveOrUpdateAll, update
 
Methods inherited from interface eu.etaxonomy.cdm.persistence.dao.common.ITitledDao
countByTitle, countByTitle, countByTitle, findByTitle, findByTitle, findByTitle, findByTitleAndClass
 
Methods inherited from interface eu.etaxonomy.cdm.persistence.dao.common.ISearchableDao
count, optimizeIndex, purgeIndex, rebuildIndex, search, suggestQuery
 

Method Detail

count

int count(Class<? extends SpecimenOrObservationBase> clazz,
          TaxonBase determinedAs)
Returns the number of occurences belonging to a certain subclass - which must extend SpecimenOrObservationBase

Parameters:
clazz - optionally restrict the counted occurrences to those of a certain subclass of SpecimenOrObservationBase
determinedAs - the taxon concept that these specimens are determined to belong to
Returns:

list

List<SpecimenOrObservationBase> list(Class<? extends SpecimenOrObservationBase> type,
                                     TaxonBase determinedAs,
                                     Integer limit,
                                     Integer start,
                                     List<OrderHint> orderHints,
                                     List<String> propertyPaths)
Returns a sublist of SpecimenOrObservationBase instances stored in the database. A maximum of 'limit' objects are returned, starting at object with index 'start'. Only occurrences which have been determined to belong to the supplied concept are returned.

Parameters:
type -
determinedAs - the taxon concept that these specimens are determined to belong to
limit - the maximum number of entities returned (can be null to return all entities)
start -
orderHints - Supports path like orderHints.propertyNames which include *-to-one properties like createdBy.username or authorTeam.persistentTitleCache
Returns:
Throws:
org.springframework.dao.DataAccessException

countMedia

int countMedia(SpecimenOrObservationBase occurence)
Returns a count of Media that are associated with a given occurence

Parameters:
occurence - the occurence associated with these media
Returns:
a count of media instances

getMedia

List<Media> getMedia(SpecimenOrObservationBase occurence,
                     Integer pageSize,
                     Integer pageNumber,
                     List<String> propertyPaths)
Returns a List of Media that are associated with a given occurence

Parameters:
occurence - the occurence associated with these media
pageSize - The maximum number of media returned (can be null for all related media)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
propertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
Returns:
a List of media instances

countDeterminations

int countDeterminations(SpecimenOrObservationBase occurence,
                        TaxonBase taxonbase)
Returns a count of determinations that have been made for a given occurence and for a given taxon concept

Parameters:
occurence - the occurence associated with these determinations (can be null for all occurrences)
taxonbase - the taxon concept associated with these determinations (can be null for all taxon concepts)
Returns:
a count of determination events

getDeterminations

List<DeterminationEvent> getDeterminations(SpecimenOrObservationBase occurence,
                                           TaxonBase taxonbase,
                                           Integer pageSize,
                                           Integer pageNumber,
                                           List<String> propertyPaths)
Returns a List of determinations that have been made for a given occurence and for a given taxon concept

Parameters:
occurence - the occurence associated with these determinations (can be null for all occurrences)
taxonbase - the taxon concept associated with these determinations (can be null for all taxon concepts)
pageSize - The maximum number of determinations returned (can be null for all related determinations)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
propertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
Returns:
a List of determination instances

countDerivationEvents

int countDerivationEvents(SpecimenOrObservationBase occurence)
Returns a count of derivation events that have involved creating new DerivedUnits from this occurence

Parameters:
occurence - the occurence that was a source of these derivation events
Returns:
a count of derivation events

getDerivationEvents

List<DerivationEvent> getDerivationEvents(SpecimenOrObservationBase occurence,
                                          Integer pageSize,
                                          Integer pageNumber,
                                          List<String> propertyPaths)
Returns a list of derivation events that have involved creating new DerivedUnits from this occurence

Parameters:
occurence - the occurence that was a source of these derivation events
pageSize - The maximum number of derivation events returned (can be null for all related derivation events)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
propertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
Returns:
a List of derivation events

getFieldObservationUuidAndTitleCache

List<UuidAndTitleCache<FieldObservation>> getFieldObservationUuidAndTitleCache()

getDerivedUnitBaseUuidAndTitleCache

List<UuidAndTitleCache<DerivedUnitBase>> getDerivedUnitBaseUuidAndTitleCache()

listByAssociatedTaxon

<T extends SpecimenOrObservationBase> List<T> listByAssociatedTaxon(Class<T> type,
                                                                    Taxon associatedTaxon,
                                                                    Integer limit,
                                                                    Integer start,
                                                                    List<OrderHint> orderHints,
                                                                    List<String> propertyPaths)
Lists all instances of SpecimenOrObservationBase which are associated with the taxon specified as parameter. SpecimenOrObservationBase instances can be associated to taxa in multiple ways, all these possible relations are taken into account:

Type Parameters:
T -
Parameters:
type -
associatedTaxon -
limit -
start -
orderHints -
propertyPaths -
Returns:


Copyright © 2007-2013 EDIT. All Rights Reserved.