Class BioSequenceDaoImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractDao<O>
-
- ubic.gemma.persistence.service.AbstractVoEnabledDao<BioSequence,BioSequenceValueObject>
-
- ubic.gemma.persistence.service.genome.biosequence.BioSequenceDaoImpl
-
- All Implemented Interfaces:
BaseDao<BioSequence>
,BaseVoEnabledDao<BioSequence,BioSequenceValueObject>
,BioSequenceDao
@Repository public class BioSequenceDaoImpl extends AbstractVoEnabledDao<BioSequence,BioSequenceValueObject> implements BioSequenceDao
- Author:
- pavlidis
- See Also:
BioSequence
-
-
Field Summary
-
Fields inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
REPORT_SLOW_QUERY_AFTER_MS
-
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
log
-
-
Constructor Summary
Constructors Constructor Description BioSequenceDaoImpl(SessionFactory sessionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BioSequenceValueObject
doLoadValueObject(BioSequence entity)
Load a value object for a given entity.BioSequence
find(BioSequence bioSequence)
Does a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property).BioSequence
findByAccession(DatabaseEntry databaseEntry)
BioSequence
findByCompositeSequence(CompositeSequence compositeSequence)
Map<Gene,Collection<BioSequence>>
findByGenes(Collection<Gene> genes)
Returns matching biosequences for the given genes in a Map (gene to biosequences).Collection<BioSequence>
findByName(String name)
Collection<Gene>
getGenesByAccession(String search)
Collection<Gene>
getGenesByName(String search)
For a biosequence name, get the genesCollection<BioSequence>
thaw(Collection<BioSequence> bioSequences)
BioSequence
thaw(BioSequence bioSequence)
-
Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds, postProcessValueObjects
-
Methods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, create, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, remove, save, save, streamAll, streamAll, streamQuery, 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.BaseDao
countAll, create, create, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, remove, save, save, streamAll, streamAll, update, update
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
-
-
-
Constructor Detail
-
BioSequenceDaoImpl
@Autowired public BioSequenceDaoImpl(SessionFactory sessionFactory)
-
-
Method Detail
-
findByAccession
public BioSequence findByAccession(DatabaseEntry databaseEntry)
- Specified by:
findByAccession
in interfaceBioSequenceDao
-
findByGenes
public Map<Gene,Collection<BioSequence>> findByGenes(Collection<Gene> genes)
Description copied from interface:BioSequenceDao
Returns matching biosequences for the given genes in a Map (gene to biosequences). Genes which had no associated sequences are not included in the result.
- Specified by:
findByGenes
in interfaceBioSequenceDao
- Parameters:
genes
- genes- Returns:
- map to biosequences
-
findByName
public Collection<BioSequence> findByName(String name)
- Specified by:
findByName
in interfaceBioSequenceDao
-
getGenesByAccession
public Collection<Gene> getGenesByAccession(String search)
- Specified by:
getGenesByAccession
in interfaceBioSequenceDao
-
getGenesByName
public Collection<Gene> getGenesByName(String search)
Description copied from interface:BioSequenceDao
For a biosequence name, get the genes- Specified by:
getGenesByName
in interfaceBioSequenceDao
- Parameters:
search
- name- Returns:
- genes
-
thaw
public Collection<BioSequence> thaw(Collection<BioSequence> bioSequences)
- Specified by:
thaw
in interfaceBioSequenceDao
-
thaw
public BioSequence thaw(BioSequence bioSequence)
- Specified by:
thaw
in interfaceBioSequenceDao
-
findByCompositeSequence
public BioSequence findByCompositeSequence(CompositeSequence compositeSequence)
- Specified by:
findByCompositeSequence
in interfaceBioSequenceDao
-
doLoadValueObject
protected BioSequenceValueObject doLoadValueObject(BioSequence entity)
Description copied from class:AbstractVoEnabledDao
Load a value object for a given entity.This should be fast and efficient, and avoid any database query or post-processing. If you need to perform additional queries, implement
AbstractVoEnabledDao.postProcessValueObjects(List)
instead.- Specified by:
doLoadValueObject
in classAbstractVoEnabledDao<BioSequence,BioSequenceValueObject>
-
find
public BioSequence find(BioSequence bioSequence)
Description copied from interface:BaseDao
Does a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property).- Specified by:
find
in interfaceBaseDao<BioSequence>
- Overrides:
find
in classAbstractDao<BioSequence>
- Parameters:
bioSequence
- the entity to look for.- Returns:
- an entity that was found in the persistent storage, or null if no such entity was found.
-
-