From c2a32d6c278f59092d7689155b5948a0528a05dc Mon Sep 17 00:00:00 2001 From: T-Midnight Date: Sun, 23 Dec 2018 02:22:31 +0400 Subject: [PATCH] Update ProjectDto --- .../ru/ulstu/project/model/ProjectDto.java | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/main/java/ru/ulstu/project/model/ProjectDto.java b/src/main/java/ru/ulstu/project/model/ProjectDto.java index 69e9b1b..81c3c91 100644 --- a/src/main/java/ru/ulstu/project/model/ProjectDto.java +++ b/src/main/java/ru/ulstu/project/model/ProjectDto.java @@ -10,12 +10,12 @@ import java.util.List; import static ru.ulstu.core.util.StreamApiUtils.convert; public class ProjectDto { - private final Integer id; - + private Integer id; @NotEmpty - private final String title; + private String title; + private List deadlines; - private final List deadlines; + public ProjectDto() {} @JsonCreator public ProjectDto(@JsonProperty("id") Integer id, @@ -26,6 +26,7 @@ public class ProjectDto { this.deadlines = deadlines; } + public ProjectDto(Project project) { this.id = project.getId(); this.title = project.getTitle(); @@ -39,4 +40,19 @@ public class ProjectDto { public String getTitle() { return title; } + + public void setId(Integer id) { + this.id = id; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setDeadlines(List deadlines) { + this.deadlines = deadlines; + } + public List getDeadlines() { + return deadlines; + } }