added Creating Groups to frontend and saving them in Database. Also prepared some Methods for Snapshot db
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user