Class SingleCellDimensionExperiment

java.lang.Object
ubic.gemma.model.common.AbstractIdentifiable
ubic.gemma.model.expression.bioAssayData.SingleCellDimensionExperiment
All Implemented Interfaces:
Identifiable

@Entity public class SingleCellDimensionExperiment extends AbstractIdentifiable
Denormalized link row that records the 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 Details

    • SingleCellDimensionExperiment

      public SingleCellDimensionExperiment()
  • Method Details

    • hashCode

      public int hashCode()
      Description copied from class: AbstractIdentifiable
      Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.
      Specified by:
      hashCode in class AbstractIdentifiable
    • equals

      public boolean equals(Object object)
      Description copied from class: AbstractIdentifiable
      Important 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:
      equals in class AbstractIdentifiable
    • getExpressionExperiment

      public ExpressionExperiment getExpressionExperiment()
    • getQuantitationType

      public QuantitationType getQuantitationType()
    • getSingleCellDimension

      public SingleCellDimension getSingleCellDimension()
    • setExpressionExperiment

      public void setExpressionExperiment(ExpressionExperiment expressionExperiment)
    • setQuantitationType

      public void setQuantitationType(QuantitationType quantitationType)
    • setSingleCellDimension

      public void setSingleCellDimension(SingleCellDimension singleCellDimension)