Class SingleCellDimensionExperiment
- All Implemented Interfaces:
Identifiable
SingleCellDimension attached to a given
ExpressionExperiment / QuantitationType pair.
Backed by the SINGLE_CELL_DIMENSION_EXPERIMENT table introduced in MySQL migration V7 /
H2 migration V9. Exists to replace the 30+ "scan SCEDV, group by SingleCellDimension" HQLs in
ExpressionExperimentDaoImpl with
single-row index lookups against a ~528-row link table — see PERF_PROBE_REPORT_ROUND4.md
finding B1.
Today every (EE, QT) maps to exactly one SingleCellDimension; the schema enforces
that via a unique constraint on (EXPRESSION_EXPERIMENT_FK, QUANTITATION_TYPE_FK).
Cross-version compatibility. This branch shares its database with the deployed production
Gemma, which has no mapping for this table. All three foreign keys are therefore declared
ON DELETE CASCADE at the schema level (MySQL migration V23 / H2 V24) so that the older
code can delete an ExpressionExperiment, a QuantitationType or a
SingleCellDimension without tripping over link rows it cannot see. JPA's
ForeignKey annotation cannot express a delete rule, so the cascade lives only in the
migrations — do not regenerate these constraints from the annotations alone, and keep the
ON DELETE CASCADE if this mapping is ever ported to a different DDL source.
The cascade is a safety net, not the primary teardown path: callers still clear rows explicitly
via SingleCellDimensionExperimentDao.removeByEE, removeByEEAndQt and
removeBySingleCellDimension. Because this is a cache derived from
SINGLE_CELL_EXPRESSION_DATA_VECTOR, a cascaded row is never a loss of source data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanImportant note: Two objects with the same class and non-null ID must be considered equal.inthashCode()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.voidsetExpressionExperiment(ExpressionExperiment expressionExperiment) voidsetQuantitationType(QuantitationType quantitationType) voidsetSingleCellDimension(SingleCellDimension singleCellDimension) Methods inherited from class AbstractIdentifiable
getId, setId, toString
-
Constructor Details
-
SingleCellDimensionExperiment
public SingleCellDimensionExperiment()
-
-
Method Details
-
hashCode
public int hashCode()Description copied from class:AbstractIdentifiableImportant note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Specified by:
hashCodein classAbstractIdentifiable
-
equals
Description copied from class:AbstractIdentifiableImportant note: Two objects with the same class and non-null ID must be considered equal. If one or both IDs are nulls, the rest of the state can be used to determine equality.- Specified by:
equalsin classAbstractIdentifiable
-
getExpressionExperiment
-
getQuantitationType
-
getSingleCellDimension
-
setExpressionExperiment
-
setQuantitationType
-
setSingleCellDimension
-