/** {@inheritDoc} */ public void updateData(Event e) throws BusinessException { Event dbEntry = eventDAO.retrieve(e.getId()); // Sets event data dbEntry.setEventData(e); notificationFacade.createNotificationForEventChange(e.getId()); // Updates scheduling and checks weather forecasts updateScheduling(dbEntry, e.getStart(), e.getEnd()); eventDAO.update(dbEntry); }
private boolean updateScheduling(Event e, LocalDateTime start, LocalDateTime end) throws InvalidInputException, NotFoundException { boolean schedulingChanged = false; Event.validateScheduling(start, end); if (e.setScheduling(start, end)) { schedulingChanged = true; eventDAO.update(e); eventDAO.flush(); updateWeatherForecastsAsync(e); } return schedulingChanged; }