eu.etaxonomy.cdm.persistence.dao.hibernate.common
Class TermVocabularyDaoImpl

java.lang.Object
  extended by eu.etaxonomy.cdm.persistence.dao.hibernate.common.DaoBase
      extended by eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase<T>
          extended by eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase<T>
              extended by eu.etaxonomy.cdm.persistence.dao.hibernate.common.AnnotatableDaoImpl<T>
                  extended by eu.etaxonomy.cdm.persistence.dao.hibernate.common.IdentifiableDaoBase<TermVocabulary>
                      extended by eu.etaxonomy.cdm.persistence.dao.hibernate.common.TermVocabularyDaoImpl
All Implemented Interfaces:
IAnnotatableDao<TermVocabulary>, ICdmEntityDao<TermVocabulary>, IIdentifiableDao<TermVocabulary>, ISearchableDao<TermVocabulary>, ITermVocabularyDao, ITitledDao<TermVocabulary>, IVersionableDao<TermVocabulary>

@Repository
public class TermVocabularyDaoImpl
extends IdentifiableDaoBase<TermVocabulary>
implements ITermVocabularyDao

Author:
a.mueller

Field Summary
 
Fields inherited from class eu.etaxonomy.cdm.persistence.dao.hibernate.common.IdentifiableDaoBase
defaultField, indexedClasses
 
Fields inherited from class eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase
defaultBeanInitializer, flushAfterNo, type, version
 
Constructor Summary
TermVocabularyDaoImpl()
           
 
Method Summary
 int countTerms(TermVocabulary termVocabulary)
          Return a count of terms that belong to the termVocabulary supplied
<T extends DefinedTermBase>
TermVocabulary<T>
findByUri(String termSourceUri, Class<T> clazz)
           
<T extends DefinedTermBase>
List<T>
getTerms(TermVocabulary<T> termVocabulary, Integer pageSize, Integer pageNumber)
          Return a List of terms that belong to the termVocabulary supplied
<T extends DefinedTermBase>
List<T>
getTerms(TermVocabulary<T> vocabulary, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)
          Return a List of terms that belong to the termVocabulary supplied
<TERM extends DefinedTermBase>
List<TermVocabulary<? extends TERM>>
listByTermClass(Class<TERM> clazz, boolean includeSubclasses, boolean includeEmptyVocs, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths)
          Returns term vocabularies that contain terms of a certain class e.g.
<TERM extends DefinedTermBase>
List<TermVocabulary<TERM>>
listByTermClass(Class<TERM> clazz, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths)
           
 List<TermVocabulary> listEmpty(Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths)
           
 
Methods inherited from class eu.etaxonomy.cdm.persistence.dao.hibernate.common.IdentifiableDaoBase
count, countByReferenceTitle, countByTitle, countByTitle, countByTitle, countByTitle, countRights, countSources, countTitleCache, find, findByReferenceTitle, findByTitle, findByTitle, findByTitle, findByTitle, findByTitleAndClass, findOriginalSourceByIdInSource, findTitleCache, getCredits, getRights, getSources, getUuidAndTitleCache, getUuidAndTitleCache, optimizeIndex, purgeIndex, rebuildIndex, search, suggestQuery
 
Methods inherited from class eu.etaxonomy.cdm.persistence.dao.hibernate.common.AnnotatableDaoImpl
countAnnotations, countMarkers, countMarkers, getAnnotations, getMarkers, groupMarkers
 
Methods inherited from class eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase
addCriteria, addOrder, checkNotInPriorView, count, count, count, countAuditEvents, countAuditEvents, countByParam, exists, findByParam, findByUuid, getAuditEventFromContext, getAuditEvents, getAuditEvents, getAuditReader, getNextAuditEvent, getPreviousAuditEvent, list, list, list, list, load, load
 
Methods inherited from class eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase
addCriteria, addExample, addGroups, addOrder, clear, countGroups, delete, findById, getSession, getType, group, list, list, list, list, listByIds, load, lock, merge, refresh, refresh, replace, rows, save, saveAll, saveCdmObj, saveOrUpdate, saveOrUpdateAll, setDefaultBeanInitializer, setPagingParameter, setPagingParameter, update
 
Methods inherited from class eu.etaxonomy.cdm.persistence.dao.hibernate.common.DaoBase
addOrder, flush, getSessionFactory, setSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Constructor Detail

TermVocabularyDaoImpl

public TermVocabularyDaoImpl()
Parameters:
type -
Method Detail

countTerms

public int countTerms(TermVocabulary termVocabulary)
Description copied from interface: ITermVocabularyDao
Return a count of terms that belong to the termVocabulary supplied

Specified by:
countTerms in interface ITermVocabularyDao
Parameters:
termVocabulary - The term vocabulary which 'owns' the terms of interest
Returns:
a count of terms

getTerms

public <T extends DefinedTermBase> List<T> getTerms(TermVocabulary<T> vocabulary,
                                                    Integer pageSize,
                                                    Integer pageNumber,
                                                    List<OrderHint> orderHints,
                                                    List<String> propertyPaths)
Description copied from interface: ITermVocabularyDao
Return a List of terms that belong to the termVocabulary supplied

Specified by:
getTerms in interface ITermVocabularyDao
pageSize - The maximum number of terms returned (can be null for all terms)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
orderHints - Supports path like orderHints.propertyNames which include *-to-one properties like createdBy.username or authorTeam.persistentTitleCache
propertyPaths - properties to be initialized
Returns:
a List of terms

findByUri

public <T extends DefinedTermBase> TermVocabulary<T> findByUri(String termSourceUri,
                                                               Class<T> clazz)
Specified by:
findByUri in interface ITermVocabularyDao

getTerms

public <T extends DefinedTermBase> List<T> getTerms(TermVocabulary<T> termVocabulary,
                                                    Integer pageSize,
                                                    Integer pageNumber)
Description copied from interface: ITermVocabularyDao
Return a List of terms that belong to the termVocabulary supplied

Specified by:
getTerms in interface ITermVocabularyDao
Parameters:
termVocabulary - The term vocabulary which 'owns' the terms of interest
pageSize - The maximum number of terms returned (can be null for all terms)
pageNumber - The offset (in pageSize chunks) from the start of the result set (0 - based)
Returns:
a List of terms

listByTermClass

public <TERM extends DefinedTermBase> List<TermVocabulary<TERM>> listByTermClass(Class<TERM> clazz,
                                                                                 Integer limit,
                                                                                 Integer start,
                                                                                 List<OrderHint> orderHints,
                                                                                 List<String> propertyPaths)

listByTermClass

public <TERM extends DefinedTermBase> List<TermVocabulary<? extends TERM>> listByTermClass(Class<TERM> clazz,
                                                                                           boolean includeSubclasses,
                                                                                           boolean includeEmptyVocs,
                                                                                           Integer limit,
                                                                                           Integer start,
                                                                                           List<OrderHint> orderHints,
                                                                                           List<String> propertyPaths)
Description copied from interface: ITermVocabularyDao
Returns term vocabularies that contain terms of a certain class e.g. Feature, Modifier, State.

Specified by:
listByTermClass in interface ITermVocabularyDao
Parameters:
clazz - the term class of the terms in the vocabulary
includeSubclasses - if true all subclasses of clazz will be included for computation of the result
includeEmptyVocs - if true all vocabularies that do not contain any term will be included in the result
limit - The maximum number of vocabularies returned (can be null for all vocabularies)
start - The offset from the start of the result set (0 - based, can be null - equivalent of starting at the beginning of the recordset)
orderHints - Supports path like orderHints.propertyNames which include *-to-one properties like createdBy.username or authorTeam.persistentTitleCache
propertyPaths - properties to be initialized
Returns:
a list of term vocabularies

listEmpty

public List<TermVocabulary> listEmpty(Integer limit,
                                      Integer start,
                                      List<OrderHint> orderHints,
                                      List<String> propertyPaths)
Specified by:
listEmpty in interface ITermVocabularyDao


Copyright © 2007-2013 EDIT. All Rights Reserved.