1

change CreateGroupEvent

Co-Authored-By: Lukas Ettel <lukasettel@users.noreply.github.com>
Co-Authored-By: tomvahl <tomvahl@users.noreply.github.com>
Co-Authored-By: xxnitram <xxnitram@users.noreply.github.com>
Co-Authored-By: kasch309 <kasch309@users.noreply.github.com>
This commit is contained in:
killerber4t
2020-03-16 15:36:28 +01:00
parent 314336fd5a
commit 22eede051b
8 changed files with 28 additions and 60 deletions

View File

@ -3,6 +3,7 @@ package mops.gruppen2.domain.event;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import mops.gruppen2.domain.Group;
import mops.gruppen2.domain.GroupType;
import mops.gruppen2.domain.Visibility;
@ -14,10 +15,19 @@ public class CreateGroupEvent extends Event {
private Long groupParent;
private GroupType groupType;
public CreateGroupEvent(Long group_id, String user_id, Long parent, GroupType type, Visibility visibility) {
super(group_id, user_id);
this.groupParent = parent;
this.groupType = type;
this.groupVisibility = visibility;
}
public void apply(Group group) {
group.setId(this.group_id);
group.setParent(this.groupParent);
group.setType(this.groupType);
group.setVisibility(this.groupVisibility);
}
}