eu.etaxonomy.cdm.api.service
Class ReferenceServiceImpl

java.lang.Object
  extended by eu.etaxonomy.cdm.api.service.ServiceBase<T,DAO>
      extended by eu.etaxonomy.cdm.api.service.VersionableServiceBase<T,DAO>
          extended by eu.etaxonomy.cdm.api.service.AnnotatableServiceBase<T,DAO>
              extended by eu.etaxonomy.cdm.api.service.IdentifiableServiceBase<Reference,IReferenceDao>
                  extended by eu.etaxonomy.cdm.api.service.ReferenceServiceImpl
All Implemented Interfaces:
IAnnotatableService<Reference>, IIdentifiableEntityService<Reference>, IReferenceService, IService<Reference>, IVersionableService<Reference>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Service
@Transactional(readOnly=true)
public class ReferenceServiceImpl
extends IdentifiableServiceBase<Reference,IReferenceDao>
implements IReferenceService


Field Summary
 
Fields inherited from class eu.etaxonomy.cdm.api.service.IdentifiableServiceBase
commonService, UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
 
Fields inherited from class eu.etaxonomy.cdm.api.service.ServiceBase
appContext, dao
 
Constructor Summary
ReferenceServiceImpl()
          Constructor
 
Method Summary
 List<Reference> getAllNomenclaturalReferences()
          TODO candidate for harmonization: rename to listNomenclaturalReferences
 List<Reference> getAllReferencesForPublishing()
          TODO candidate for harmonization: rename to listForPublishing
 List<UuidAndTitleCache<Reference>> getUuidAndTitle()
          Returns a map that holds uuid, titleCache pairs of all references in the current database
 List<TaxonBase> listCoveredTaxa(Reference reference, boolean includeSubordinateReferences, List<String> propertyPaths)
          returns all taxa directly covered by this reference all taxa covered by the according in references of this reference searches for taxa using the following relations: taxon.name.nomenclaturalreference taxon.descriptions.descriptionElement.sources.citation taxon.descriptions.descriptionSources taxon.name.descriptions.descriptionElement.sources taxon.name.descriptions.descriptionSources
protected  void setDao(IReferenceDao dao)
           
 void updateTitleCache(Class<? extends Reference> clazz, Integer stepSize, IIdentifiableEntityCacheStrategy<Reference> cacheStrategy, IProgressMonitor monitor)
          (Re-)generate the title caches for all objects of this concrete IdentifiableEntity class
 
Methods inherited from class eu.etaxonomy.cdm.api.service.IdentifiableServiceBase
countByTitle, countByTitle, deduplicate, find, findByTitle, findByTitle, findCdmObjectsByTitle, findCdmObjectsByTitle, findCdmObjectsByTitle, findTitleCache, getRights, getSourcedObjectByIdInSource, getSources, getUuidAndTitleCache, listByReferenceTitle, listByTitle, replace, search, setOtherCachesNull, updateTitleCache, updateTitleCacheImpl
 
Methods inherited from class eu.etaxonomy.cdm.api.service.AnnotatableServiceBase
countMarkers, getAnnotations, getMarkers, groupMarkers
 
Methods inherited from class eu.etaxonomy.cdm.api.service.VersionableServiceBase
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
 
Methods inherited from class eu.etaxonomy.cdm.api.service.ServiceBase
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, setApplicationContext, update
 
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.api.service.IReferenceService
search
 
Methods inherited from interface eu.etaxonomy.cdm.api.service.IIdentifiableEntityService
countByTitle, countByTitle, deduplicate, find, findByTitle, findByTitle, findTitleCache, getRights, getSourcedObjectByIdInSource, getSources, getUuidAndTitleCache, listByReferenceTitle, listByTitle, replace, updateTitleCache
 
Methods inherited from interface eu.etaxonomy.cdm.api.service.IAnnotatableService
countMarkers, getAnnotations, getMarkers, groupMarkers
 
Methods inherited from interface eu.etaxonomy.cdm.api.service.IVersionableService
getNextAuditEvent, getPreviousAuditEvent, pageAuditEvents, pageAuditEvents
 
Methods inherited from interface eu.etaxonomy.cdm.api.service.IService
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, update
 

Constructor Detail

ReferenceServiceImpl

public ReferenceServiceImpl()
Constructor

Method Detail

updateTitleCache

@Transactional(readOnly=false)
public void updateTitleCache(Class<? extends Reference> clazz,
                                           Integer stepSize,
                                           IIdentifiableEntityCacheStrategy<Reference> cacheStrategy,
                                           IProgressMonitor monitor)
Description copied from interface: IIdentifiableEntityService
(Re-)generate the title caches for all objects of this concrete IdentifiableEntity class

Specified by:
updateTitleCache in interface IIdentifiableEntityService<Reference>
Parameters:
clazz - class of objects to be updated
stepSize - number of objects loaded per step. If null use default.
cacheStrategy - cachestrategy used for title cache. If null use default.
monitor - progress monitor. If null use default.

setDao

@Autowired
protected void setDao(IReferenceDao dao)
Specified by:
setDao in class ServiceBase<Reference,IReferenceDao>

getUuidAndTitle

public List<UuidAndTitleCache<Reference>> getUuidAndTitle()
Description copied from interface: IReferenceService
Returns a map that holds uuid, titleCache pairs of all references in the current database

Specified by:
getUuidAndTitle in interface IReferenceService
Returns:
a Map containing uuid and titleCache of references

getAllReferencesForPublishing

public List<Reference> getAllReferencesForPublishing()
Description copied from interface: IReferenceService
TODO candidate for harmonization: rename to listForPublishing

Specified by:
getAllReferencesForPublishing in interface IReferenceService
Returns:

getAllNomenclaturalReferences

public List<Reference> getAllNomenclaturalReferences()
Description copied from interface: IReferenceService
TODO candidate for harmonization: rename to listNomenclaturalReferences

Specified by:
getAllNomenclaturalReferences in interface IReferenceService
Returns:

listCoveredTaxa

public List<TaxonBase> listCoveredTaxa(Reference reference,
                                       boolean includeSubordinateReferences,
                                       List<String> propertyPaths)
Description copied from interface: IReferenceService
returns
  1. all taxa directly covered by this reference
  2. all taxa covered by the according in references of this reference
searches for taxa using the following relations:

Specified by:
listCoveredTaxa in interface IReferenceService
includeSubordinateReferences - TODO
Returns:


Copyright © 2007-2013 EDIT. All Rights Reserved.