From cfc1e3eba7f85a05d0fbf5b2b5d9b272f94fcee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Wed, 6 Jan 2021 12:41:49 +0100 Subject: [PATCH] Added changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .../configutils/FileToDatabaseMigrator.java | 2 +- .../java/com/plannaplan/entities/Groups.java | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/buisnesslogic/src/main/java/com/plannaplan/configutils/FileToDatabaseMigrator.java b/buisnesslogic/src/main/java/com/plannaplan/configutils/FileToDatabaseMigrator.java index 744653a..ad955f9 100755 --- a/buisnesslogic/src/main/java/com/plannaplan/configutils/FileToDatabaseMigrator.java +++ b/buisnesslogic/src/main/java/com/plannaplan/configutils/FileToDatabaseMigrator.java @@ -97,7 +97,7 @@ public class FileToDatabaseMigrator { .save(new Lecturer(lecturerTitle, lecturerName, lecturerSurname))); Groups group = this.groupService.find(zajCykId, grNr).orElseGet( - () -> new Groups(capacity, room, course, time, capacity, groupDay, lecturer, zajCykId, grNr, typeGroup)); + () -> new Groups(capacity, room, course, time, groupDay, lecturer, zajCykId, grNr, typeGroup)); group.update(capacity, room, course, time, null, groupDay, lecturer, typeGroup); this.groupService.save(group); diff --git a/buisnesslogic/src/main/java/com/plannaplan/entities/Groups.java b/buisnesslogic/src/main/java/com/plannaplan/entities/Groups.java index 2a12410..9bf05ae 100755 --- a/buisnesslogic/src/main/java/com/plannaplan/entities/Groups.java +++ b/buisnesslogic/src/main/java/com/plannaplan/entities/Groups.java @@ -116,6 +116,25 @@ public class Groups { this.type = type; } + /** + * Groups + * + * @param capacity capacity given to the groups + * @param room room given to the groups + * @param course course given to the groups + * @param time time given to the groups + * @param day day given to the groups + * @param lecturer lecturer given to the groups + * @param zajCykId number of class in the term + * @param grNr Number of class/course + * @param type type of class/cource + */ + public Groups(int capacity, String room, Course course, int time, WeekDay day, Lecturer lecturer, + Integer zajCykId, Integer grNr, GroupType type) { + this(capacity, room, course, time, time + DEFAULT_CLASS_TIME, day, lecturer, zajCykId, grNr); + this.type = type; + } + /** * Groups *