fix(module-web,module-ejb): add user count to boardGameShortDto

This commit is contained in:
Damian Pierzchalski 2018-12-17 21:17:40 +01:00
parent 1fb7b29d55
commit 44e6ff895b

View File

@ -15,7 +15,7 @@ public class BoardGameShortDto {
private Long id;
private String name;
private int ownerCount;
public BoardGameShortDto() {
@ -24,6 +24,7 @@ public class BoardGameShortDto {
public BoardGameShortDto(BoardGameEntity aBoardGame) {
id = aBoardGame.getId();
name = aBoardGame.getName();
ownerCount = aBoardGame.getUsers().size();
}
public Long getId() {
@ -42,4 +43,12 @@ public class BoardGameShortDto {
this.name = name;
}
public int getOwnerCount() {
return ownerCount;
}
public void setOwnerCount(int ownerCount) {
this.ownerCount = ownerCount;
}
}