Class Thaws

java.lang.Object
ubic.gemma.persistence.util.Thaws

public class Thaws extends Object
Consistent initialization logic for the entity graph.
  • Constructor Details

    • Thaws

      public Thaws()
  • Method Details

    • thawDatabaseEntry

      public static void thawDatabaseEntry(DatabaseEntry databaseEntry)
    • thawCurationDetails

      public static void thawCurationDetails(Curatable curatable)
      Thaw the CurationDetails of a curatable entity, including the three last*Event associations hanging off it.

      Initializing the CurationDetails on its own is not enough: lastTroubledEvent, lastNeedsAttentionEvent and lastNoteUpdateEvent are separately lazy AuditEvent references, and every curatable value object reads all three in its constructor (see AbstractCuratableValueObject and CurationDetailsValueObject).

      A REST method that thaws through one @Transactional service call and then builds the value object through another one spans two sessions, so whatever the thaw left as a proxy is dead by the time the VO is built. That is what made GET /datasets/{id}/refresh answer Could not initialize proxy [AuditEvent#…] - no session on every call, which in turn meant the post-write cache eviction the CLI performs never ran.

    • thawBibliographicReference

      public static void thawBibliographicReference(BibliographicReference br)
    • thawBioAssayDimension

      public static void thawBioAssayDimension(BioAssayDimension bioAssayDimension)
    • thawBioAssay

      public static void thawBioAssay(BioAssay ba)
      Thaw the given BioAssay.

      The corresponding biomaterial is also thawed with thawBioMaterial(BioMaterial).

    • thawBioAssayPlatforms

      public static void thawBioAssayPlatforms(BioAssay ba)
      Thaw the platform-side associations of a BioAssay without walking its sampleUsed BioMaterial chain.

      Used by callers that batch-thaw the BioMaterial side via BioMaterialDao#thawBioMaterialsForBioAssays, where the per-BA source-chain walk in thawBioAssay(BioAssay) would re-introduce the N+1 pattern the batched call exists to eliminate. The platform-side init remains a cheap proxy/eager touch (one or two round-trips per BA at most).

    • thawBioMaterial

      public static void thawBioMaterial(BioMaterial bm2)
      Thaw the given BioMaterial.

      The following fields are initialized: sourceTaxon, treatments and factorValues.experimentalFactor.

      If the bioMaterial has a sourceBioMaterial, it is thawed as well, recursively. Circular references are detected and will result in a IllegalStateException.

    • thawSingleCellDimension

      public static void thawSingleCellDimension(SingleCellDimension singleCellDimension)
      Thaw a single-cell dimension.
    • thawCellTypeAssignment

      public static void thawCellTypeAssignment(CellTypeAssignment cellTypeAssignment)