Class AnnotationSetDaoImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractDao<AnnotationSet>
ubic.gemma.persistence.service.common.auditAndSecurity.curation.AnnotationSetDaoImpl
- All Implemented Interfaces:
BaseDao<AnnotationSet>, AnnotationSetDao
@Repository
public class AnnotationSetDaoImpl
extends AbstractDao<AnnotationSet>
implements AnnotationSetDao
Hibernate implementation of
AnnotationSetDao.-
Nested Class Summary
Nested classes/interfaces inherited from interface AnnotationSetDao
AnnotationSetDao.SummarySort -
Field Summary
Fields inherited from class AbstractDao
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountByInvestigation(Investigation investigation, AnnotationSetRole roleFilter) Count rows attached to the given investigation matching the role filter (or all roles ifnull).countByRoleSince(Date since) Group rows by role, counting per bucket.longcountDistinctRunIdsSince(Date since, AnnotationSetRole roleFilter) Number of distinctrunIds seen on rows withcreatedAt >= since(or all-time if null).longcountSince(Date since, AnnotationSetRole roleFilter) Count rows withcreatedAton or aftersince(or all rows ifsinceis null).longcountSummaries(AnnotationSetRole roleFilter, AnnotationSetSource sourceFilter, String createdByFilter, AgentCurationKind kindFilter, String statusFilter, List<Long> investigationIds) Cross-experiment count.findByInvestigation(Investigation investigation, AnnotationSetRole roleFilter) All sets attached to the given investigation, newest first.findByInvestigationAndRoleAndRunId(Investigation investigation, AnnotationSetRole role, String runId) Find an existing row for the(investigation, role, runId)triple, ornull.findLatestByInvestigation(Investigation investigation, AnnotationSetRole roleFilter) The most recent set attached to the given investigation matching the role filter (or all roles ifnull), ornull.findLatestCreatedAt(AnnotationSetRole roleFilter) findSummariesByInvestigation(Investigation investigation, AnnotationSetRole roleFilter) Thin metadata projection of sets attached to the given investigation, newest first.listSummaries(AnnotationSetRole roleFilter, AnnotationSetSource sourceFilter, String createdByFilter, AgentCurationKind kindFilter, String statusFilter, List<Long> investigationIds, int offset, int limit, AnnotationSetDao.SummarySort sort, boolean descending) Cross-experiment thin metadata projection: everyAnnotationSetmatching the supplied filter, sliced byoffset / limit.intrebindInvestigation(Investigation from, Investigation to) Rebind every row currently attached tofromso it points atto.Methods inherited from class AbstractDao
countAll, create, create, find, findByProperty, findByPropertyIn, findIdByProperty, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getEntityName, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, save, streamAll, streamAll, streamQuery, update, update
-
Constructor Details
-
AnnotationSetDaoImpl
-
-
Method Details
-
findByInvestigationAndRoleAndRunId
@Nullable public AnnotationSet findByInvestigationAndRoleAndRunId(Investigation investigation, AnnotationSetRole role, String runId) Description copied from interface:AnnotationSetDaoFind an existing row for the(investigation, role, runId)triple, ornull. Used by the service to makePOST /datasets/{id}/annotation-setsidempotent on retry.- Specified by:
findByInvestigationAndRoleAndRunIdin interfaceAnnotationSetDao
-
findByInvestigation
public List<AnnotationSet> findByInvestigation(Investigation investigation, @Nullable AnnotationSetRole roleFilter) Description copied from interface:AnnotationSetDaoAll sets attached to the given investigation, newest first.- Specified by:
findByInvestigationin interfaceAnnotationSetDao- Parameters:
investigation- target. Required.roleFilter- optional role filter;null= all roles.
-
findSummariesByInvestigation
public List<AnnotationSetSummaryValueObject> findSummariesByInvestigation(Investigation investigation, @Nullable AnnotationSetRole roleFilter) Description copied from interface:AnnotationSetDaoThin metadata projection of sets attached to the given investigation, newest first.payloadJsonis NOT loaded; the projection emitslength(payloadJson)aspayloadSizeso the UI can decide whether to fetch the full row.- Specified by:
findSummariesByInvestigationin interfaceAnnotationSetDao
-
findLatestByInvestigation
@Nullable public AnnotationSet findLatestByInvestigation(Investigation investigation, @Nullable AnnotationSetRole roleFilter) Description copied from interface:AnnotationSetDaoThe most recent set attached to the given investigation matching the role filter (or all roles ifnull), ornull. "Most recent" bycreatedAt, falling back to id whencreatedAtties.- Specified by:
findLatestByInvestigationin interfaceAnnotationSetDao
-
countByInvestigation
public long countByInvestigation(Investigation investigation, @Nullable AnnotationSetRole roleFilter) Description copied from interface:AnnotationSetDaoCount rows attached to the given investigation matching the role filter (or all roles ifnull).- Specified by:
countByInvestigationin interfaceAnnotationSetDao
-
rebindInvestigation
Description copied from interface:AnnotationSetDaoRebind every row currently attached tofromso it points atto. Returns the number of rows rebound. Used by the preboarded-promotion flow so the agent's historical proposals follow the EE after the preboarded row is replaced.- Specified by:
rebindInvestigationin interfaceAnnotationSetDao
-
listSummaries
public List<AnnotationSetSummaryValueObject> listSummaries(@Nullable AnnotationSetRole roleFilter, @Nullable AnnotationSetSource sourceFilter, @Nullable String createdByFilter, @Nullable AgentCurationKind kindFilter, @Nullable String statusFilter, @Nullable List<Long> investigationIds, int offset, int limit, @Nullable AnnotationSetDao.SummarySort sort, boolean descending) Description copied from interface:AnnotationSetDaoCross-experiment thin metadata projection: everyAnnotationSetmatching the supplied filter, sliced byoffset / limit.- Specified by:
listSummariesin interfaceAnnotationSetDao- Parameters:
roleFilter- optional role filter;null= all roles.sourceFilter- optional source filter;null= all sources.createdByFilter- optional createdBy filter;null= no filter.investigationIds- optional restriction to a set of investigation ids;nullor empty = no additional filter (ACL enforced upstream).sort- field to order by;null=AnnotationSetDao.SummarySort.CREATED_AT.descending- newest / highest first.
-
countSummaries
public long countSummaries(@Nullable AnnotationSetRole roleFilter, @Nullable AnnotationSetSource sourceFilter, @Nullable String createdByFilter, @Nullable AgentCurationKind kindFilter, @Nullable String statusFilter, @Nullable List<Long> investigationIds) Description copied from interface:AnnotationSetDaoCross-experiment count. Counterpart ofAnnotationSetDao.listSummaries(AnnotationSetRole, AnnotationSetSource, String, AgentCurationKind, String, List, int, int, SummarySort, boolean).- Specified by:
countSummariesin interfaceAnnotationSetDao
-
countSince
Description copied from interface:AnnotationSetDaoCount rows withcreatedAton or aftersince(or all rows ifsinceis null). Optionally restricted by role.- Specified by:
countSincein interfaceAnnotationSetDao
-
countByRoleSince
Description copied from interface:AnnotationSetDaoGroup rows by role, counting per bucket. Rows withcreatedAt >= sinceonly whensinceis non-null.- Specified by:
countByRoleSincein interfaceAnnotationSetDao
-
countDistinctRunIdsSince
Description copied from interface:AnnotationSetDaoNumber of distinctrunIds seen on rows withcreatedAt >= since(or all-time if null). Approximates "how many agent runs have we ingested in the window" when filtered torole=PROPOSAL.- Specified by:
countDistinctRunIdsSincein interfaceAnnotationSetDao
-
findLatestCreatedAt
- Specified by:
findLatestCreatedAtin interfaceAnnotationSetDao- Returns:
- the most-recent
createdAtacross every row matching the role filter, ornullif no rows.
-