Class ArrayDesignPersister
Persister-shrink S2c: lifted out of the GenomePersister inheritance chain
into a concrete @Component. Genome and Common collaboration is via
@Autowired fields (genome, common); the protected
doPersist entry point remains so the still-extant RelationshipPersister
chain keeps compiling (delegates to persistArrayDesign(ArrayDesign) for the AD arm,
falls through to genome.doGenome / common.doCommon, then throws).
Phase 3 persister retirement: rewired to BusinessKey.find(Session, ArrayDesign)
for the root-level "find existing" lookup, with the compositeSequences and
externalReferences collections flowing through Hibernate's cascade="all"
on ArrayDesign.getCompositeSequences() and ArrayDesign.getExternalReferences()
(see ArrayDesign.hbm.xml). The remaining responsibilities here are:
- Pre-resolve
BioSequenceper composite sequence — BioSequences have their own lifecycle (shared across array designs) and are not cascaded from CompositeSequence; they must be looked up / created beforedao.create. - Pre-resolve the design provider, primary taxon, and the external database for each
external reference — these are
many-to-oneassociations without cascade.
The ArrayDesignsForExperimentCache contract is unaffected: that cache is populated
explicitly by ExpressionExperimentPrePersistServiceImpl and GeoServiceImpl,
never as a side effect of this persister.
- Author:
- pavlidis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoArrayDesign(Object entity, Map<String, ExternalDatabase> xdbCache) Persister-shrink S2c typed dispatch: returnsnullif the entity is not anArrayDesign.protected <T extends Identifiable>
TdoPersist(T entity, Map<String, ExternalDatabase> xdbCache) Polymorphic dispatch entry point reached byRelationshipPersistervia the still-extant inheritance chain.protected <T extends Identifiable>
TdoPersistOrUpdate(T entity, Map<String, ExternalDatabase> xdbCache) Polymorphic persist-or-update dispatch entry point reached by the chain.protected SessionFactorypersistArrayDesign(ArrayDesign arrayDesign) Persister-shrink S3 public entry point: find an existing ArrayDesign by business key, else create.persistArrayDesign(ArrayDesign arrayDesign, Map<String, ExternalDatabase> xdbCache, Map<Object, Taxon> taxonCache, Map<Integer, Chromosome> chromosomeCache) Look up an existing ArrayDesign by business key (shortName, alternate names, or name — seeBusinessKey.matches(CriteriaBuilder, From, ArrayDesign)); otherwise create a new one along with its full graph.
-
Constructor Details
-
ArrayDesignPersister
public ArrayDesignPersister()
-
-
Method Details
-
getSessionFactory
-
doPersist
@Nullable protected <T extends Identifiable> T doPersist(T entity, Map<String, ExternalDatabase> xdbCache) Polymorphic dispatch entry point reached byRelationshipPersistervia the still-extant inheritance chain. Handles the AD arm itself; everything else falls through toGenomePersister.doGenome(T, Map)thenCommonPersister.doCommon(T, Map), else throws. -
doPersistOrUpdate
protected <T extends Identifiable> T doPersistOrUpdate(T entity, Map<String, ExternalDatabase> xdbCache) Polymorphic persist-or-update dispatch entry point reached by the chain. AD does not own any update arm of its own; everything routes through Genome. -
doArrayDesign
Persister-shrink S2c typed dispatch: returnsnullif the entity is not anArrayDesign. Used by the S2e dispatcher. -
persistArrayDesign
Persister-shrink S3 public entry point: find an existing ArrayDesign by business key, else create. Owns theFlushMode.MANUALwindow formerly carried byPersisterHelperImpl.persist(ubic.gemma.model.common.Identifiable); caches are fresh per call (matches prior PHI semantics). -
persistArrayDesign
public ArrayDesign persistArrayDesign(ArrayDesign arrayDesign, Map<String, ExternalDatabase> xdbCache, Map<Object, Taxon> taxonCache, Map<Integer, Chromosome> chromosomeCache) Look up an existing ArrayDesign by business key (shortName, alternate names, or name — seeBusinessKey.matches(CriteriaBuilder, From, ArrayDesign)); otherwise create a new one along with its full graph. Public after S2c so the S2e dispatcher (and future direct callers) can reach it.
-