1

added Creating Groups to frontend and saving them in Database. Also prepared some Methods for Snapshot db

This commit is contained in:
killerber4t
2020-03-09 23:21:29 +01:00
parent 006822b57d
commit 61e2d0edba
16 changed files with 120 additions and 38 deletions

View File

@ -4,6 +4,7 @@ import mops.gruppen2.domain.Group;
import mops.gruppen2.domain.event.Event;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
@ -15,9 +16,17 @@ public class GroupService {
* @param eventList Die Events für diese Gruppe
* @return Gruppe auf aktuellem Stand
*/
Group buildGroupFromEvents(List<Event> eventList) {
public Group buildGroupFromEvents(List<Event> eventList) {
Group newGroup = new Group();
newGroup.apply(eventList);
return newGroup;
}
public Group buildGroupFromEvent(Event event){
Group newGroup = new Group();
List<Event> eventList = new ArrayList<>();
eventList.add(event);
newGroup.apply(eventList);
return newGroup;
}
}