Added changes

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
Marcin Woźniak 2021-01-06 12:41:49 +01:00
parent 3b80a70921
commit cfc1e3eba7
Signed by: y0rune
GPG Key ID: F204C385F57EB348
2 changed files with 20 additions and 1 deletions

View File

@ -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);

View File

@ -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
*