Class PipelineJobBatchValueObject
- All Implemented Interfaces:
Serializable
PipelineJobBatch for the REST surface.
Why this exists
The admin pipeline endpoints returned the entity. Two lazy associations made that a problem:PipelineJobBatch.getJobs(), and PipelineJob.getExperiment() beneath it. Nothing
initialized either before the response left the resource method, and no @JsonIgnore
stopped Jackson walking them.
In the published specification the second one was the expensive half. Following
experiment pulled the ExpressionExperiment entity in, and from there
BioAssay, BioMaterial, FactorValue, Statement, the expression
vectors and the rest of the graph: 44 entity schemas and 466 properties that reached the document
through this one field and nowhere else.
A batch carries its jobs because the endpoint that serves one is documented as returning the
rolled-up state. Each job carries its experiment as an id; see PipelineJobValueObject.
- Author:
- phase3
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanstatic PipelineJobBatchValueObjectfrom(PipelineJobBatch batch) Project a batch without its jobs.getId()getJobs()getName()getState()inthashCode()voidsetClosedAt(Date closedAt) voidsetDescription(String description) voidvoidsetJobs(List<PipelineJobValueObject> jobs) voidsetKillRequestedAt(Date killRequestedAt) voidvoidsetParamsJson(String paramsJson) voidsetPipeline(String pipeline) voidvoidsetSubmittedAt(Date submittedAt) voidsetSubmittedById(Long submittedById) toString()static PipelineJobBatchValueObjectwithJobs(PipelineJobBatch batch) Project a batch together with its jobs.
-
Constructor Details
-
PipelineJobBatchValueObject
public PipelineJobBatchValueObject()
-
-
Method Details
-
from
Project a batch without its jobs.For a caller that only needs the batch's own fields.
getJobs()is left empty rather than null, so a client does not have to distinguish "not fetched" from "no jobs" — a batch always has at least one. -
withJobs
Project a batch together with its jobs.🛑 Reads
PipelineJobBatch.getJobs(), so it has to run inside the transaction that loaded the batch. Calling it from a resource method is the bug this class was written to fix. -
getId
-
getName
-
getDescription
-
getPipeline
-
getSubmittedById
-
getSubmittedAt
-
getParamsJson
-
getState
-
getKillRequestedAt
-
getClosedAt
-
getJobs
-
setId
-
setName
-
setDescription
-
setPipeline
-
setSubmittedById
-
setSubmittedAt
-
setParamsJson
-
setState
-
setKillRequestedAt
-
setClosedAt
-
setJobs
-
equals
-
canEqual
-
hashCode
-
toString
-