eu.etaxonomy.cdm.persistence.dao.common
Interface IIdentifiableDao<T extends IdentifiableEntity>

All Superinterfaces:
IAnnotatableDao<T>, ICdmEntityDao<T>, ISearchableDao<T>, ITitledDao<T>, IVersionableDao<T>
All Known Subinterfaces:
IAgentDao, IClassificationDao, ICollectionDao, IDefinedTermDao, IDescriptionDao, IFeatureTreeDao, IMediaDao, IOccurrenceDao, IPolytomousKeyDao, IReferenceDao, ITaxonDao, ITaxonNameDao, ITermVocabularyDao
All Known Implementing Classes:
AgentDaoImpl, ClassificationDaoHibernateImpl, CollectionDaoHibernateImpl, DefinedTermDaoImpl, DescriptionDaoImpl, FeatureTreeDaoImpl, IdentifiableDaoBase, MediaDaoHibernateImpl, OccurrenceDaoHibernateImpl, PolytomousKeyDaoImpl, ReferenceDaoHibernateImpl, TaxonDaoHibernateImpl, TaxonNameDaoHibernateImpl, TermVocabularyDaoImpl

public interface IIdentifiableDao<T extends IdentifiableEntity>
extends IAnnotatableDao<T>, ITitledDao<T>, ISearchableDao<T>


Method Summary
 int countByReferenceTitle(Class<? extends T> clazz, String queryString, MatchMode matchmode, List<org.hibernate.criterion.Criterion> criteria)
          Return a count of objects matching the given query string in the title, optionally filtered by class, optionally with a particular MatchMode
 int countByTitle(Class<? extends T> clazz, String queryString, MatchMode matchmode, List<org.hibernate.criterion.Criterion> criteria)
          Return a count of objects matching the given query string in the titleCache, optionally filtered by class, optionally with a particular MatchMode
 int countRights(T identifiableEntity)
          Return a count of the rights for this identifiable entity
 int countSources(T identifiableEntity)
          Return a count of the sources for this identifiable entity
 Long countTitleCache(Class<? extends T> clazz, String queryString, MatchMode matchMode)
          Return a count of distinct titleCache Strings for a given IdentifiableEntity, optionally filtered by class, optionally with a particular MatchMode
 T find(LSID lsid)
          Return an object by LSID.
 List<T> findByReferenceTitle(Class<? extends T> clazz, String queryString, MatchMode matchmode, List<org.hibernate.criterion.Criterion> criteria, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          Return a List of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
 List<T> findByTitle(Class<? extends T> clazz, String queryString, MatchMode matchmode, List<org.hibernate.criterion.Criterion> criteria, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          Return a List of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode
 List<T> findOriginalSourceByIdInSource(String idInSource, String idNamespace)
           
 List<T> findTitleCache(Class<? extends T> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, MatchMode matchMode)
          TODO
 List<Rights> getRights(T identifiableEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Return a List of the rights for this identifiable entity
 List<IdentifiableSource> getSources(T identifiableEntity, Integer pageSize, Integer pageNumber, List<String> propertyPaths)
          Return a List of the sources for this identifiable entity
 List<UuidAndTitleCache<T>> getUuidAndTitleCache()
          Return a list of all uuids mapped to titleCache in the convenient UuidAndTitleCache object.
 
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

find

T find(LSID lsid)
Return an object by LSID. NOTE: Because of the fact that LSIDs are supposed to be globally resolvable, this method behaves in a different way to other methods In short, it attempts to find an object of type T in the current view using the LSID passed. If the LSID passed has a revision part, then this will be used in the query, but if not, then it is expected that the request is for the 'current' version of the object and the revision part will not be used as a matching criteria in the query. If the object does not appear in the current view (i.e. it has been deleted), then this method will search the history tables for a match, again using the revision if it exists, but ignoring it if not.

Parameters:
lsid - a LifeScience Identifier identifying the desired object

countSources

int countSources(T identifiableEntity)
Return a count of the sources for this identifiable entity

Parameters:
identifiableEntity - The identifiable entity
Returns:
a count of OriginalSource instances

getSources

List<IdentifiableSource> getSources(T identifiableEntity,
                                    Integer pageSize,
                                    Integer pageNumber,
                                    List<String> propertyPaths)
Return a List of the sources for this identifiable entity

Parameters:
identifiableEntity - The identifiable entity
pageSize - The maximum number of sources returned (can be null for all sources)
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 OriginalSource instances

countRights

int countRights(T identifiableEntity)
Return a count of the rights for this identifiable entity

Parameters:
identifiableEntity - The identifiable entity
Returns:
a count of Rights instances

getRights

List<Rights> getRights(T identifiableEntity,
                       Integer pageSize,
                       Integer pageNumber,
                       List<String> propertyPaths)
Return a List of the rights for this identifiable entity

Parameters:
identifiableEntity - The identifiable entity
pageSize - The maximum number of rights returned (can be null for all rights)
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 Rights instances

findOriginalSourceByIdInSource

List<T> findOriginalSourceByIdInSource(String idInSource,
                                       String idNamespace)

getUuidAndTitleCache

List<UuidAndTitleCache<T>> getUuidAndTitleCache()
Return a list of all uuids mapped to titleCache in the convenient 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.

Returns:
a list of UuidAndTitleCache instances

findByTitle

List<T> findByTitle(Class<? extends T> clazz,
                    String queryString,
                    MatchMode matchmode,
                    List<org.hibernate.criterion.Criterion> criteria,
                    Integer pageSize,
                    Integer pageNumber,
                    List<OrderHint> orderHints,
                    List<String> propertyPaths)
Return a List of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode

Parameters:
clazz - filter by class - can be null to include all instances of type T
queryString - the query string to filter by
matchmode - use a particular type of matching (can be null - defaults to exact matching)
criteria - extra restrictions to apply
pageSize - The maximum number of rights returned (can be null for all rights)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
propertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
orderHints - Supports path like orderHints.propertyNames which include *-to-one properties like createdBy.username or authorTeam.persistentTitleCache
Returns:
a List of instances of type T matching the queryString

findTitleCache

List<T> findTitleCache(Class<? extends T> clazz,
                       String queryString,
                       Integer pageSize,
                       Integer pageNumber,
                       List<OrderHint> orderHints,
                       MatchMode matchMode)
TODO

Parameters:
clazz -
queryString -
pageSize -
pageNumber -
orderHints -
matchMode -
Returns:

findByReferenceTitle

List<T> findByReferenceTitle(Class<? extends T> clazz,
                             String queryString,
                             MatchMode matchmode,
                             List<org.hibernate.criterion.Criterion> criteria,
                             Integer pageSize,
                             Integer pageNumber,
                             List<OrderHint> orderHints,
                             List<String> propertyPaths)
Return a List of objects matching the given query string, optionally filtered by class, optionally with a particular MatchMode

Parameters:
clazz - filter by class - can be null to include all instances of type T
queryString - the query string to filter by
matchmode - use a particular type of matching (can be null - defaults to exact matching)
criteria - extra restrictions to apply
pageSize - The maximum number of rights returned (can be null for all rights)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
propertyPaths - properties to initialize - see IBeanInitializer.initialize(Object, List)
orderHints - Supports path like orderHints.propertyNames which include *-to-one properties like createdBy.username or authorTeam.persistentTitleCache
Returns:
a List of instances of type T matching the queryString

countByTitle

int countByTitle(Class<? extends T> clazz,
                 String queryString,
                 MatchMode matchmode,
                 List<org.hibernate.criterion.Criterion> criteria)
Return a count of objects matching the given query string in the titleCache, optionally filtered by class, optionally with a particular MatchMode

Parameters:
clazz - filter by class - can be null to include all instances of type T
queryString - the query string to filter by
matchmode - use a particular type of matching (can be null - defaults to exact matching)
criteria - extra restrictions to apply
Returns:
a count of instances of type T matching the queryString

countByReferenceTitle

int countByReferenceTitle(Class<? extends T> clazz,
                          String queryString,
                          MatchMode matchmode,
                          List<org.hibernate.criterion.Criterion> criteria)
Return a count of objects matching the given query string in the title, optionally filtered by class, optionally with a particular MatchMode

Parameters:
clazz - filter by class - can be null to include all instances of type T
queryString - the query string to filter by
matchmode - use a particular type of matching (can be null - defaults to exact matching)
criteria - extra restrictions to apply
Returns:
a count of instances of type T matching the queryString

countTitleCache

Long countTitleCache(Class<? extends T> clazz,
                     String queryString,
                     MatchMode matchMode)
Return a count of distinct titleCache Strings for a given IdentifiableEntity, optionally filtered by class, optionally with a particular MatchMode

Parameters:
clazz - filter by class - can be null to include all instances of type T
queryString - the query string to filter by
matchmode - use a particular type of matching (can be null - defaults to exact matching)
Returns:
a count of instances of type T matching the queryString


Copyright © 2007-2013 EDIT. All Rights Reserved.