@Repository @Qualifier(value="descriptionDaoImpl") public class DescriptionDaoImpl extends IdentifiableDaoBase<DescriptionBase> implements IDescriptionDao
defaultField, indexedClasses
defaultBeanInitializer, flushAfterNo, LEFTOUTER_OPS, type
INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
DescriptionDaoImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
countDescriptionByCommonName(java.lang.String queryString,
MatchMode matchMode) |
long |
countDescriptionByDistribution(java.util.Set<NamedArea> namedAreas,
PresenceAbsenceTerm status)
Returns a count of distinct TaxonDescription instances which have Distribution elements that refer to one of the NamedArea instances passed (optionally
filtered by a type of PresenceAbsenceTerm e.g.
|
<T extends DescriptionElementBase> |
countDescriptionElementForTaxon(java.util.UUID taxonUuid,
java.util.Set<Feature> features,
java.lang.Class<T> type) |
<T extends DescriptionElementBase> |
countDescriptionElements(DescriptionBase description,
java.lang.Class<? extends DescriptionBase> descriptionType,
java.util.Set<Feature> features,
java.lang.Class<T> clazz)
Returns a count of description elements of type
|
<T extends DescriptionElementBase> |
countDescriptionElements(DescriptionBase description,
java.util.Set<Feature> features,
java.lang.Class<T> clazz)
Returns a count of description elements of type
|
long |
countDescriptions(java.lang.Class<? extends DescriptionBase> clazz,
java.lang.Boolean hasImages,
java.lang.Boolean hasText,
java.util.Set<Feature> features)
Count the descriptions of type
|
int |
countTaxonDescriptionMedia(java.util.UUID taxonUuid,
java.lang.Boolean limitToGalleries,
java.util.Set<MarkerType> markerTypes)
Returns a count of Media instances, optionally filtered by parameters passed to this method
Maybe in future a similar method is implemented in
IMediaDao which allows more
media sources to be included. |
long |
countTaxonDescriptions(Taxon taxon,
java.util.Set<DefinedTerm> scopes,
java.util.Set<NamedArea> geographicalScopes,
java.util.Set<MarkerType> markerTypes,
java.util.Set<DescriptionType> descriptionTypes)
Returns a count of TaxonDescription instances, optionally filtered by parameters passed to this method
|
long |
countTaxonNameDescriptions(TaxonName name)
Returns a count of TaxonNameDescription instances, optionally filtered by the name which they refer to
|
DescriptionBase |
find(LSID lsid)
Return an object by LSID.
|
<T extends DescriptionElementBase> |
getDescriptionElementForTaxon(java.util.UUID taxonUuid,
java.util.Set<Feature> features,
java.lang.Class<T> type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
<T extends DescriptionElementBase> |
getDescriptionElements(DescriptionBase description,
java.lang.Class<? extends DescriptionBase> descriptionType,
java.util.Set<Feature> features,
java.lang.Class<T> clazz,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns description elements of type
|
<T extends DescriptionElementBase> |
getDescriptionElements(DescriptionBase description,
java.util.Set<Feature> features,
java.lang.Class<T> clazz,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns description elements of type
|
java.util.List<java.lang.Integer> |
getIndividualAssociationSpecimenIDs(java.util.UUID taxonUuid,
java.util.Set<Feature> features,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Return a list of ids of the specimens attached to a taxon via IndividualsAssociations
|
java.util.List<TaxonNameDescription> |
getTaxonNameDescriptions(TaxonName name,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of TaxonNameDescription instances, optionally filtered by the name which they refer to
|
java.util.List<DescriptionBase> |
listDescriptions(java.lang.Class<? extends DescriptionBase> clazz,
java.lang.Boolean hasImages,
java.lang.Boolean hasText,
java.util.Set<Feature> features,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Should use a DetachedCriteria & subquery, but HHH-158 prevents this, for now.
|
java.util.List<TermDto> |
listNamedAreasInUse(boolean includeAllParents,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Method to list all
NamedAreas instances which are currently used
by Distribution elements. |
java.util.List<Media> |
listTaxonDescriptionMedia(java.util.UUID taxonUuid,
java.lang.Boolean limitToGalleries,
java.util.Set<MarkerType> markerTypes,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of Media instances, optionally filtered by parameters passed to this method.
|
java.util.List<TaxonDescription> |
listTaxonDescriptions(Taxon taxon,
java.util.Set<DefinedTerm> scopes,
java.util.Set<NamedArea> geographicalScopes,
java.util.Set<MarkerType> markerTypes,
java.util.Set<DescriptionType> descriptionTypes,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a List of TaxonDescription instances, optionally filtered by parameters passed to this method
|
java.util.List<CommonTaxonName> |
searchDescriptionByCommonName(java.lang.String queryString,
MatchMode matchMode,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Returns a list of CommonTaxonName instances that match a search string
|
java.util.List<TaxonDescription> |
searchDescriptionByDistribution(java.util.Set<NamedArea> namedAreas,
PresenceAbsenceTerm status,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a List of distinct TaxonDescription instances which have Distribution elements that refer to one of the NamedArea instances passed (optionally
filtered by a type of PresenceAbsenceTerm e.g.
|
count, countByIdentifier, countByMarker, countByReferenceTitle, countByReferenceTitleWithRestrictions, countByTitle, countByTitle, countByTitle, countByTitle, countByTitleWithRestrictions, countRights, countSources, countTitleCache, findByIdentifier, findByMarker, findByReferenceTitle, findByReferenceTitleWithRestrictions, findByTitle, findByTitle, findByTitle, findByTitle, findByTitleWithRestrictions, findOriginalSourceByIdInSource, findTitleCache, getCredits, getRights, getSources, getTitleCache, getUuidAndAbbrevTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, getUuidAndTitleCacheByMarker, optimizeIndex, purgeIndex, rebuildIndex, search, suggestQuery
countAnnotations, countMarkers, countMarkers, getAnnotations, getMarkers, groupMarkers
addCriteria, addOrder, checkNotInPriorView, count, count, count, countAuditEvents, countAuditEvents, countByParam, exists, findByParam, findByParamWithRestrictions, findByUuid, getAuditEventFromContext, getAuditEvents, getAuditEvents, getNextAuditEvent, getPreviousAuditEvent, list, list, list, list, load, load, load
addExample, addGroups, clear, count, countByParamWithRestrictions, countGroups, createCriteria, delete, entityType, findById, findByParam, findByUuid, findByUuidWithoutFlush, getAuditReader, getCriteria, getSession, getType, group, list, list, list, list, list, list, load, loadList, lock, makeAuditQuery, merge, merge, refresh, refresh, replace, save, saveAll, saveCdmObj, saveOrUpdate, saveOrUpdateAll, setDefaultBeanInitializer, setPagingParameter, setPagingParameter, update
addCriteria, addFieldPredicate, addLimitAndStart, addLimitAndStart, addLimitAndStart, addOrder, addOrder, addOrder, addPageSizeAndNumber, addPageSizeAndNumber, addPageSizeAndNumber, addPageSizeAndNumber, flush, getSessionFactory, orderByClause, setSessionFactory, splitCollection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countByIdentifier, countByMarker, countByReferenceTitle, countByReferenceTitleWithRestrictions, countByTitle, countByTitleWithRestrictions, countRights, countSources, countTitleCache, findByIdentifier, findByMarker, findByReferenceTitle, findByReferenceTitleWithRestrictions, findByTitle, findByTitleWithRestrictions, findOriginalSourceByIdInSource, findTitleCache, getRights, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, getUuidAndTitleCacheByMarker
countAnnotations, countMarkers, countMarkers, getAnnotations, getMarkers, groupMarkers
countAuditEvents, countAuditEvents, getAuditEvents, getAuditEvents, getNextAuditEvent, getPreviousAuditEvent
clear, count, count, count, count, countByParam, countByParamWithRestrictions, delete, exists, findById, findByParam, findByParam, findByParamWithRestrictions, findByUuid, findByUuidWithoutFlush, flush, getSession, getType, group, list, list, list, list, list, list, list, list, list, load, load, load, loadList, lock, merge, merge, refresh, refresh, replace, save, saveAll, saveOrUpdate, saveOrUpdateAll, update
countByTitle, countByTitle, countByTitle, findByTitle, findByTitle, findByTitle
count, optimizeIndex, purgeIndex, rebuildIndex, search, suggestQuery
public long countDescriptionByDistribution(java.util.Set<NamedArea> namedAreas, PresenceAbsenceTerm status)
IDescriptionDao
countDescriptionByDistribution
in interface IDescriptionDao
namedAreas
- The set of NamedArea instancesstatus
- Restrict the descriptions to those which have Distribution elements are of this status (can be null)public <T extends DescriptionElementBase> long countDescriptionElements(DescriptionBase description, java.util.Set<Feature> features, java.lang.Class<T> clazz)
IDescriptionDao
countDescriptionElements
in interface IDescriptionDao
description
- The description which these description elements belong to (can be null to count all description elements)features
- Restrict the results to those description elements which are scoped by one of the Features passed (can be null or empty)clazz
- A filter for DescriptionElements of a specific classpublic <T extends DescriptionElementBase> long countDescriptionElements(DescriptionBase description, java.lang.Class<? extends DescriptionBase> descriptionType, java.util.Set<Feature> features, java.lang.Class<T> clazz)
IDescriptionDao
countDescriptionElements
in interface IDescriptionDao
description
- The description which these description elements belong to
(can be null to count all description elements)descriptionType
- A filter DescriptionElements which belong to of a specific
class of Descriptionsfeatures
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)clazz
- The type of descriptionpublic long countDescriptions(java.lang.Class<? extends DescriptionBase> clazz, java.lang.Boolean hasImages, java.lang.Boolean hasText, java.util.Set<Feature> features)
IDescriptionDao
countDescriptions
in interface IDescriptionDao
clazz
- The type of description returned (Taxon, TaxonName, or Specimen)hasText
- Restrict the description to those that do (true) or don't (false) contain TextData elements that have some textual content (can be null)features
- Restrict the description to those elements which are scoped by one of the Features passed (can be null or empty)public long countTaxonDescriptions(Taxon taxon, java.util.Set<DefinedTerm> scopes, java.util.Set<NamedArea> geographicalScopes, java.util.Set<MarkerType> markerTypes, java.util.Set<DescriptionType> descriptionTypes)
IDescriptionDao
countTaxonDescriptions
in interface IDescriptionDao
taxon
- Restrict the results to those descriptions that refer to a specific taxon (can be null for all TaxonDescription instances)scopes
- Restrict the results to those descriptions which are scoped by one of the Scope instances passed (can be null or empty)geographicalScopes
- Restrict the results to those descriptions which have a geographical scope that overlaps with the NamedArea instances passed (can be null or empty)markerTypes
- Restrict the results to those descriptions which are marked as true by one of the given marker types (can be null or empty)descriptionTypes
- Restrict the results to those descriptions of the given types (can be null or empty)public <T extends DescriptionElementBase> java.util.List<T> getDescriptionElements(DescriptionBase description, java.util.Set<Feature> features, java.lang.Class<T> clazz, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionDao
getDescriptionElements
in interface IDescriptionDao
description
- The description which these description elements belong to (can be null to count all description elements)features
- Restrict the results to those description elements which are scoped by one of the Features passed (can be null or empty)clazz
- The type of descriptionpageSize
- The maximum number of description elements returned (can be null for all description elements)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public <T extends DescriptionElementBase> java.util.List<T> getDescriptionElements(DescriptionBase description, java.lang.Class<? extends DescriptionBase> descriptionType, java.util.Set<Feature> features, java.lang.Class<T> clazz, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionDao
getDescriptionElements
in interface IDescriptionDao
description
- The description which these description elements belong to
(can be null to count all description elements)descriptionType
- A filter DescriptionElements which belong to of a specific class
of Descriptionsfeatures
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)clazz
- A filter for DescriptionElements of a specific classpageSize
- The maximum number of description elements returned (can be
null for all description elements)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
public java.util.List<TaxonDescription> listTaxonDescriptions(Taxon taxon, java.util.Set<DefinedTerm> scopes, java.util.Set<NamedArea> geographicalScopes, java.util.Set<MarkerType> markerTypes, java.util.Set<DescriptionType> descriptionTypes, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionDao
listTaxonDescriptions
in interface IDescriptionDao
taxon
- The taxon which the description refers to (can be null for all TaxonDescription instances)scopes
- Restrict the results to those descriptions which are scoped by one of the Scope instances passed (can be null or empty)geographicalScopes
- Restrict the results to those descriptions which have a geographical scope that overlaps with the NamedArea instances passed (can be null or empty)markerTypes
- Restrict the results to those descriptions which are marked as true by one of the given marker types (can be null or empty)descriptionTypes
- Restrict the results to those descriptions of the given types (can be null or empty)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public java.util.List<TaxonNameDescription> getTaxonNameDescriptions(TaxonName name, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionDao
getTaxonNameDescriptions
in interface IDescriptionDao
name
- Restrict the results to those descripDescriptionElementBasetions that refer to a specific name (can be null for all TaxonNameDescription instances)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public long countTaxonNameDescriptions(TaxonName name)
IDescriptionDao
countTaxonNameDescriptions
in interface IDescriptionDao
name
- Restrict the results to those descriptions that refer to a specific name (can be null for all TaxonNameDescription instances)public java.util.List<DescriptionBase> listDescriptions(java.lang.Class<? extends DescriptionBase> clazz, java.lang.Boolean hasImages, java.lang.Boolean hasText, java.util.Set<Feature> features, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
listDescriptions
in interface IDescriptionDao
clazz
- The type of description returned (Taxon, TaxonName, or Specimen)hasImages
- Restrict the description to those that do (true) or don't (false) contain elements that have one or more media (can be null)hasText
- Restrict the description to those that do (true) or don't (false) contain TextData elements that have some textual content (can be null)features
- Restrict the description to those elements which are scoped by one of the Features passed (can be null or empty)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)orderHints
- may be nullpropertyPaths
- properties to initialize - see IBeanInitializer.initialize(Object, List)
public java.util.List<TaxonDescription> searchDescriptionByDistribution(java.util.Set<NamedArea> namedAreas, PresenceAbsenceTerm status, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IDescriptionDao
searchDescriptionByDistribution
in interface IDescriptionDao
namedAreas
- The set of NamedArea instancesstatus
- Restrict the descriptions to those which have Distribution elements are of this status (can be null)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public java.util.List<CommonTaxonName> searchDescriptionByCommonName(java.lang.String queryString, MatchMode matchMode, java.lang.Integer pageSize, java.lang.Integer pageNumber)
IDescriptionDao
searchDescriptionByCommonName
in interface IDescriptionDao
public java.lang.Integer countDescriptionByCommonName(java.lang.String queryString, MatchMode matchMode)
countDescriptionByCommonName
in interface IDescriptionDao
public DescriptionBase find(LSID lsid)
IIdentifiableDao
find
in interface IIdentifiableDao<DescriptionBase>
find
in class IdentifiableDaoBase<DescriptionBase>
lsid
- a LifeScience Identifier identifying the desired objectpublic java.util.List<java.lang.Integer> getIndividualAssociationSpecimenIDs(java.util.UUID taxonUuid, java.util.Set<Feature> features, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionDao
getIndividualAssociationSpecimenIDs
in interface IDescriptionDao
public <T extends DescriptionElementBase> java.util.List<T> getDescriptionElementForTaxon(java.util.UUID taxonUuid, java.util.Set<Feature> features, java.lang.Class<T> type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
getDescriptionElementForTaxon
in interface IDescriptionDao
features
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter for DescriptionElements of a specific classpublic <T extends DescriptionElementBase> long countDescriptionElementForTaxon(java.util.UUID taxonUuid, java.util.Set<Feature> features, java.lang.Class<T> type)
countDescriptionElementForTaxon
in interface IDescriptionDao
features
- Restrict the results to those description elements which are
scoped by one of the Features passed (can be null or empty)type
- A filter for DescriptionElements of a specific classpublic java.util.List<Media> listTaxonDescriptionMedia(java.util.UUID taxonUuid, java.lang.Boolean limitToGalleries, java.util.Set<MarkerType> markerTypes, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
IDescriptionDao
IMediaDao
which allows more
media sources to be included.listTaxonDescriptionMedia
in interface IDescriptionDao
taxonUuid
- The taxon uuid of the taxon which the description refers to (can be null for all TaxonDescription instances)limitToGalleries
- if true, only returns media from TaxonDescriptions with isImageGallery = truemarkerTypes
- Restrict the results to those descriptions which are marked as true by one of the given marker types (can be null or empty)pageSize
- The maximum number of descriptions returned (can be null for all descriptions)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)propertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
public int countTaxonDescriptionMedia(java.util.UUID taxonUuid, java.lang.Boolean limitToGalleries, java.util.Set<MarkerType> markerTypes)
IDescriptionDao
IMediaDao
which allows more
media sources to be included.countTaxonDescriptionMedia
in interface IDescriptionDao
taxonUuid
- The taxon uuid of the taxon which the description refers to (can be null for all TaxonDescription instances)limitToGalleries
- if true, only returns media from TaxonDescriptions with isImageGallery = truemarkerTypes
- Restrict the results to those descriptions which are marked as true by one of the given marker types (can be null or empty)public java.util.List<TermDto> listNamedAreasInUse(boolean includeAllParents, java.lang.Integer pageSize, java.lang.Integer pageNumber)
IDescriptionDao
NamedAreas
instances which are currently used
by Distribution
elements.listNamedAreasInUse
in interface IDescriptionDao
includeAllParents
- if set to true all parent areas will be included in the result setCopyright © 2007-2020 EDIT. All Rights Reserved.