Skip to content

Commit

Permalink
Merge pull request #38 from HBPMedical/fix/added_miliseconds_in_exper…
Browse files Browse the repository at this point in the history
…imentDAO_print

Added miliseconds in ExperimentDAO toString.
  • Loading branch information
KFilippopolitis authored Apr 19, 2022
2 parents f373cbf + 5b0bb8f commit fd945a4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/java/eu/hbp/mip/models/DAOs/ExperimentDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import lombok.Data;

import javax.persistence.*;
import java.text.SimpleDateFormat;
import java.util.*;

/**
Expand Down Expand Up @@ -86,6 +87,27 @@ public enum Status {
success
}

@Override
public String toString() {
String finishedDT = "";
if (this.finished != null)
finishedDT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(this.finished);

return "ExperimentDAO(uuid=" + this.uuid +
", name=" + this.name +
", createdBy=" + this.createdBy +
", workflowHistoryId=" + this.workflowHistoryId +
", status=" + this.status +
", result=" + this.result +
", finished=" + finishedDT +
", algorithm=" + this.algorithm +
", algorithmId=" + this.algorithmId +
", created=" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(this.created) +
", updated=" + this.updated +
", shared=" + this.shared +
", viewed=" + this.viewed + ")";
}

public ExperimentDAO() {
/*
* Empty constructor is needed by Hibernate
Expand Down

0 comments on commit fd945a4

Please sign in to comment.