Class PipelineJobValueObject

java.lang.Object
ubic.gemma.model.pipeline.PipelineJobValueObject
All Implemented Interfaces:
Serializable

public class PipelineJobValueObject extends Object implements Serializable
Value object projection of PipelineJob for the REST surface.

Why this exists

PipelineJob.getExperiment() is a lazy @ManyToOne to the ExpressionExperiment entity. Returning the entity published that whole object graph and risked serializing it; PipelineJobBatchValueObject has the detail. The experiment is carried here as an id, which a caller resolves through GET /datasets/{id} when it needs more than that.

The event log is not embedded either. It is unbounded and paged separately at GET /admin/pipeline/batches/{batchId}/jobs/{jobId}/events.

Author:
phase3
See Also:
  • Constructor Details

    • PipelineJobValueObject

      public PipelineJobValueObject()
  • Method Details

    • from

      public static PipelineJobValueObject from(PipelineJob job)
      Project a job.

      Reads the batch and experiment identifiers off their proxies rather than the entities, which does not initialize either — the same thing PipelineJob.equals(Object) relies on. That is what keeps this callable for a job loaded without its associations fetched.

    • getId

      public Long getId()
    • getBatchId

      public Long getBatchId()
    • getExperimentId

      public Long getExperimentId()
    • getState

      public JobState getState()
    • getSchedulerKind

      @Nullable public SchedulerKind getSchedulerKind()
    • getSchedulerHandle

      @Nullable public String getSchedulerHandle()
    • getSubmittedAt

      @Nullable public Date getSubmittedAt()
    • getStartedAt

      @Nullable public Date getStartedAt()
    • getFinishedAt

      @Nullable public Date getFinishedAt()
    • getLastEventAt

      @Nullable public Date getLastEventAt()
    • getLastEventKind

      @Nullable public String getLastEventKind()
    • getLastProgressJson

      @Nullable public String getLastProgressJson()
    • getErrorMessage

      @Nullable public String getErrorMessage()
    • setId

      public void setId(Long id)
    • setBatchId

      public void setBatchId(Long batchId)
    • setExperimentId

      public void setExperimentId(Long experimentId)
    • setState

      public void setState(JobState state)
    • setSchedulerKind

      public void setSchedulerKind(@Nullable SchedulerKind schedulerKind)
    • setSchedulerHandle

      public void setSchedulerHandle(@Nullable String schedulerHandle)
    • setSubmittedAt

      public void setSubmittedAt(@Nullable Date submittedAt)
    • setStartedAt

      public void setStartedAt(@Nullable Date startedAt)
    • setFinishedAt

      public void setFinishedAt(@Nullable Date finishedAt)
    • setLastEventAt

      public void setLastEventAt(@Nullable Date lastEventAt)
    • setLastEventKind

      public void setLastEventKind(@Nullable String lastEventKind)
    • setLastProgressJson

      public void setLastProgressJson(@Nullable String lastProgressJson)
    • setErrorMessage

      public void setErrorMessage(@Nullable String errorMessage)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object