Class BibliographicReferenceServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<BibliographicReference>
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:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
Constructor Summary
ConstructorsConstructorDescriptionBibliographicReferenceServiceImpl
(BibliographicReferenceDao bibliographicReferenceDao) -
Method Summary
Modifier and TypeMethodDescriptionvoid
browse
(int start, int limit) long
Get a reference by the unqualified external id.findByExternalId
(String id, String databaseName) Retrieve a reference by identifier, qualified by the database name (such as 'pubmed').findByExternalId
(DatabaseEntry accession) Get a reference by the unqualified external id.getAllExperimentLinkedReferences
(int offset, int limit) Return all the BibRefs that are linked to ExpressionExperiments.Get the ExpressionExperiments, if any, that are linked to the given reference.listAll()
Loads value objects representing all the entities of specific type.search
(SearchSettingsValueObject settings) thaw
(Collection<BibliographicReference> bibliographicReferences) thaw
(BibliographicReference bibliographicReference) 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, streamAll, streamAll, 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, streamAll, streamAll
Methods inherited from interface ubic.gemma.persistence.service.BaseService
save, save, update, update
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 Details
-
BibliographicReferenceServiceImpl
@Autowired public BibliographicReferenceServiceImpl(BibliographicReferenceDao bibliographicReferenceDao)
-
-
Method Details
-
afterPropertiesSet
- 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:
-
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
- 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
Description copied from interface:BibliographicReferenceService
Get a reference by the unqualified external id.- Specified by:
findByExternalId
in interfaceBibliographicReferenceService
- Parameters:
id
- id- Returns:
- reference
-
findByExternalId
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:
-
countExperimentLinkedReferences
@Transactional(readOnly=true) public long countExperimentLinkedReferences()- Specified by:
countExperimentLinkedReferences
in interfaceBibliographicReferenceService
-
getAllExperimentLinkedReferences
@Transactional(readOnly=true) public Map<BibliographicReference,Set<ExpressionExperiment>> getAllExperimentLinkedReferences(int offset, int limit) 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
- Specified by:
listAll
in interfaceBibliographicReferenceService
- Returns:
- all the IDs of bibliographic references in the system.
-
refresh
- 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
-