@Repository @Qualifier(value="taxonDaoHibernateImpl") public class TaxonDaoHibernateImpl extends IdentifiableDaoBase<TaxonBase> implements ITaxonDao
defaultField, indexedClasses
defaultBeanInitializer, flushAfterNo, LEFTOUTER_OPS, type
INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
TaxonDaoHibernateImpl() |
Modifier and Type | Method and Description |
---|---|
Taxon |
acceptedTaxonFor(Synonym synonym,
Classification classificationFilter,
java.util.List<java.lang.String> propertyPaths)
This method was originally required when synonyms still had a synonym relationship
to taxa and could belong to multiple taxa.
|
protected void |
addRestrictions(boolean doAreaRestriction,
Classification classification,
TaxonNode subtree,
boolean includeUnpublished,
java.util.Set<java.util.UUID> namedAreasUuids,
org.hibernate.Query query) |
long |
count(java.lang.Class<? extends TaxonBase> type,
java.util.List<Restriction<?>> restrictions)
Counts the Cdm entities matching the restrictions defined by
the
parameters propertyName , value and matchMode . |
long |
count(java.lang.Class<? extends TaxonBase> type,
java.util.List<Restriction<?>> restrictions,
boolean includePublished) |
long |
countAcceptedTaxonFor(Synonym synonym,
Classification classificationFilter)
This method was originally required when synonyms still had a synonym relationship
to taxa and could belong to multiple taxa.
|
<S extends TaxonBase> |
countByIdentifier(java.lang.Class<S> clazz,
java.lang.String identifier,
DefinedTerm identifierType,
TaxonNode subtreeFilter,
MatchMode matchmode)
Counts all taxa which match the given identifier (identifier type, identifier string and match mode).
|
<S extends TaxonBase> |
countByMarker(java.lang.Class<S> clazz,
MarkerType markerType,
java.lang.Boolean markerValue,
TaxonNode subtreeFilter)
Counts all taxa which have the given marker of type markerType and with value markerValue.
|
long |
countMatchesByName(java.lang.String queryString,
MatchMode matchMode,
boolean onlyAcccepted) |
long |
countMatchesByName(java.lang.String queryString,
MatchMode matchMode,
boolean onlyAcccepted,
java.util.List<org.hibernate.criterion.Criterion> criteria) |
long |
countSynonyms(boolean onlyAttachedToTaxon)
Counts the number of synonyms
|
long |
countSynonyms(Synonym synonym,
SynonymType type)
Returns a count of the synonyms (where relationship.type == type,
if this argument is supplied) which do have an accepted taxon.
|
long |
countSynonyms(Taxon taxon,
SynonymType type)
Returns a count of the Synonyms (where relationship.type == type,
if this argument is supplied) where the supplied taxon is relatedTo.
|
long |
countTaxaByCommonName(java.lang.String searchString,
Classification classification,
MatchMode matchMode,
java.util.Set<NamedArea> namedAreas) |
long |
countTaxaByName(boolean doTaxa,
boolean doSynonyms,
boolean doMisappliedNames,
boolean doCommonNames,
boolean doIncludeAuthors,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
MatchMode matchMode,
java.util.Set<NamedArea> namedAreas,
boolean includeUnpublished) |
long |
countTaxaByName(java.lang.Class<? extends TaxonBase> clazz,
java.lang.String genusOrUninomial,
java.lang.String infraGenericEpithet,
java.lang.String specificEpithet,
java.lang.String infraSpecificEpithet,
java.lang.String authorshipCache,
Rank rank)
Returns a count of TaxonBase instances where the
taxon.name properties match the parameters passed.
|
long |
countTaxonRelationships(java.util.Set<TaxonRelationshipType> types) |
long |
countTaxonRelationships(Taxon taxon,
java.util.Set<TaxonRelationshipType> types,
boolean includeUnpublished,
RelationshipBase.Direction direction) |
long |
countTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
boolean includeUnpublished,
RelationshipBase.Direction direction)
Returns a count of the TaxonRelationships (of where relationship.type ==
type, if this argument is supplied) where the supplied taxon either is
relatedFrom or relatedTo depending on the
direction
parameter. |
java.util.UUID |
delete(TaxonBase taxonBase) |
TaxonBase |
find(LSID lsid)
Return an object by LSID.
|
<S extends TaxonBase> |
findByIdentifier(java.lang.Class<S> clazz,
java.lang.String identifier,
DefinedTerm identifierType,
TaxonNode subtreeFilter,
MatchMode matchmode,
boolean includeEntity,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
<S extends TaxonBase> |
findByMarker(java.lang.Class<S> clazz,
MarkerType markerType,
java.lang.Boolean markerValue,
TaxonNode subtreeFilter,
boolean includeEntity,
TaxonTitleType titleType,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
java.util.List<TaxonBase> |
findByNameTitleCache(boolean doTaxa,
boolean doSynonyms,
boolean includeUnpublished,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
MatchMode matchMode,
java.util.Set<NamedArea> namedAreas,
NameSearchOrder order,
java.lang.Integer pageNumber,
java.lang.Integer pageSize,
java.util.List<java.lang.String> propertyPaths)
Find taxa by searching for Taxa and Synonyms where the
TaxonName .titleCache matches
the name specified as queryString taxonName |
TaxonBase |
findByUuid(java.util.UUID uuid,
java.util.List<org.hibernate.criterion.Criterion> criteria,
java.util.List<java.lang.String> propertyPaths)
Returns a taxon corresponding to the given uuid
|
java.util.List<? extends TaxonBase> |
findByUuids(java.util.List<java.util.UUID> uuids,
java.util.List<org.hibernate.criterion.Criterion> criteria,
java.util.List<java.lang.String> propertyPaths)
Returns a list of Taxon entities corresponding to the given uuid list.
|
java.util.Map<java.lang.String,java.util.Map<java.util.UUID,java.util.Set<TaxonName>>> |
findIdenticalNames(java.util.List<java.util.UUID> sourceRefUuids,
java.util.List<java.lang.String> propertyPaths)
see service layer documentation
|
java.util.List<TaxonBase> |
findTaxaByName(java.lang.Class<? extends TaxonBase> clazz,
java.lang.String genusOrUninomial,
java.lang.String infraGenericEpithet,
java.lang.String specificEpithet,
java.lang.String infraSpecificEpithet,
java.lang.String authorship,
Rank rank,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a list of TaxonBase instances where the
taxon.name properties match the parameters passed.
|
protected org.hibernate.Query |
getSearchQueryString(java.lang.String hqlQueryString,
java.lang.String synonymSubselect) |
java.util.List<Synonym> |
getSynonyms(Taxon taxon,
SynonymType type,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns the Synonyms (of where relationship.type == type, if this argument is supplied)
that do have the supplied taxon as accepted taxon.
|
java.util.List<Taxon> |
getTaxaByCommonName(java.lang.String queryString,
Classification classification,
MatchMode matchMode,
java.util.Set<NamedArea> namedAreas,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths) |
java.util.List<UuidAndTitleCache<Taxon>> |
getTaxaByCommonNameForEditor(java.lang.String titleSearchStringSqlized,
Classification classification,
MatchMode matchMode,
java.util.Set<NamedArea> namedAreas) |
java.util.List<TaxonBase> |
getTaxaByName(boolean doTaxa,
boolean doSynonyms,
boolean doMisappliedNames,
boolean doCommonNames,
boolean includeAuthors,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
MatchMode matchMode,
java.util.Set<NamedArea> namedAreas,
boolean includeUnpublished,
NameSearchOrder order,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<java.lang.String> propertyPaths)
Returns a list of TaxonBase instances (or Taxon instances, if accepted == true, or Synonym instance, if accepted == false)
where the taxonBase.name.nameCache property matches the String queryString.
|
java.util.List<TaxonBase> |
getTaxaByName(boolean doTaxa,
boolean doSynonyms,
boolean includeUnpublished,
java.lang.String queryString,
MatchMode matchMode,
java.lang.Integer pageSize,
java.lang.Integer pageNumber) |
java.util.List<TaxonBase> |
getTaxaByName(java.lang.String queryString,
java.lang.Boolean accepted,
boolean includeUnpublished,
Reference sec)
Returns a list of TaxonBase instances (or Taxon instances, if accepted == true, or Synonym instance, if accepted == false)
where the taxonBase.name.nameCache property matches the String queryString, and taxon.sec matches the sec parameter.
|
java.util.List<TaxonBase> |
getTaxaByName(java.lang.String queryString,
boolean includeUnpublished,
Reference sec)
Returns a list of TaxonBase instances where the taxon.titleCache property matches the name parameter,
and taxon.sec matches the sec parameter.
|
java.util.List<TaxonBase> |
getTaxaByName(java.lang.String queryString,
MatchMode matchMode,
java.lang.Boolean accepted,
boolean includeUnpublished,
java.lang.Integer pageSize,
java.lang.Integer pageNumber)
Returns a list of TaxonBase instances (or Taxon instances, if accepted == true, or Synonym instance, if accepted == false)
where the taxonBase.name.nameCache property matches the String queryString.
|
java.util.List<UuidAndTitleCache<? extends IdentifiableEntity>> |
getTaxaByNameForEditor(boolean doTaxa,
boolean doSynonyms,
boolean doNamesWithoutTaxa,
boolean doMisappliedNames,
boolean doCommonNames,
boolean includeUnpublished,
java.lang.String queryString,
Classification classification,
TaxonNode subtree,
MatchMode matchMode,
java.util.Set<NamedArea> namedAreas,
NameSearchOrder order) |
java.util.List<TaxonRelationship> |
getTaxonRelationships(java.util.Set<TaxonRelationshipType> types,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths) |
java.util.List<TaxonRelationship> |
getTaxonRelationships(Taxon taxon,
java.util.Set<TaxonRelationshipType> types,
boolean includeUnpublished,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths,
RelationshipBase.Direction direction) |
java.util.List<TaxonRelationship> |
getTaxonRelationships(Taxon taxon,
TaxonRelationshipType type,
boolean includeUnpublished,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths,
RelationshipBase.Direction direction)
Returns the TaxonRelationships (of where relationship.type == type, if
this argument is supplied) where the supplied taxon either is
relatedFrom or relatedTo depending on the
direction
parameter. |
java.util.List<UuidAndTitleCache<TaxonBase>> |
getUuidAndTitleCache(java.lang.Integer limit,
java.lang.String pattern)
Return a list of all uuids mapped to titleCache in the convenient
UuidAndTitleCache object. |
protected java.util.List<UuidAndTitleCache<TaxonBase>> |
getUuidAndTitleCache(org.hibernate.Query query) |
<S extends TaxonBase> |
list(java.lang.Class<S> type,
java.util.List<Restriction<?>> restrictions,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a list of Cdm entities stored in the database filtered by the restrictions defined by
the
parameters propertyName , value and matchMode
A maximum
of 'limit' objects are returned, starting at object with index 'start'. |
<S extends TaxonBase> |
list(java.lang.Class<S> type,
java.util.List<Restriction<?>> restrictions,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths,
boolean includePublished) |
TaxonBase |
load(java.util.UUID uuid,
boolean includeUnpublished,
java.util.List<java.lang.String> propertyPaths)
Like
#load(int, List) but allows excluding unpublished records. |
TaxonBase |
load(java.util.UUID uuid,
java.util.List<java.lang.String> propertyPaths)
Finds the cdm entity specified by the
uuid parameter and
recursively initializes all bean properties given in the
propertyPaths parameter. |
void |
rebuildIndex()
Index all T entities currently in the database (useful in concert with purgeIndex() to (re-)create
indexes or in the case of corrupt indexes / mismatch between
the database and the free-text indices)
|
java.lang.String |
suggestQuery(java.lang.String queryString)
Suggest a query that will return hits based upon an existing lucene query string (that is presumably misspelt and returns no hits)
Used to implement "did you mean?"-type functionality using the lucene spellchecker.
|
java.util.List<java.lang.String> |
taxaByNameNotInDB(java.util.List<java.lang.String> taxonNames) |
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, getUuidAndTitleCacheByMarker, optimizeIndex, purgeIndex, search
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
addExample, addGroups, clear, countByParamWithRestrictions, countGroups, createCriteria, entityType, findById, findByParam, findByUuid, findByUuidWithoutFlush, getAuditReader, getCriteria, getSession, getType, group, 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, getUuidAndTitleCacheByMarker
countAnnotations, countMarkers, countMarkers, getAnnotations, getMarkers, groupMarkers
countAuditEvents, countAuditEvents, getAuditEvents, getAuditEvents, getNextAuditEvent, getPreviousAuditEvent
clear, count, count, count, countByParam, countByParamWithRestrictions, exists, findById, findByParam, findByParam, findByParamWithRestrictions, findByUuid, findByUuidWithoutFlush, flush, getSession, getType, group, list, list, list, list, list, list, list, list, load, load, loadList, lock, merge, merge, refresh, refresh, replace, save, saveAll, saveOrUpdate, saveOrUpdateAll, update
countByTitle, countByTitle, countByTitle, findByTitle, findByTitle, findByTitle
count, optimizeIndex, purgeIndex, search
public TaxonBase load(java.util.UUID uuid, java.util.List<java.lang.String> propertyPaths)
ICdmEntityDao
uuid
parameter and
recursively initializes all bean properties given in the
propertyPaths
parameter.
For detailed description and examples please refer to:
IBeanInitializer.initialize(Object, List)
load
in interface ICdmEntityDao<TaxonBase>
load
in interface ITaxonDao
load
in class VersionableDaoBase<TaxonBase>
propertyPaths
- properties to be initializedpublic TaxonBase load(java.util.UUID uuid, boolean includeUnpublished, java.util.List<java.lang.String> propertyPaths)
IPublishableDao
#load(int, List)
but allows excluding unpublished records.load
in interface IPublishableDao<TaxonBase>
load
in class VersionableDaoBase<TaxonBase>
#load(UUID, List)
public <S extends TaxonBase> java.util.List<S> list(java.lang.Class<S> type, java.util.List<Restriction<?>> restrictions, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
CdmEntityDaoBase
parameters
propertyName
, value and matchMode
A maximum
of 'limit' objects are returned, starting at object with index 'start'.
The bean properties specified by the parameter propertyPaths
and recursively initialized for each of the entities in the resultset
For detailed description and examples regarding
propertyPaths
please refer to:
IBeanInitializer.initialize(Object, List)
list
in interface ICdmEntityDao<TaxonBase>
list
in class CdmEntityDaoBase<TaxonBase>
type
- Restrict the query to objects of a certain class, or null for
all objects of type T or subclassesrestrictions
- This defines a filter for multiple properties represented by the map keys. Sine the keys are of the type
Restriction
for each property a single MatchMode is defined. Multiple alternative values
can be supplied per property, that is the values per property are combined with OR. The per property
restrictions are combined with AND.
NOTE: For non string type properties you must use
MatchMode.EXACT
. If set null
MatchMode.EXACT
will be used
as default.limit
- the maximum number of entities returned (can be null to return
all entities)start
- The list of criterion objects representing the restriction to be applied.orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepublic <S extends TaxonBase> java.util.List<S> list(java.lang.Class<S> type, java.util.List<Restriction<?>> restrictions, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths, boolean includePublished)
public long count(java.lang.Class<? extends TaxonBase> type, java.util.List<Restriction<?>> restrictions)
CdmEntityDaoBase
parameters
propertyName
, value and matchMode
.count
in interface ICdmEntityDao<TaxonBase>
count
in class CdmEntityDaoBase<TaxonBase>
type
- Restrict the query to objects of a certain class, or null for
all objects of type T or subclassesrestrictions
- This defines a filter for multiple properties represented by the map keys. Sine the keys are of the type
Restriction
for each property a single MatchMode is defined. Multiple alternative values
can be supplied per property, that is the values per property are combined with OR. The per property
restrictions are combined with AND.
NOTE: For non string type properties you must use
MatchMode.EXACT
. If set null
MatchMode.EXACT
will be used
as default.public long count(java.lang.Class<? extends TaxonBase> type, java.util.List<Restriction<?>> restrictions, boolean includePublished)
public java.util.List<TaxonBase> getTaxaByName(java.lang.String queryString, boolean includeUnpublished, Reference sec)
ITaxonDao
getTaxaByName
in interface ITaxonDao
public java.util.List<TaxonBase> getTaxaByName(java.lang.String queryString, java.lang.Boolean accepted, boolean includeUnpublished, Reference sec)
ITaxonDao
getTaxaByName
in interface ITaxonDao
public java.util.List<TaxonBase> getTaxaByName(boolean doTaxa, boolean doSynonyms, boolean includeUnpublished, java.lang.String queryString, MatchMode matchMode, java.lang.Integer pageSize, java.lang.Integer pageNumber)
public java.util.List<TaxonBase> getTaxaByName(java.lang.String queryString, MatchMode matchMode, java.lang.Boolean accepted, boolean includeUnpublished, java.lang.Integer pageSize, java.lang.Integer pageNumber)
ITaxonDao
getTaxaByName
in interface ITaxonDao
public java.util.List<TaxonBase> getTaxaByName(boolean doTaxa, boolean doSynonyms, boolean doMisappliedNames, boolean doCommonNames, boolean includeAuthors, java.lang.String queryString, Classification classification, TaxonNode subtree, MatchMode matchMode, java.util.Set<NamedArea> namedAreas, boolean includeUnpublished, NameSearchOrder order, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
ITaxonDao
getTaxaByName
in interface ITaxonDao
classification
- TODOnamedAreas
- TODOpropertyPaths
- TODOpublic java.util.List<UuidAndTitleCache<? extends IdentifiableEntity>> getTaxaByNameForEditor(boolean doTaxa, boolean doSynonyms, boolean doNamesWithoutTaxa, boolean doMisappliedNames, boolean doCommonNames, boolean includeUnpublished, java.lang.String queryString, Classification classification, TaxonNode subtree, MatchMode matchMode, java.util.Set<NamedArea> namedAreas, NameSearchOrder order)
getTaxaByNameForEditor
in interface ITaxonDao
public java.util.List<Taxon> getTaxaByCommonName(java.lang.String queryString, Classification classification, MatchMode matchMode, java.util.Set<NamedArea> namedAreas, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
getTaxaByCommonName
in interface ITaxonDao
protected org.hibernate.Query getSearchQueryString(java.lang.String hqlQueryString, java.lang.String synonymSubselect)
hqlQueryString
- synonymSubselect
- protected void addRestrictions(boolean doAreaRestriction, Classification classification, TaxonNode subtree, boolean includeUnpublished, java.util.Set<java.util.UUID> namedAreasUuids, org.hibernate.Query query)
includeUnpublished
- classification
- doAreaRestriction
- subtree
- namedAreasUuids
- subTaxon
- public long countTaxaByName(boolean doTaxa, boolean doSynonyms, boolean doMisappliedNames, boolean doCommonNames, boolean doIncludeAuthors, java.lang.String queryString, Classification classification, TaxonNode subtree, MatchMode matchMode, java.util.Set<NamedArea> namedAreas, boolean includeUnpublished)
countTaxaByName
in interface ITaxonDao
classification
- TODOpublic java.util.UUID delete(TaxonBase taxonBase) throws org.springframework.dao.DataAccessException
delete
in interface ICdmEntityDao<TaxonBase>
delete
in class CdmEntityDaoBase<TaxonBase>
org.springframework.dao.DataAccessException
public java.util.List<TaxonBase> findByNameTitleCache(boolean doTaxa, boolean doSynonyms, boolean includeUnpublished, java.lang.String queryString, Classification classification, TaxonNode subtree, MatchMode matchMode, java.util.Set<NamedArea> namedAreas, NameSearchOrder order, java.lang.Integer pageNumber, java.lang.Integer pageSize, java.util.List<java.lang.String> propertyPaths)
ITaxonDao
TaxonName
.titleCache
matches
the name specified as queryString taxonName
Compare with
#findTaxaByName(Class, String, String, String, String, Rank, Integer, Integer)
which searches for TaxonName
.nameCache
findByNameTitleCache
in interface ITaxonDao
queryString
- the taqxon Name to search forclassification
- TODOnamedAreas
- TODOpublic TaxonBase findByUuid(java.util.UUID uuid, java.util.List<org.hibernate.criterion.Criterion> criteria, java.util.List<java.lang.String> propertyPaths)
ITaxonDao
findByUuid
in interface ITaxonDao
uuid
- The uuid of the taxon requestedcriteria
- Custom criteria to be added to the default list of applied criteria.public java.util.List<? extends TaxonBase> findByUuids(java.util.List<java.util.UUID> uuids, java.util.List<org.hibernate.criterion.Criterion> criteria, java.util.List<java.lang.String> propertyPaths)
ITaxonDao
findByUuids
in interface ITaxonDao
public long countMatchesByName(java.lang.String queryString, MatchMode matchMode, boolean onlyAcccepted)
countMatchesByName
in interface ITaxonDao
public long countMatchesByName(java.lang.String queryString, MatchMode matchMode, boolean onlyAcccepted, java.util.List<org.hibernate.criterion.Criterion> criteria)
countMatchesByName
in interface ITaxonDao
public long countSynonyms(boolean onlyAttachedToTaxon)
ITaxonDao
countSynonyms
in interface ITaxonDao
onlyAttachedToTaxon
- if true
only those synonyms being attached to
an accepted taxon are countedpublic long countSynonyms(Taxon taxon, SynonymType type)
ITaxonDao
countSynonyms
in interface ITaxonDao
taxon
- The taxon that is relatedTotype
- The type of Synonym (can be null)public long countSynonyms(Synonym synonym, SynonymType type)
ITaxonDao
countSynonyms
in interface ITaxonDao
synonym
- The synonym that is relatedFromtype
- The type of Synonym (can be null)public long countTaxaByName(java.lang.Class<? extends TaxonBase> clazz, java.lang.String genusOrUninomial, java.lang.String infraGenericEpithet, java.lang.String specificEpithet, java.lang.String infraSpecificEpithet, java.lang.String authorshipCache, Rank rank)
ITaxonDao
countTaxaByName
in interface ITaxonDao
public java.util.List<TaxonBase> findTaxaByName(java.lang.Class<? extends TaxonBase> clazz, java.lang.String genusOrUninomial, java.lang.String infraGenericEpithet, java.lang.String specificEpithet, java.lang.String infraSpecificEpithet, java.lang.String authorship, Rank rank, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
ITaxonDao
Compare with
#findByName(String, MatchMode, int, int, boolean)
which searches for TaxonName
.titleCache
findTaxaByName
in interface ITaxonDao
pageSize
- The maximum number of taxa returned (can be null for all matching taxa)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)public long countTaxonRelationships(Taxon taxon, TaxonRelationshipType type, boolean includeUnpublished, RelationshipBase.Direction direction)
ITaxonDao
direction
parameter.countTaxonRelationships
in interface ITaxonDao
taxon
- The taxon that is relatedFromtype
- The type of TaxonRelationship (can be null)direction
- specifies the direction of the relationshippublic long countTaxonRelationships(Taxon taxon, java.util.Set<TaxonRelationshipType> types, boolean includeUnpublished, RelationshipBase.Direction direction)
countTaxonRelationships
in interface ITaxonDao
public java.util.List<TaxonRelationship> getTaxonRelationships(Taxon taxon, TaxonRelationshipType type, boolean includeUnpublished, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths, RelationshipBase.Direction direction)
ITaxonDao
direction
parameter.getTaxonRelationships
in interface ITaxonDao
taxon
- The taxon that is relatedTotype
- The type of TaxonRelationship (can be null)pageSize
- The maximum number of relationships returned (can be null for
all relationships)pageNumber
- The offset (in pageSize chunks) from the start of the result
set (0 - based)orderHints
- Properties to order bypropertyPaths
- Properties to initialize in the returned entities, following
the syntax described in
IBeanInitializer.initialize(Object, List)
direction
- specifies the direction of the relationshippublic java.util.List<TaxonRelationship> getTaxonRelationships(Taxon taxon, java.util.Set<TaxonRelationshipType> types, boolean includeUnpublished, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths, RelationshipBase.Direction direction)
getTaxonRelationships
in interface ITaxonDao
public java.util.List<Synonym> getSynonyms(Taxon taxon, SynonymType type, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
ITaxonDao
getSynonyms
in interface ITaxonDao
taxon
- The accepted taxontype
- The type of synonym (can be null)pageSize
- The maximum number of synonyms returned (can be null for all synonyms)pageNumber
- The offset (in pageSize chunks) from the start of the result set (0 - based)
* @param orderHints Properties to order bypropertyPaths
- Properties to initialize in the returned entities, following the syntax described in IBeanInitializer.initialize(Object, List)
List
of Synonym
instancespublic void rebuildIndex()
ISearchableDao
rebuildIndex
in interface ISearchableDao<TaxonBase>
rebuildIndex
in class IdentifiableDaoBase<TaxonBase>
public java.lang.String suggestQuery(java.lang.String queryString)
ISearchableDao
suggestQuery
in interface ISearchableDao<TaxonBase>
suggestQuery
in class IdentifiableDaoBase<TaxonBase>
queryString
- Query string to checkpublic Taxon acceptedTaxonFor(Synonym synonym, Classification classificationFilter, java.util.List<java.lang.String> propertyPaths)
ITaxonDao
acceptedTaxonFor
in interface ITaxonDao
ITaxonDao.countAcceptedTaxonFor(Synonym, Classification)
public long countAcceptedTaxonFor(Synonym synonym, Classification classificationFilter)
ITaxonDao
countAcceptedTaxonFor
in interface ITaxonDao
#acceptedTaxonFor(Synonym, Classification, Integer, Integer, List, List)
public TaxonBase find(LSID lsid)
IIdentifiableDao
find
in interface IIdentifiableDao<TaxonBase>
find
in class IdentifiableDaoBase<TaxonBase>
lsid
- a LifeScience Identifier identifying the desired objectpublic java.util.List<java.lang.String> taxaByNameNotInDB(java.util.List<java.lang.String> taxonNames)
taxaByNameNotInDB
in interface ITaxonDao
public java.util.Map<java.lang.String,java.util.Map<java.util.UUID,java.util.Set<TaxonName>>> findIdenticalNames(java.util.List<java.util.UUID> sourceRefUuids, java.util.List<java.lang.String> propertyPaths)
ITaxonDao
findIdenticalNames
in interface ITaxonDao
public long countTaxaByCommonName(java.lang.String searchString, Classification classification, MatchMode matchMode, java.util.Set<NamedArea> namedAreas)
countTaxaByCommonName
in interface ITaxonDao
public java.util.List<UuidAndTitleCache<Taxon>> getTaxaByCommonNameForEditor(java.lang.String titleSearchStringSqlized, Classification classification, MatchMode matchMode, java.util.Set<NamedArea> namedAreas)
getTaxaByCommonNameForEditor
in interface ITaxonDao
public <S extends TaxonBase> long countByIdentifier(java.lang.Class<S> clazz, java.lang.String identifier, DefinedTerm identifierType, TaxonNode subtreeFilter, MatchMode matchmode)
ITaxonDao
countByIdentifier
in interface ITaxonDao
ITaxonDao.countByIdentifier(java.lang.Class, java.lang.String, eu.etaxonomy.cdm.model.term.DefinedTerm, eu.etaxonomy.cdm.model.taxon.TaxonNode, eu.etaxonomy.cdm.persistence.query.MatchMode)
public <S extends TaxonBase> java.util.List<java.lang.Object[]> findByIdentifier(java.lang.Class<S> clazz, java.lang.String identifier, DefinedTerm identifierType, TaxonNode subtreeFilter, MatchMode matchmode, boolean includeEntity, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
findByIdentifier
in interface ITaxonDao
public <S extends TaxonBase> long countByMarker(java.lang.Class<S> clazz, MarkerType markerType, java.lang.Boolean markerValue, TaxonNode subtreeFilter)
countByMarker
in interface ITaxonDao
countByIdentifier(Class, String, DefinedTerm, TaxonNode, MatchMode)
public <S extends TaxonBase> java.util.List<java.lang.Object[]> findByMarker(java.lang.Class<S> clazz, MarkerType markerType, java.lang.Boolean markerValue, TaxonNode subtreeFilter, boolean includeEntity, TaxonTitleType titleType, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<java.lang.String> propertyPaths)
findByMarker
in interface ITaxonDao
public long countTaxonRelationships(java.util.Set<TaxonRelationshipType> types)
countTaxonRelationships
in interface ITaxonDao
public java.util.List<TaxonRelationship> getTaxonRelationships(java.util.Set<TaxonRelationshipType> types, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
getTaxonRelationships
in interface ITaxonDao
public java.util.List<UuidAndTitleCache<TaxonBase>> getUuidAndTitleCache(java.lang.Integer limit, java.lang.String pattern)
IIdentifiableDao
UuidAndTitleCache
object.
Retrieving this list is considered to be significantly faster than initializing the fully fledged buiseness
objects. To be used in cases where you want to present large amount of data and provide details after
a selection has been made.getUuidAndTitleCache
in interface IIdentifiableDao<TaxonBase>
getUuidAndTitleCache
in class IdentifiableDaoBase<TaxonBase>
UuidAndTitleCache
instancesIIdentifiableDao.getUuidAndTitleCache(Class, Integer, String)
protected java.util.List<UuidAndTitleCache<TaxonBase>> getUuidAndTitleCache(org.hibernate.Query query)
getUuidAndTitleCache
in class IdentifiableDaoBase<TaxonBase>
Copyright © 2007-2020 EDIT. All Rights Reserved.