From ada6f9c90fccf760ae96a5d78357df927d859e40 Mon Sep 17 00:00:00 2001 From: Rajbir Singh Date: Wed, 23 Oct 2024 14:45:59 +0200 Subject: [PATCH] PMT-40 Mapper --- src/main/java/de/hmmh/pmt/util/Mapper.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/de/hmmh/pmt/util/Mapper.java b/src/main/java/de/hmmh/pmt/util/Mapper.java index 6c13bb7..949e046 100644 --- a/src/main/java/de/hmmh/pmt/util/Mapper.java +++ b/src/main/java/de/hmmh/pmt/util/Mapper.java @@ -72,4 +72,17 @@ public class Mapper { project.setPlannedEnd(dto.getPlannedEnd()); return project; } + + public de.hmmh.pmt.dtos.Project mapProject(Project project){ + de.hmmh.pmt.dtos.Project dto = new de.hmmh.pmt.dtos.Project(); + dto.setId(project.getId()); + dto.setName(project.getName()); + dto.setGoal(project.getGoal()); + dto.setCustomerId(project.getCustomerId()); + dto.setAdministratorId(project.getAdministratorId()); + dto.setStart(project.getStart()); + dto.setPlannedEnd(project.getPlannedEnd()); + dto.setRealEnd(project.getRealEnd()); + return dto; + } }