Merge branch 'change-to-polymorphie' of https://github.com/hhu-propra2/abschlussprojekt-it-bois into change-to-polymorphie
This commit is contained in:
@ -3,6 +3,7 @@ package mops.gruppen2.domain.event;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import mops.gruppen2.domain.Group;
|
||||
|
||||
/**
|
||||
* Ändert nur die Gruppenbeschreibung.
|
||||
@ -13,13 +14,12 @@ import lombok.NoArgsConstructor;
|
||||
public class UpdateGroupDescriptionEvent extends Event {
|
||||
String newGroupDescription;
|
||||
|
||||
public UpdateGroupDescriptionEvent(Long event_id, Long group_id, String user_id, String newGroupDescription) {
|
||||
super(event_id, group_id, user_id);
|
||||
this.newGroupDescription = newGroupDescription;
|
||||
}
|
||||
|
||||
public UpdateGroupDescriptionEvent(Long group_id, String user_id, String newGroupDescription) {
|
||||
super(group_id, user_id);
|
||||
this.newGroupDescription = newGroupDescription;
|
||||
}
|
||||
|
||||
public void apply(Group group) {
|
||||
group.setDescription(this.newGroupDescription);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package mops.gruppen2.domain.event;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import mops.gruppen2.domain.Group;
|
||||
|
||||
/**
|
||||
* Ändert nur den Gruppentitel.
|
||||
@ -13,13 +14,13 @@ import lombok.NoArgsConstructor;
|
||||
public class UpdateGroupTitleEvent extends Event {
|
||||
String newGroupTitle;
|
||||
|
||||
public UpdateGroupTitleEvent(Long event_id, Long group_id, String user_id, String newGroupTitle) {
|
||||
super(event_id, group_id, user_id);
|
||||
this.newGroupTitle = newGroupTitle;
|
||||
}
|
||||
|
||||
public UpdateGroupTitleEvent(Long group_id, String user_id, String newGroupTitle) {
|
||||
super(group_id, user_id);
|
||||
this.newGroupTitle = newGroupTitle;
|
||||
}
|
||||
|
||||
public void apply(Group group) {
|
||||
group.setTitle(this.newGroupTitle);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user