Exchange name

This commit is contained in:
Filip Izydorczyk 2021-01-20 15:53:07 +01:00
parent 20f52746b5
commit 20a6db61cc
1 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,7 @@ public class ExchangeResponse {
private GroupDefaultResponse ownedAssignment;
@ApiModelProperty(value = "Group that user want to get")
private GroupDefaultResponse desiredGroup;
private String courseName;
/**
* creat new instance
@ -26,6 +27,14 @@ public class ExchangeResponse {
this.id = exchange.getId();
this.ownedAssignment = new GroupDefaultResponse(exchange.getOwnedAssignment().getGroup());
this.desiredGroup = new GroupDefaultResponse(exchange.getDesiredAssignment());
this.courseName = exchange.getOwnedAssignment().getGroup().getCourseId().getName();
}
/**
* @return name of course related to exchange
*/
public String getCourseName() {
return courseName;
}
/**