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 *