Class AnnotationSetDispositionDaoImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractDao<AnnotationSetDisposition>
ubic.gemma.persistence.service.common.auditAndSecurity.curation.AnnotationSetDispositionDaoImpl
- All Implemented Interfaces:
BaseDao<AnnotationSetDisposition>, AnnotationSetDispositionDao
@Repository
public class AnnotationSetDispositionDaoImpl
extends AbstractDao<AnnotationSetDisposition>
implements AnnotationSetDispositionDao
Hibernate implementation of
AnnotationSetDispositionDao.-
Field Summary
Fields inherited from class AbstractDao
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdeleteBySet(AnnotationSet annotationSet) Delete every ruling on one set and report how many rows went.findBySet(AnnotationSet annotationSet) Every ruling on one set, most recent first — the full log, including rulings that have since been superseded.findBySetAndTarget(AnnotationSet annotationSet, String targetId) Every ruling on one finding, most recent first.findStandingBySet(AnnotationSet annotationSet) The standing ruling for each finding in one set — the most recent row per finding id, or per target id for rows carrying no finding id.findStandingBySetIds(Collection<Long> annotationSetIds) BatchedAnnotationSetDispositionDao.findStandingBySet(AnnotationSet), for a list view that would otherwise ask once per set.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
-
AnnotationSetDispositionDaoImpl
-
-
Method Details
-
findBySet
Description copied from interface:AnnotationSetDispositionDaoEvery ruling on one set, most recent first — the full log, including rulings that have since been superseded.- Specified by:
findBySetin interfaceAnnotationSetDispositionDao
-
findBySetAndTarget
public List<AnnotationSetDisposition> findBySetAndTarget(AnnotationSet annotationSet, String targetId) Description copied from interface:AnnotationSetDispositionDaoEvery ruling on one finding, most recent first. The head is the standing ruling.- Specified by:
findBySetAndTargetin interfaceAnnotationSetDispositionDao
-
findStandingBySet
Description copied from interface:AnnotationSetDispositionDaoThe standing ruling for each finding in one set — the most recent row per finding id, or per target id for rows carrying no finding id.- Specified by:
findStandingBySetin interfaceAnnotationSetDispositionDao- Returns:
- the standing rulings, most recent first
-
findStandingBySetIds
public Map<Long, List<AnnotationSetDisposition>> findStandingBySetIds(Collection<Long> annotationSetIds) Description copied from interface:AnnotationSetDispositionDaoBatchedAnnotationSetDispositionDao.findStandingBySet(AnnotationSet), for a list view that would otherwise ask once per set.One query for the whole page rather than N: the per-dataset annotation set list routinely returns every set on a dataset, and folding dispositions in one set at a time turns that list into an N+1.
- Specified by:
findStandingBySetIdsin interfaceAnnotationSetDispositionDao- Returns:
- annotation set id -> its standing rulings. Sets with no rulings are absent from the map.
-
deleteBySet
Description copied from interface:AnnotationSetDispositionDaoDelete every ruling on one set and report how many rows went.🛑 The one exception to the append-only rule above, and it is not a curator's tool. It exists for a do-over after a fault — a calibration package rebuilt, a wire-schema bug that made the rulings meaningless — where the rows record a mistake rather than a decision, and the superseding-row mechanism would preserve exactly the noise the caller is trying to be rid of. A curator who has changed their mind rules again; that is what
ruleis for.- Specified by:
deleteBySetin interfaceAnnotationSetDispositionDao- Returns:
- how many rulings were deleted; 0 when there were none
-