Class ArrayDesignDaoImpl
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, BaseDao<ArrayDesign>, BaseVoEnabledDao<ArrayDesign, ArrayDesignValueObject>, CachedFilteringDao<ArrayDesign>, CachedFilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>, CuratableDao<ArrayDesign>, ArrayDesignDao, FilteringDao<ArrayDesign>, FilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>
- Author:
- pavlidis
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractFilteringVoEnabledDao
AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer, AbstractFilteringVoEnabledDao.FilterablePropertyMetaNested classes/interfaces inherited from interface FilteringDao
FilteringDao.ConjunctSpec -
Field Summary
Fields inherited from class AbstractCuratableDao
CURATION_DETAILS_ALIASFields inherited from class AbstractVoEnabledDao
REPORT_SLOW_QUERY_AFTER_MSFields inherited from class AbstractDao
logFields inherited from interface ArrayDesignDao
OBJECT_ALIAS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProbes(ArrayDesign arrayDesign, Collection<CompositeSequence> newProbes) protected voidconfigureFilterableProperties(AbstractFilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>.FilterablePropertiesConfigurer configurer) Register filterable properties.longcountBioSequences(ArrayDesign arrayDesign) longcountBlatResults(ArrayDesign arrayDesign) longcountCompositeSequences(ArrayDesign arrayDesign) longlongcountCompositeSequencesWithBioSequences(ArrayDesign arrayDesign) longlongcountCompositeSequencesWithBlatResults(ArrayDesign arrayDesign) longcountCompositeSequencesWithGenes(boolean useGene2Cs) longcountCompositeSequencesWithGenes(Collection<ArrayDesign> arrayDesigns, boolean useGene2Cs) longcountCompositeSequencesWithGenes(ArrayDesign arrayDesign, boolean useGene2Cs) longcountExpressionExperiments(ArrayDesign arrayDesign) Obtain the number of associated expression experiments.longcountGenes(boolean useGene2Cs) longcountGenes(ArrayDesign arrayDesign, boolean useGene2Cs) longcountSwitchedExpressionExperiments(ArrayDesign arrayDesign) Count the number of switchedExpressionExperimentfrom a given platform.voiddeleteAlignmentData(ArrayDesign arrayDesign) voiddeleteGeneProductAlignmentAssociations(ArrayDesign arrayDesign) voiddeleteGeneProductAnnotationAssociations(ArrayDesign arrayDesign) voiddeleteGeneProductAssociations(ArrayDesign arrayDesign) protected ArrayDesignValueObjectLoads a single value objects for the given array design.find(ArrayDesign entity) Does a look-up for the given entity in the persistent storage, usually looking for a specific identifier ifIdentifiable.getId()is set or a business key.findByAlternateName(String queryString) findByManufacturer(String queryString) findByName(String name) findByShortName(String shortName) findByTaxon(Taxon taxon) findOneByAlternateName(String name) findOneByName(String name) getAllAssociatedBioAssays(ArrayDesign arrayDesign) getAuditEvents(Collection<Long> ids) getBioSequences(ArrayDesign arrayDesign) getExpressionExperiments(ArrayDesign arrayDesign) protected org.hibernate.query.QuerygetFilteringCountQuery(Filters filters) protected org.hibernate.query.QuerygetFilteringIdQuery(Filters filters, Sort sort) protected org.hibernate.query.QuerygetFilteringQuery(Filters filters, Sort sort) Produce a query for retrieving filtered entities or VOs after applying filters and ordering.getGenes(ArrayDesign arrayDesign, boolean useGene2Cs) Obtain all the genes associated to the platform.getGenesByCompositeSequence(Collection<ArrayDesign> arrayDesigns, boolean useGene2Cs) getGenesByCompositeSequence(ArrayDesign arrayDesign, boolean useGene2Cs) Obtain all the genes associated to the platform organized by corresponding design elements.getSwitchedExpressionExperiments(ArrayDesign arrayDesign) Get the ids of experiments that "originally" used this platform, but which don't any more due to a platform switch.getTaxaFromBioSequences(ArrayDesign arrayDesign) Obtain all the taxa associated to theBioSequenceof the given platform.protected TypedResultTransformer<ArrayDesignValueObject> protected voidInitialize a result fromAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)retrieved from cache.isMerged(Collection<Long> ids) isMergee(Collection<Long> ids) isSubsumed(Collection<Long> ids) isSubsumer(Collection<Long> ids) loadAlignments(ArrayDesign arrayDesign) loadAsMap(Collection<Long> ids) Load a batch ofArrayDesigns by ID and return them keyed by ID for O(1) per-id lookup.loadBlacklistedValueObjects(Filters filters, Sort sort, int offset, int limit) loadBlacklistedValueObjectsByCursor(Filters filters, Sort sort, Cursor cursor, int limit) Cursor-mode counterpart toArrayDesignDao.loadBlacklistedValueObjects(Filters, Sort, int, int): keyset pagination over the blacklisted platforms, applying the same shortName/accession blacklist filter that the offset-mode variant composes — seeCURSOR_PAGINATION_STEP1_PLAN.mdstep 1h.loadCompositeSequences(ArrayDesign arrayDesign, int limit, int offset) Load the platforms a dataset was ORIGINALLY submitted on, before any platform switch.loadValueObjectsForEE(Long eeId) protected voidPost-process VOs in bulk.voidremove(ArrayDesign arrayDesign) Remove a persistent entity.voidremoveBiologicalCharacteristics(ArrayDesign arrayDesign) resolveFilterablePropertyMeta(String propertyName) voidthaw(ArrayDesign arrayDesign) Thaw the given platform as perArrayDesignDao.thawLite(ArrayDesign)with its probes and genes.voidthawCompositeSequences(ArrayDesign arrayDesign) Only thaw the design elements of a given platform.voidthawLite(ArrayDesign arrayDesign) Lightly thaw the given platform.booleanupdateSubsumingStatus(ArrayDesign candidateSubsumer, ArrayDesign candidateSubsumee) Methods inherited from class AbstractCuratableDao
addEventsToMap, addNonTroubledFilter, formNativeNonTroubledClause, formNonTroubledClause, groupByIfNecessary, loadTroubledIds, updateCurationDetailsFromAuditEventMethods inherited from class AbstractQueryFilteringVoEnabledDao
count, countWithCache, getEntityTransformer, getQueryCacheRegion, load, load, loadIds, loadIdsWithCache, loadValueObjects, loadValueObjects, loadValueObjectsByCursor, loadValueObjectsByCursorWithCache, loadValueObjectsWithCache, loadValueObjectsWithCache, loadWithCache, loadWithCacheMethods inherited from class AbstractFilteringVoEnabledDao
afterPropertiesSet, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyMeta, getFilterablePropertyObjectAliases, getFilterablePropertyType, getObjectAlias, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, resolveFilterablePropertyMetaMethods inherited from class AbstractVoEnabledDao
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from class AbstractDao
countAll, create, create, findByProperty, findByPropertyIn, findIdByProperty, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getEntityName, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, save, save, streamAll, streamAll, streamQuery, update, updateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BaseDao
countAll, create, create, findOrCreate, getElementClass, load, load, loadAll, loadReference, loadReference, reload, reload, remove, save, save, streamAll, streamAll, update, updateMethods inherited from interface BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from interface CachedFilteringDao
countWithCache, loadIdsWithCache, loadWithCache, loadWithCacheMethods inherited from interface CachedFilteringVoEnabledDao
loadValueObjectsWithCache, loadValueObjectsWithCacheMethods inherited from interface CuratableDao
loadTroubledIds, updateCurationDetailsFromAuditEventMethods inherited from interface FilteringDao
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, load, load, loadIdsMethods inherited from interface FilteringVoEnabledDao
loadValueObjects, loadValueObjects, loadValueObjectsByCursor
-
Constructor Details
-
ArrayDesignDaoImpl
-
-
Method Details
-
loadAsMap
Description copied from interface:ArrayDesignDaoLoad a batch ofArrayDesigns by ID and return them keyed by ID for O(1) per-id lookup. Issues a singleWHERE id IN (...)fetch (delegating to the base DAO'sBaseDao.load(Collection)), then collects to a map.Use this in place of N×
Session.get(ArrayDesign.class, id)loop patterns — see round-2 perf probe finding #8 (PERF_PROBE_REPORT_ROUND2.md): 20 sequential PK lookups (~138 ms each on the prod tunnel) cost ~2,766 ms, vs ~121 ms for a single batched fetch.The returned map preserves no ordering. The base loader fetches the AD root entity only — lazy collections (e.g.
designElements,compositeSequences) are NOT initialised; callers that need them must thaw explicitly to avoid a secondary N+1.- Specified by:
loadAsMapin interfaceArrayDesignDao- Parameters:
ids- platform IDs to load; an empty collection returns an empty map- Returns:
- a map of id →
ArrayDesignfor every id that resolved to a row
-
loadAllGenericGenePlatforms
- Specified by:
loadAllGenericGenePlatformsin interfaceArrayDesignDao
-
addProbes
- Specified by:
addProbesin interfaceArrayDesignDao
-
deleteAlignmentData
- Specified by:
deleteAlignmentDatain interfaceArrayDesignDao
-
deleteGeneProductAlignmentAssociations
- Specified by:
deleteGeneProductAlignmentAssociationsin interfaceArrayDesignDao
-
deleteGeneProductAnnotationAssociations
- Specified by:
deleteGeneProductAnnotationAssociationsin interfaceArrayDesignDao
-
loadBlacklistedValueObjects
public Slice<ArrayDesignValueObject> loadBlacklistedValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit) - Specified by:
loadBlacklistedValueObjectsin interfaceArrayDesignDao
-
loadBlacklistedValueObjectsByCursor
public CursorPage<ArrayDesignValueObject> loadBlacklistedValueObjectsByCursor(@Nullable Filters filters, Sort sort, @Nullable Cursor cursor, int limit) Description copied from interface:ArrayDesignDaoCursor-mode counterpart toArrayDesignDao.loadBlacklistedValueObjects(Filters, Sort, int, int): keyset pagination over the blacklisted platforms, applying the same shortName/accession blacklist filter that the offset-mode variant composes — seeCURSOR_PAGINATION_STEP1_PLAN.mdstep 1h.- Specified by:
loadBlacklistedValueObjectsByCursorin interfaceArrayDesignDao
-
deleteGeneProductAssociations
- Specified by:
deleteGeneProductAssociationsin interfaceArrayDesignDao
-
findByShortName
- Specified by:
findByShortNamein interfaceArrayDesignDao
-
findByName
- Specified by:
findByNamein interfaceArrayDesignDao
-
findOneByName
- Specified by:
findOneByNamein interfaceArrayDesignDao
-
findByCompositeSequenceName
- Specified by:
findByCompositeSequenceNamein interfaceArrayDesignDao
-
find
Description copied from interface:BaseDaoDoes a look-up for the given entity in the persistent storage, usually looking for a specific identifier ifIdentifiable.getId()is set or a business key.- Specified by:
findin interfaceBaseDao<ArrayDesign>- Overrides:
findin classAbstractDao<ArrayDesign>- Parameters:
entity- the entity to look for.- Returns:
- an entity that was found in the persistent storage, or null if no such entity was found.
-
findByAlternateName
- Specified by:
findByAlternateNamein interfaceArrayDesignDao
-
findOneByAlternateName
- Specified by:
findOneByAlternateNamein interfaceArrayDesignDao
-
findByManufacturer
- Specified by:
findByManufacturerin interfaceArrayDesignDao
-
findByTaxon
- Specified by:
findByTaxonin interfaceArrayDesignDao
-
getAllAssociatedBioAssays
- Specified by:
getAllAssociatedBioAssaysin interfaceArrayDesignDao
-
getAuditEvents
- Specified by:
getAuditEventsin interfaceArrayDesignDao
-
getBioSequences
- Specified by:
getBioSequencesin interfaceArrayDesignDao
-
getGenes
Description copied from interface:ArrayDesignDaoObtain all the genes associated to the platform.- Specified by:
getGenesin interfaceArrayDesignDao
-
getGenesByCompositeSequence
public Map<CompositeSequence, Set<Gene>> getGenesByCompositeSequence(ArrayDesign arrayDesign, boolean useGene2Cs) Description copied from interface:ArrayDesignDaoObtain all the genes associated to the platform organized by corresponding design elements.- Specified by:
getGenesByCompositeSequencein interfaceArrayDesignDao
-
getGenesByCompositeSequence
public Map<CompositeSequence, Set<Gene>> getGenesByCompositeSequence(Collection<ArrayDesign> arrayDesigns, boolean useGene2Cs) - Specified by:
getGenesByCompositeSequencein interfaceArrayDesignDao
-
getExpressionExperiments
- Specified by:
getExpressionExperimentsin interfaceArrayDesignDao
-
countExpressionExperiments
Description copied from interface:ArrayDesignDaoObtain the number of associated expression experiments.This is much faster than looking up the size of
ArrayDesignDao.getExpressionExperiments(ArrayDesign).- Specified by:
countExpressionExperimentsin interfaceArrayDesignDao- See Also:
-
getPerTaxonCount
- Specified by:
getPerTaxonCountin interfaceArrayDesignDao
-
getSwitchedExpressionExperiments
Get the ids of experiments that "originally" used this platform, but which don't any more due to a platform switch.- Specified by:
getSwitchedExpressionExperimentsin interfaceArrayDesignDao- Parameters:
arrayDesign- a platform for which the statistic is computed- Returns:
- collection of experiment IDs.
-
countSwitchedExpressionExperiments
Description copied from interface:ArrayDesignDaoCount the number of switchedExpressionExperimentfrom a given platform.- Specified by:
countSwitchedExpressionExperimentsin interfaceArrayDesignDao- See Also:
-
getTaxaFromBioSequences
Description copied from interface:ArrayDesignDaoObtain all the taxa associated to theBioSequenceof the given platform.- Specified by:
getTaxaFromBioSequencesin interfaceArrayDesignDao
-
isMerged
- Specified by:
isMergedin interfaceArrayDesignDao
-
isMergee
- Specified by:
isMergeein interfaceArrayDesignDao
-
isSubsumed
- Specified by:
isSubsumedin interfaceArrayDesignDao
-
isSubsumer
- Specified by:
isSubsumerin interfaceArrayDesignDao
-
loadAlignments
- Specified by:
loadAlignmentsin interfaceArrayDesignDao
-
loadCompositeSequences
public Collection<CompositeSequence> loadCompositeSequences(ArrayDesign arrayDesign, int limit, int offset) - Specified by:
loadCompositeSequencesin interfaceArrayDesignDao
-
doLoadValueObject
Loads a single value objects for the given array design.- Specified by:
doLoadValueObjectin classAbstractVoEnabledDao<ArrayDesign, ArrayDesignValueObject>- Parameters:
ad- the array design to be converted to a value object- Returns:
- a value object with properties of the given array design.
-
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<ArrayDesign, ArrayDesignValueObject>
-
getValueObjectTransformer
- Overrides:
getValueObjectTransformerin classAbstractQueryFilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>
-
loadValueObjectsForEE
- Specified by:
loadValueObjectsForEEin interfaceArrayDesignDao
-
loadOriginalPlatformValueObjectsForEE
Description copied from interface:ArrayDesignDaoLoad the platforms a dataset was ORIGINALLY submitted on, before any platform switch.A dataset can have more than one — its assays need not have come from a single submitted platform. A platform recorded as an original that is ALSO the one in use is a no-op switch and is left out, so an unswitched dataset answers with an empty list rather than echoing its current platform. That is the same rule the details VO applies, kept identical so the two cannot drift into disagreeing.
- Specified by:
loadOriginalPlatformValueObjectsForEEin interfaceArrayDesignDao- See Also:
-
countCompositeSequencesWithBioSequences
public long countCompositeSequencesWithBioSequences()- Specified by:
countCompositeSequencesWithBioSequencesin interfaceArrayDesignDao
-
countCompositeSequencesWithBlatResults
public long countCompositeSequencesWithBlatResults()- Specified by:
countCompositeSequencesWithBlatResultsin interfaceArrayDesignDao
-
countCompositeSequencesWithGenes
public long countCompositeSequencesWithGenes(boolean useGene2Cs) - Specified by:
countCompositeSequencesWithGenesin interfaceArrayDesignDao
-
countGenes
public long countGenes(boolean useGene2Cs) - Specified by:
countGenesin interfaceArrayDesignDao
-
countBioSequences
- Specified by:
countBioSequencesin interfaceArrayDesignDao
-
countBlatResults
- Specified by:
countBlatResultsin interfaceArrayDesignDao
-
countCompositeSequences
- Specified by:
countCompositeSequencesin interfaceArrayDesignDao
-
countCompositeSequencesWithBioSequences
- Specified by:
countCompositeSequencesWithBioSequencesin interfaceArrayDesignDao
-
countCompositeSequencesWithBlatResults
- Specified by:
countCompositeSequencesWithBlatResultsin interfaceArrayDesignDao
-
countCompositeSequencesWithGenes
- Specified by:
countCompositeSequencesWithGenesin interfaceArrayDesignDao
-
countCompositeSequencesWithGenes
public long countCompositeSequencesWithGenes(Collection<ArrayDesign> arrayDesigns, boolean useGene2Cs) - Specified by:
countCompositeSequencesWithGenesin interfaceArrayDesignDao
-
countGenes
- Specified by:
countGenesin interfaceArrayDesignDao
-
remove
Description copied from interface:BaseDaoRemove a persistent entity.- Specified by:
removein interfaceBaseDao<ArrayDesign>- Overrides:
removein classAbstractDao<ArrayDesign>- Parameters:
arrayDesign- the entity to be removed
-
removeBiologicalCharacteristics
- Specified by:
removeBiologicalCharacteristicsin interfaceArrayDesignDao
-
thawLite
Description copied from interface:ArrayDesignDaoLightly thaw the given platform.This includes all the to-one relations, but not the design elements.
- Specified by:
thawLitein interfaceArrayDesignDao
-
thaw
Description copied from interface:ArrayDesignDaoThaw the given platform as perArrayDesignDao.thawLite(ArrayDesign)with its probes and genes.- Specified by:
thawin interfaceArrayDesignDao
-
thawCompositeSequences
Description copied from interface:ArrayDesignDaoOnly thaw the design elements of a given platform.- Specified by:
thawCompositeSequencesin interfaceArrayDesignDao
-
updateSubsumingStatus
- Specified by:
updateSubsumingStatusin interfaceArrayDesignDao
-
getFilteringQuery
protected org.hibernate.query.Query getFilteringQuery(@Nullable Filters filters, @Nullable Sort sort) Description copied from class:AbstractQueryFilteringVoEnabledDaoProduce a query for retrieving filtered entities or VOs after applying filters and ordering.The query is expected to return a
ListofO. Implementations that return tuples should also overrideAbstractQueryFilteringVoEnabledDao.getValueObjectTransformer().- Specified by:
getFilteringQueryin classAbstractQueryFilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>
-
initializeCachedFilteringResult
Description copied from class:AbstractQueryFilteringVoEnabledDaoInitialize a result fromAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)retrieved from cache. Lazy-loaded relations fetched by the filtering query must be initialized here so that VOs populated from the second-level cache have the expected fields.- Specified by:
initializeCachedFilteringResultin classAbstractQueryFilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>
-
getFilteringIdQuery
protected org.hibernate.query.Query getFilteringIdQuery(@Nullable Filters filters, @Nullable Sort sort) - Overrides:
getFilteringIdQueryin classAbstractQueryFilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>
-
getFilteringCountQuery
- Overrides:
getFilteringCountQueryin classAbstractQueryFilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>
-
configureFilterableProperties
protected void configureFilterableProperties(AbstractFilteringVoEnabledDao<ArrayDesign, ArrayDesignValueObject>.FilterablePropertiesConfigurer configurer) Description copied from class:AbstractFilteringVoEnabledDaoRegister filterable properties.- Overrides:
configureFilterablePropertiesin classAbstractCuratableDao<ArrayDesign, ArrayDesignValueObject>
-
resolveFilterablePropertyMeta
protected AbstractFilteringVoEnabledDao.FilterablePropertyMeta.FilterablePropertyMetaBuilder resolveFilterablePropertyMeta(String propertyName) Description copied from class:AbstractCuratableDaoObtain various meta-information used to infer what to use in aFilterorSort.This is used by
AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, String)andFilteringDao.getSort(String, Sort.Direction, Sort.NullMode).Include filtering by
lastUpdated,troubledandneedsAttentionfrom the associated curation details.- Overrides:
resolveFilterablePropertyMetain classAbstractCuratableDao<ArrayDesign, ArrayDesignValueObject>- See Also:
-