Class GeneDaoImpl
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,BaseDao<Gene>,BaseVoEnabledDao<Gene,,GeneValueObject> CachedFilteringDao<Gene>,CachedFilteringVoEnabledDao<Gene,,GeneValueObject> FilteringDao<Gene>,FilteringVoEnabledDao<Gene,,GeneValueObject> GeneDao
Gene.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer, AbstractFilteringVoEnabledDao.FilterablePropertyMeta -
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
REPORT_SLOW_QUERY_AFTER_MSFields inherited from class ubic.gemma.persistence.service.AbstractDao
logFields inherited from interface ubic.gemma.persistence.service.genome.GeneDao
OBJECT_ALIAS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GeneValueObjectdoLoadValueObject(Gene entity) Load a value object for a given entity.Does a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property).find(PhysicalLocation physicalLocation) Find all genes at a physical location.findByAccession(String accession, ExternalDatabase source) findByAlias(String search) Gets all the genes referred to by the alias defined by the search string.findByNcbiId(Integer ncbiId) findByNcbiIds(Collection<Integer> ncbiIds) Quickly load exact matches.findByOfficialName(String officialName) findByOfficialNameInexact(String officialName) findByOfficialSymbol(String officialSymbol) findByOfficialSymbol(String symbol, Taxon taxon) findByOfficialSymbolInexact(String officialSymbol) findByOfficialSymbols(Collection<String> query, Long taxonId) Quickly load exact matches.findByPhysicalLocation(PhysicalLocation location) longgetCompositeSequenceCount(Gene gene, boolean includeDummyProducts) Obtain the number of platform elements (e.g.longgetCompositeSequenceCountById(long id, boolean includeDummyProducts) Gets a count of the CompositeSequences related to the gene identified by the given id.getCompositeSequences(Gene gene, boolean includeDummyProducts) Get the composite sequences (e.g.getCompositeSequences(Gene gene, ArrayDesign arrayDesign, boolean includeDummyProducts) Get the composite sequences (e.g.getCompositeSequencesById(long id, boolean includeDummyProducts) Gets all the CompositeSequences related to the gene identified by the given id.protected QuerygetFilteringCountQuery(Filters filters) Produce a query that will be used to retrieve the size ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort).protected QuerygetFilteringQuery(Filters filters, Sort sort) Produce a query for retrieving value objects after applying a set of filters and a given ordering.getMicroRnaByTaxon(Taxon taxon) longgetPlatformCountById(Long id, boolean includeDummyProducts) protected voidinitializeCachedFilteringResult(Gene entity) Initialize a result fromAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)retrieved from the HibernateStandardQueryCache.loadKnownGenes(Taxon taxon) loadThawed(Collection<Long> ids) loadThawedLiter(Collection<Long> ids) protected voidpostProcessValueObjects(List<GeneValueObject> geneValueObjects) Post-process VOs in bulk.voidRemove a persistent instanceintthawAliases(Gene gene) Only thaw the Aliases, very light versionthawLite(Collection<Gene> genes) Methods inherited from class ubic.gemma.persistence.service.AbstractQueryFilteringVoEnabledDao
count, countWithCache, getEntityTransformer, getFilteringIdQuery, getValueObjectTransformer, load, load, loadIds, loadIdsWithCache, loadValueObjects, loadValueObjects, loadValueObjectsWithCache, loadValueObjectsWithCache, loadWithCache, loadWithCacheMethods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
afterPropertiesSet, configureFilterableProperties, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyMeta, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, resolveFilterablePropertyMeta, resolveFilterablePropertyMetaMethods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, create, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getEntityName, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, save, streamAll, streamAll, streamQuery, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, create, findOrCreate, getElementClass, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, save, streamAll, streamAll, update, updateMethods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from interface ubic.gemma.persistence.service.FilteringDao
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, load, load, loadIdsMethods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledDao
loadValueObjects, loadValueObjectsMethods inherited from interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
-
Constructor Details
-
GeneDaoImpl
-
-
Method Details
-
find
Description copied from interface:GeneDaoFind all genes at a physical location. All overlapping genes are returned. The location can be a point or a region. If strand is non-null, only genes on the same strand are returned. -
findByAccession
- Specified by:
findByAccessionin interfaceGeneDao
-
findByAlias
Gets all the genes referred to by the alias defined by the search string.- Specified by:
findByAliasin interfaceGeneDao- Parameters:
search- search string- Returns:
- Collection
-
findByEnsemblId
- Specified by:
findByEnsemblIdin interfaceGeneDao
-
findByNcbiId
- Specified by:
findByNcbiIdin interfaceGeneDao
-
findByOfficialSymbol
- Specified by:
findByOfficialSymbolin interfaceGeneDao
-
findByOfficialName
- Specified by:
findByOfficialNamein interfaceGeneDao
-
findByOfficialNameInexact
- Specified by:
findByOfficialNameInexactin interfaceGeneDao
-
findByOfficialSymbol
- Specified by:
findByOfficialSymbolin interfaceGeneDao
-
findByOfficialSymbolInexact
- Specified by:
findByOfficialSymbolInexactin interfaceGeneDao
-
findByOfficialSymbols
Description copied from interface:GeneDaoQuickly load exact matches.- Specified by:
findByOfficialSymbolsin interfaceGeneDao- Parameters:
query- querytaxonId- taxon id- Returns:
- map of gene symbol (toLowerCase()) to the gene. The actual query that led to the gene is not retained.
-
findByNcbiIds
Description copied from interface:GeneDaoQuickly load exact matches.- Specified by:
findByNcbiIdsin interfaceGeneDao- Parameters:
ncbiIds- ncbi ids- Returns:
- map of NCBI Id to the gene.
-
findByPhysicalLocation
- Specified by:
findByPhysicalLocationin interfaceGeneDao
-
getCompositeSequenceCount
Description copied from interface:GeneDaoObtain the number of platform elements (e.g. probes) associated to this gene, totalled up over all platforms.Note that ACLs are applied to the platforms.
- Specified by:
getCompositeSequenceCountin interfaceGeneDao- Parameters:
includeDummyProducts- if true, include platform elements related via dummyGeneProducts
-
getCompositeSequenceCountById
public long getCompositeSequenceCountById(long id, boolean includeDummyProducts) Gets a count of the CompositeSequences related to the gene identified by the given id.- Specified by:
getCompositeSequenceCountByIdin interfaceGeneDao- Returns:
- Collection
- See Also:
-
getCompositeSequences
public Collection<CompositeSequence> getCompositeSequences(Gene gene, ArrayDesign arrayDesign, boolean includeDummyProducts) Description copied from interface:GeneDaoGet the composite sequences (e.g. probes) associated with this gene via a particular platform.- Specified by:
getCompositeSequencesin interfaceGeneDao- Parameters:
arrayDesign- platform to restrict composite sequences toincludeDummyProducts- if true, include platform elements related via dummyGeneProducts
-
getCompositeSequences
Description copied from interface:GeneDaoGet the composite sequences (e.g. probes) associated with this gene, for any platform.- Specified by:
getCompositeSequencesin interfaceGeneDao- Parameters:
includeDummyProducts- if true, include platform elements related via dummyGeneProducts
-
getCompositeSequencesById
public Collection<CompositeSequence> getCompositeSequencesById(long id, boolean includeDummyProducts) Gets all the CompositeSequences related to the gene identified by the given id.- Specified by:
getCompositeSequencesByIdin interfaceGeneDao- Returns:
- Collection
- See Also:
-
getMicroRnaByTaxon
- Specified by:
getMicroRnaByTaxonin interfaceGeneDao- Parameters:
taxon- taxon- Returns:
- a collection of genes that are actually MicroRNA for a given taxon
-
getPlatformCountById
- Specified by:
getPlatformCountByIdin interfaceGeneDao- Parameters:
id- idincludeDummyProducts- include platforms related via dummyGeneProducts in the count- Returns:
- how many platforms have a representation of this gene
-
loadKnownGenes
- Specified by:
loadKnownGenesin interfaceGeneDao- Parameters:
taxon- taxon- Returns:
- a collection of genes for the specified taxon (not all genes, ie not probe aligned regions and predicted genes)
-
loadThawed
- Specified by:
loadThawedin interfaceGeneDao
-
loadThawedLiter
- Specified by:
loadThawedLiterin interfaceGeneDao
-
thaw
-
thawAliases
Only thaw the Aliases, very light version- Specified by:
thawAliasesin interfaceGeneDao
-
thawLite
-
thawLite
-
thawLiter
-
removeAll
public int removeAll() -
remove
Description copied from interface:BaseDaoRemove a persistent instance -
find
Description copied from interface:BaseDaoDoes a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property). -
doLoadValueObject
Description copied from class:AbstractVoEnabledDaoLoad 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:
doLoadValueObjectin classAbstractVoEnabledDao<Gene,GeneValueObject>
-
getFilteringQuery
Description copied from class:AbstractQueryFilteringVoEnabledDaoProduce a query for retrieving value objects after applying a set of filters and a given ordering.Note that if your implementation does not produce a
ListofAbstractQueryFilteringVoEnabledDaowhenQuery.list()is invoked, you must overrideAbstractQueryFilteringVoEnabledDao.getValueObjectTransformer().The make the cached query (i.e.
AbstractQueryFilteringVoEnabledDao.loadWithCache(Filters, Sort)behave the same, you also have to explicitly initialize any lazy relations inAbstractVoEnabledDao.doLoadValueObject(Identifiable)because the VO constructor will not initialize them.- Specified by:
getFilteringQueryin classAbstractQueryFilteringVoEnabledDao<Gene,GeneValueObject> - Parameters:
filters- seeFilterQueryUtils.formRestrictionClause(Filters)filters argument for description.- Returns:
- a Hibernated Query object ready to be used for TaxonVO retrieval.
-
initializeCachedFilteringResult
Description copied from class:AbstractQueryFilteringVoEnabledDaoInitialize a result fromAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)retrieved from the HibernateStandardQueryCache.Lazy-loaded relations that are fetched in
AbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)must be initialized manually in this method to ensure that the entity has all the expected fields if they are retrieved from the second-level cache.- Specified by:
initializeCachedFilteringResultin classAbstractQueryFilteringVoEnabledDao<Gene,GeneValueObject>
-
getFilteringCountQuery
Description copied from class:AbstractQueryFilteringVoEnabledDaoProduce a query that will be used to retrieve the size ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort).- Overrides:
getFilteringCountQueryin classAbstractQueryFilteringVoEnabledDao<Gene,GeneValueObject> - Returns:
- a
Querywhich must return a singleLongvalue
-
postProcessValueObjects
Description copied from class:AbstractVoEnabledDaoPost-process VOs in bulk.Use this as an opportunity to load extra informations that could not be populated in the initial
AbstractVoEnabledDao.doLoadValueObject(Identifiable)orAbstractVoEnabledDao.doLoadValueObjects(Collection)- Overrides:
postProcessValueObjectsin classAbstractVoEnabledDao<Gene,GeneValueObject>
-