Class BibliographicReferenceServiceImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractService<O>
-
- ubic.gemma.persistence.service.AbstractVoEnabledService<BibliographicReference,BibliographicReferenceValueObject>
-
- ubic.gemma.persistence.service.common.description.BibliographicReferenceServiceImpl
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,BaseImmutableService<BibliographicReference>
,BaseReadOnlyService<BibliographicReference>
,BaseService<BibliographicReference>
,BaseVoEnabledService<BibliographicReference,BibliographicReferenceValueObject>
,BibliographicReferenceService
@Service @ParametersAreNonnullByDefault public class BibliographicReferenceServiceImpl extends AbstractVoEnabledService<BibliographicReference,BibliographicReferenceValueObject> implements BibliographicReferenceService, org.springframework.beans.factory.InitializingBean
Implementation of BibliographicReferenceService. Note: This is only in Core because it uses SearchService, but it could be refactored.- Author:
- keshav
- See Also:
BibliographicReferenceService
-
-
Field Summary
-
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
-
Constructor Summary
Constructors Constructor Description BibliographicReferenceServiceImpl(BibliographicReferenceDao bibliographicReferenceDao)
-
Method Summary
-
Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledService
loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Methods inherited from class ubic.gemma.persistence.service.AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, remove, remove, remove, save, save, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.persistence.service.BaseImmutableService
create, remove, remove
-
Methods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledService
loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Methods inherited from interface ubic.gemma.persistence.service.common.description.BibliographicReferenceService
create, find, findOrCreate, remove
-
-
-
-
Constructor Detail
-
BibliographicReferenceServiceImpl
@Autowired public BibliographicReferenceServiceImpl(BibliographicReferenceDao bibliographicReferenceDao)
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
loadValueObject
@Transactional(readOnly=true) public BibliographicReferenceValueObject loadValueObject(BibliographicReference entity)
- Specified by:
loadValueObject
in interfaceBaseVoEnabledService<BibliographicReference,BibliographicReferenceValueObject>
- Overrides:
loadValueObject
in classAbstractVoEnabledService<BibliographicReference,BibliographicReferenceValueObject>
- See Also:
BaseVoEnabledDao.loadValueObject(Identifiable)
-
loadAllValueObjects
@Transactional(readOnly=true) public List<BibliographicReferenceValueObject> loadAllValueObjects()
Description copied from interface:BaseVoEnabledService
Loads value objects representing all the entities of specific type.- Specified by:
loadAllValueObjects
in interfaceBaseVoEnabledService<BibliographicReference,BibliographicReferenceValueObject>
- Overrides:
loadAllValueObjects
in classAbstractVoEnabledService<BibliographicReference,BibliographicReferenceValueObject>
- Returns:
- a collection of value objects
-
browse
@Transactional(readOnly=true) public List<BibliographicReference> browse(int start, int limit)
- Specified by:
browse
in interfaceBibliographicReferenceService
-
browse
@Transactional(readOnly=true) public List<BibliographicReference> browse(int start, int limit, String orderField, boolean descending)
- Specified by:
browse
in interfaceBibliographicReferenceService
-
findByExternalId
@Transactional(readOnly=true) public BibliographicReference findByExternalId(DatabaseEntry accession)
- Specified by:
findByExternalId
in interfaceBibliographicReferenceService
-
findByExternalId
@Transactional public BibliographicReference findByExternalId(String id)
Description copied from interface:BibliographicReferenceService
Get a reference by the unqualified external id.- Specified by:
findByExternalId
in interfaceBibliographicReferenceService
- Parameters:
id
- id- Returns:
- reference
-
findByExternalId
@Transactional public BibliographicReference findByExternalId(String id, String databaseName)
Description copied from interface:BibliographicReferenceService
Retrieve a reference by identifier, qualified by the database name (such as 'pubmed').- Specified by:
findByExternalId
in interfaceBibliographicReferenceService
- Parameters:
id
- iddatabaseName
- db name- Returns:
- reference
-
findVOByExternalId
@Transactional(readOnly=true) public BibliographicReferenceValueObject findVOByExternalId(String id)
Description copied from interface:BibliographicReferenceService
Get a reference by the unqualified external id. Searches for pubmed by default
- Specified by:
findVOByExternalId
in interfaceBibliographicReferenceService
- Parameters:
id
- id- Returns:
- reference VO
- See Also:
BibliographicReferenceService.findVOByExternalId(String)
-
getAllExperimentLinkedReferences
@Transactional public Map<ExpressionExperiment,BibliographicReference> getAllExperimentLinkedReferences()
Description copied from interface:BibliographicReferenceService
Return all the BibRefs that are linked to ExpressionExperiments.- Specified by:
getAllExperimentLinkedReferences
in interfaceBibliographicReferenceService
- Returns:
- all references with EEs
-
getRelatedExperiments
@Transactional(readOnly=true) public Collection<ExpressionExperiment> getRelatedExperiments(BibliographicReference bibRef)
Description copied from interface:BibliographicReferenceService
Get the ExpressionExperiments, if any, that are linked to the given reference.- Specified by:
getRelatedExperiments
in interfaceBibliographicReferenceService
- Parameters:
bibRef
- reference- Returns:
- datasets
-
getRelatedExperiments
@Transactional(readOnly=true) public Map<BibliographicReference,Collection<ExpressionExperiment>> getRelatedExperiments(Collection<BibliographicReference> records)
- Specified by:
getRelatedExperiments
in interfaceBibliographicReferenceService
-
listAll
@Transactional(readOnly=true) public Collection<Long> listAll()
- Specified by:
listAll
in interfaceBibliographicReferenceService
- Returns:
- all the IDs of bibliographic references in the system.
-
refresh
@Transactional public BibliographicReference refresh(String pubMedId)
- Specified by:
refresh
in interfaceBibliographicReferenceService
-
search
@Transactional(readOnly=true) public List<BibliographicReferenceValueObject> search(SearchSettingsValueObject settings) throws SearchException
- Specified by:
search
in interfaceBibliographicReferenceService
- Throws:
SearchException
-
search
@Transactional(readOnly=true) public List<BibliographicReferenceValueObject> search(String query) throws SearchException
- Specified by:
search
in interfaceBibliographicReferenceService
- Throws:
SearchException
-
thaw
@Transactional(readOnly=true) public BibliographicReference thaw(BibliographicReference bibliographicReference)
- Specified by:
thaw
in interfaceBibliographicReferenceService
-
thaw
@Transactional(readOnly=true) public Collection<BibliographicReference> thaw(Collection<BibliographicReference> bibliographicReferences)
- Specified by:
thaw
in interfaceBibliographicReferenceService
-
-