brigning down group tpes
This commit is contained in:
@ -50,8 +50,8 @@ public class AssignmentResponse {
|
||||
* @param group class/lecture entity
|
||||
*/
|
||||
public AssignmentResponse(Course course, Groups group) {
|
||||
this(course, group.getType() == GroupType.LECTURE ? group : null,
|
||||
group.getType() == GroupType.CLASS ? group : null);
|
||||
this(course, GroupType.isLectureOrClass(group.getType()) == GroupType.LECTURE ? group : null,
|
||||
GroupType.isLectureOrClass(group.getType()) == GroupType.CLASS ? group : null);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -61,8 +61,8 @@ public class AssignmentResponse {
|
||||
* places
|
||||
*/
|
||||
public AssignmentResponse(Course course, Groups group, HashMap<Long, Integer> ammounts) {
|
||||
this(course, group.getType() == GroupType.LECTURE ? group : null,
|
||||
group.getType() == GroupType.CLASS ? group : null, ammounts);
|
||||
this(course, GroupType.isLectureOrClass(group.getType()) == GroupType.LECTURE ? group : null,
|
||||
GroupType.isLectureOrClass(group.getType()) == GroupType.CLASS ? group : null, ammounts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ public class CoursesWithGroupsResponse extends CoursesResponse {
|
||||
public CoursesWithGroupsResponse(Course course) {
|
||||
super(course);
|
||||
course.getGroups().stream().forEach(group -> {
|
||||
if (group.getType() == GroupType.CLASS) {
|
||||
if (GroupType.isLectureOrClass(group.getType()) == GroupType.CLASS) {
|
||||
this.classes.add(new GroupWithCapacityResponse(group));
|
||||
} else {
|
||||
this.lectures.add(new GroupWithCapacityResponse(group));
|
||||
|
Reference in New Issue
Block a user