Class ArrayDesignDaoImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractDao<O>
-
- ubic.gemma.persistence.service.AbstractVoEnabledDao<O,VO>
-
- ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao<O,VO>
-
- ubic.gemma.persistence.service.AbstractQueryFilteringVoEnabledDao<C,VO>
-
- ubic.gemma.persistence.service.common.auditAndSecurity.curation.AbstractCuratableDao<ArrayDesign,ArrayDesignValueObject>
-
- ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignDaoImpl
-
- All Implemented Interfaces:
InitializingBean
,BaseDao<ArrayDesign>
,BaseVoEnabledDao<ArrayDesign,ArrayDesignValueObject>
,CachedFilteringDao<ArrayDesign>
,CachedFilteringVoEnabledDao<ArrayDesign,ArrayDesignValueObject>
,CuratableDao<ArrayDesign>
,ArrayDesignDao
,FilteringDao<ArrayDesign>
,FilteringVoEnabledDao<ArrayDesign,ArrayDesignValueObject>
@Repository public class ArrayDesignDaoImpl extends AbstractCuratableDao<ArrayDesign,ArrayDesignValueObject> implements ArrayDesignDao
- Author:
- pavlidis
- See Also:
ArrayDesign
-
-
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.common.auditAndSecurity.curation.AbstractCuratableDao
CURATION_DETAILS_ALIAS
-
Fields inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
REPORT_SLOW_QUERY_AFTER_MS
-
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
elementClass, log
-
Fields inherited from interface ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignDao
OBJECT_ALIAS
-
-
Constructor Summary
Constructors Constructor Description ArrayDesignDaoImpl(SessionFactory sessionFactory)
-
Method Summary
-
Methods inherited from class ubic.gemma.persistence.service.common.auditAndSecurity.curation.AbstractCuratableDao
addEventsToMap, addNonTroubledFilter, distinctIfNecessary, formNativeNonTroubledClause, formNonTroubledClause, groupByIfNecessary, updateCurationDetailsFromAuditEvent
-
Methods inherited from class ubic.gemma.persistence.service.AbstractQueryFilteringVoEnabledDao
count, countWithCache, getEntityTransformer, getValueObjectTransformer, load, load, loadIds, loadIdsWithCache, loadValueObjects, loadValueObjects, loadValueObjectsWithCache, loadValueObjectsWithCache, loadWithCache, loadWithCache
-
Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
afterPropertiesSet, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyMeta, getFilterablePropertyType, getSort
-
Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
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, 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.BaseDao
countAll, create, create, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, remove, remove, save, save, update, update
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Methods inherited from interface ubic.gemma.persistence.service.CachedFilteringDao
countWithCache, loadIdsWithCache, loadWithCache, loadWithCache
-
Methods inherited from interface ubic.gemma.persistence.service.CachedFilteringVoEnabledDao
loadValueObjectsWithCache, loadValueObjectsWithCache
-
Methods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.curation.CuratableDao
updateCurationDetailsFromAuditEvent
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringDao
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyType, getSort, load, load, loadIds
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledDao
loadValueObjects, loadValueObjects
-
-
-
-
Constructor Detail
-
ArrayDesignDaoImpl
@Autowired public ArrayDesignDaoImpl(SessionFactory sessionFactory)
-
-
Method Detail
-
addProbes
public void addProbes(ArrayDesign arrayDesign, Collection<CompositeSequence> newProbes)
- Specified by:
addProbes
in interfaceArrayDesignDao
-
deleteAlignmentData
public void deleteAlignmentData(ArrayDesign arrayDesign)
- Specified by:
deleteAlignmentData
in interfaceArrayDesignDao
-
deleteGeneProductAlignmentAssociations
public void deleteGeneProductAlignmentAssociations(ArrayDesign arrayDesign)
- Specified by:
deleteGeneProductAlignmentAssociations
in interfaceArrayDesignDao
-
deleteGeneProductAnnotationAssociations
public void deleteGeneProductAnnotationAssociations(ArrayDesign arrayDesign)
- Specified by:
deleteGeneProductAnnotationAssociations
in interfaceArrayDesignDao
-
loadBlacklistedValueObjects
public Slice<ArrayDesignValueObject> loadBlacklistedValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit)
- Specified by:
loadBlacklistedValueObjects
in interfaceArrayDesignDao
-
deleteGeneProductAssociations
public void deleteGeneProductAssociations(ArrayDesign arrayDesign)
- Specified by:
deleteGeneProductAssociations
in interfaceArrayDesignDao
-
findByShortName
public ArrayDesign findByShortName(String shortName)
- Specified by:
findByShortName
in interfaceArrayDesignDao
-
findByName
public Collection<ArrayDesign> findByName(String name)
- Specified by:
findByName
in interfaceArrayDesignDao
-
find
public ArrayDesign find(ArrayDesign entity)
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<ArrayDesign>
- Overrides:
find
in 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
public Collection<ArrayDesign> findByAlternateName(String queryString)
- Specified by:
findByAlternateName
in interfaceArrayDesignDao
-
findByManufacturer
public Collection<ArrayDesign> findByManufacturer(String queryString)
- Specified by:
findByManufacturer
in interfaceArrayDesignDao
-
findByTaxon
public Collection<ArrayDesign> findByTaxon(Taxon taxon)
- Specified by:
findByTaxon
in interfaceArrayDesignDao
-
getAllAssociatedBioAssays
public Collection<BioAssay> getAllAssociatedBioAssays(ArrayDesign arrayDesign)
- Specified by:
getAllAssociatedBioAssays
in interfaceArrayDesignDao
-
getAuditEvents
public Map<Long,Collection<AuditEvent>> getAuditEvents(Collection<Long> ids)
- Specified by:
getAuditEvents
in interfaceArrayDesignDao
-
getBioSequences
public Map<CompositeSequence,BioSequence> getBioSequences(ArrayDesign arrayDesign)
- Specified by:
getBioSequences
in interfaceArrayDesignDao
-
getGenes
public Collection<Gene> getGenes(ArrayDesign arrayDesign)
- Specified by:
getGenes
in interfaceArrayDesignDao
-
getExpressionExperiments
public Collection<ExpressionExperiment> getExpressionExperiments(ArrayDesign arrayDesign)
- Specified by:
getExpressionExperiments
in interfaceArrayDesignDao
-
getExpressionExperimentsCount
public long getExpressionExperimentsCount(ArrayDesign arrayDesign)
Description copied from interface:ArrayDesignDao
Obtain the number of associated expression experiments.This is much faster than looking up the size of
ArrayDesignDao.getExpressionExperiments(ArrayDesign)
.- Specified by:
getExpressionExperimentsCount
in interfaceArrayDesignDao
-
getPerTaxonCount
public Map<Taxon,Long> getPerTaxonCount()
- Specified by:
getPerTaxonCount
in interfaceArrayDesignDao
-
getSwitchedExpressionExperiments
public Collection<ExpressionExperiment> getSwitchedExpressionExperiments(ArrayDesign arrayDesign)
Get the ids of experiments that "originally" used this platform, but which don't any more due to a platform switch.- Specified by:
getSwitchedExpressionExperiments
in interfaceArrayDesignDao
- Parameters:
arrayDesign
- a platform for which the statistic is computed- Returns:
- collection of experiment IDs.
-
getSwitchedExpressionExperimentsCount
public Long getSwitchedExpressionExperimentsCount(ArrayDesign arrayDesign)
Description copied from interface:ArrayDesignDao
Count the number of switchedExpressionExperiment
from a given platform.- Specified by:
getSwitchedExpressionExperimentsCount
in interfaceArrayDesignDao
-
getTaxa
public Collection<Taxon> getTaxa(ArrayDesign arrayDesign)
- Specified by:
getTaxa
in interfaceArrayDesignDao
-
isMerged
public Map<Long,Boolean> isMerged(Collection<Long> ids)
- Specified by:
isMerged
in interfaceArrayDesignDao
-
isMergee
public Map<Long,Boolean> isMergee(Collection<Long> ids)
- Specified by:
isMergee
in interfaceArrayDesignDao
-
isSubsumed
public Map<Long,Boolean> isSubsumed(Collection<Long> ids)
- Specified by:
isSubsumed
in interfaceArrayDesignDao
-
isSubsumer
public Map<Long,Boolean> isSubsumer(Collection<Long> ids)
- Specified by:
isSubsumer
in interfaceArrayDesignDao
-
loadAlignments
public Map<CompositeSequence,Collection<BlatResult>> loadAlignments(ArrayDesign arrayDesign)
- Specified by:
loadAlignments
in interfaceArrayDesignDao
-
loadCompositeSequences
public Collection<CompositeSequence> loadCompositeSequences(ArrayDesign arrayDesign, int limit, int offset)
- Specified by:
loadCompositeSequences
in interfaceArrayDesignDao
-
doLoadValueObject
protected ArrayDesignValueObject doLoadValueObject(ArrayDesign ad)
Loads a single value objects for the given array design.- Specified by:
doLoadValueObject
in 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
protected void postProcessValueObjects(List<ArrayDesignValueObject> results)
Description copied from class:AbstractVoEnabledDao
Post-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:
postProcessValueObjects
in classAbstractVoEnabledDao<ArrayDesign,ArrayDesignValueObject>
-
loadValueObjectsForEE
public List<ArrayDesignValueObject> loadValueObjectsForEE(@Nullable Long eeId)
- Specified by:
loadValueObjectsForEE
in interfaceArrayDesignDao
-
numAllCompositeSequenceWithBioSequences
public long numAllCompositeSequenceWithBioSequences()
- Specified by:
numAllCompositeSequenceWithBioSequences
in interfaceArrayDesignDao
-
numAllCompositeSequenceWithBioSequences
public long numAllCompositeSequenceWithBioSequences(Collection<Long> ids)
- Specified by:
numAllCompositeSequenceWithBioSequences
in interfaceArrayDesignDao
-
numAllCompositeSequenceWithBlatResults
public long numAllCompositeSequenceWithBlatResults()
- Specified by:
numAllCompositeSequenceWithBlatResults
in interfaceArrayDesignDao
-
numAllCompositeSequenceWithBlatResults
public long numAllCompositeSequenceWithBlatResults(Collection<Long> ids)
- Specified by:
numAllCompositeSequenceWithBlatResults
in interfaceArrayDesignDao
-
numAllCompositeSequenceWithGenes
public long numAllCompositeSequenceWithGenes()
- Specified by:
numAllCompositeSequenceWithGenes
in interfaceArrayDesignDao
-
numAllCompositeSequenceWithGenes
public long numAllCompositeSequenceWithGenes(Collection<Long> ids)
- Specified by:
numAllCompositeSequenceWithGenes
in interfaceArrayDesignDao
-
numAllGenes
public long numAllGenes()
- Specified by:
numAllGenes
in interfaceArrayDesignDao
-
numAllGenes
public long numAllGenes(Collection<Long> ids)
- Specified by:
numAllGenes
in interfaceArrayDesignDao
-
numBioSequences
public long numBioSequences(ArrayDesign arrayDesign)
- Specified by:
numBioSequences
in interfaceArrayDesignDao
-
numBlatResults
public long numBlatResults(ArrayDesign arrayDesign)
- Specified by:
numBlatResults
in interfaceArrayDesignDao
-
numCompositeSequences
public long numCompositeSequences(ArrayDesign arrayDesign)
- Specified by:
numCompositeSequences
in interfaceArrayDesignDao
-
numCompositeSequenceWithBioSequences
public long numCompositeSequenceWithBioSequences(ArrayDesign arrayDesign)
- Specified by:
numCompositeSequenceWithBioSequences
in interfaceArrayDesignDao
-
numCompositeSequenceWithBlatResults
public long numCompositeSequenceWithBlatResults(ArrayDesign arrayDesign)
- Specified by:
numCompositeSequenceWithBlatResults
in interfaceArrayDesignDao
-
numCompositeSequenceWithGenes
public long numCompositeSequenceWithGenes(ArrayDesign arrayDesign)
- Specified by:
numCompositeSequenceWithGenes
in interfaceArrayDesignDao
-
numExperiments
public long numExperiments(ArrayDesign arrayDesign)
- Specified by:
numExperiments
in interfaceArrayDesignDao
-
numGenes
public long numGenes(ArrayDesign arrayDesign)
- Specified by:
numGenes
in interfaceArrayDesignDao
-
remove
public void remove(ArrayDesign arrayDesign)
Description copied from interface:BaseDao
Remove a persistent instance- Specified by:
remove
in interfaceBaseDao<ArrayDesign>
- Overrides:
remove
in classAbstractDao<ArrayDesign>
- Parameters:
arrayDesign
- the entity to be removed
-
removeBiologicalCharacteristics
public void removeBiologicalCharacteristics(ArrayDesign arrayDesign)
- Specified by:
removeBiologicalCharacteristics
in interfaceArrayDesignDao
-
thawLite
public void thawLite(ArrayDesign arrayDesign)
Description copied from interface:ArrayDesignDao
Lightly thaw the given platform.- Specified by:
thawLite
in interfaceArrayDesignDao
-
thaw
public void thaw(ArrayDesign arrayDesign)
Description copied from interface:ArrayDesignDao
Thaw the given platform as perArrayDesignDao.thawLite(ArrayDesign)
with its probes and genes.- Specified by:
thaw
in interfaceArrayDesignDao
-
updateSubsumingStatus
public Boolean updateSubsumingStatus(ArrayDesign candidateSubsumer, ArrayDesign candidateSubsumee)
- Specified by:
updateSubsumingStatus
in interfaceArrayDesignDao
-
getFilteringQuery
protected Query getFilteringQuery(@Nullable Filters filters, @Nullable Sort sort)
Description copied from class:AbstractQueryFilteringVoEnabledDao
Produce 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
List
ofAbstractQueryFilteringVoEnabledDao
whenQuery.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:
getFilteringQuery
in classAbstractQueryFilteringVoEnabledDao<ArrayDesign,ArrayDesignValueObject>
- Returns:
- a
Query
that produce a list ofAbstractQueryFilteringVoEnabledDao
-
initializeCachedFilteringResult
protected void initializeCachedFilteringResult(ArrayDesign ad)
Description copied from class:AbstractQueryFilteringVoEnabledDao
Initialize 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:
initializeCachedFilteringResult
in classAbstractQueryFilteringVoEnabledDao<ArrayDesign,ArrayDesignValueObject>
-
getFilteringIdQuery
protected Query getFilteringIdQuery(@Nullable Filters filters, @Nullable Sort sort)
Description copied from class:AbstractQueryFilteringVoEnabledDao
Produce a query that will be used to retrieve IDs ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
.- Overrides:
getFilteringIdQuery
in classAbstractQueryFilteringVoEnabledDao<ArrayDesign,ArrayDesignValueObject>
-
getFilteringCountQuery
protected Query getFilteringCountQuery(@Nullable Filters filters)
Description copied from class:AbstractQueryFilteringVoEnabledDao
Produce a query that will be used to retrieve the size ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
.- Overrides:
getFilteringCountQuery
in classAbstractQueryFilteringVoEnabledDao<ArrayDesign,ArrayDesignValueObject>
- Returns:
- a
Query
which must return a singleLong
value
-
configureFilterableProperties
protected void configureFilterableProperties(AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer configurer)
Description copied from class:AbstractFilteringVoEnabledDao
Register filterable properties.- Overrides:
configureFilterableProperties
in classAbstractCuratableDao<ArrayDesign,ArrayDesignValueObject>
-
getFilterablePropertyMeta
protected AbstractFilteringVoEnabledDao.FilterablePropertyMeta getFilterablePropertyMeta(String propertyName)
Description copied from class:AbstractCuratableDao
Obtain various meta-information used to infer what to use in aFilter
orSort
.This is used by
AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, String)
andAbstractFilteringVoEnabledDao.getSort(String, Sort.Direction)
.Include filtering by
lastUpdated
,troubled
andneedsAttention
from the associated curation details.- Overrides:
getFilterablePropertyMeta
in classAbstractCuratableDao<ArrayDesign,ArrayDesignValueObject>
- See Also:
AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, String)
,AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, Collection)
,AbstractFilteringVoEnabledDao.getSort(String, Sort.Direction)
-
-