@@ -0,0 +1,821 @@
+package fr.alecharp.picshare.service;%0A%0Aimport fr.alecharp.picshare.domain.Event;%0Aimport fr.alecharp.picshare.repository.EventRepository;%0A%0Aimport javax.inject.Inject;%0Aimport javax.inject.Singleton;%0Aimport java.util.Optional;%0A%0A/**%0A * @author Adrien Lecharpentier%0A */%0A@Singleton%0Apublic class EventService %7B%0A    private final EventRepository eventRepository;%0A%0A    @Inject%0A    public EventService(EventRepository eventRepository) %7B%0A        this.eventRepository = eventRepository;%0A    %7D%0A%0A    public Optional%3CEvent%3E save(Event event) %7B%0A        event = eventRepository.save(event);%0A        return Optional.ofNullable(event);%0A    %7D%0A%0A    public void remove(String id) %7B%0A        eventRepository.delete(id);%0A    %7D%0A%0A    public Optional%3CEvent%3E get(String id) %7B%0A        return Optional.ofNullable(eventRepository.findById(id));%0A    %7D%0A%7D%0A

Create event service