/** {@inheritDoc} */ @Override public void updateResolvedOutageWithEventId(int outageId, int regainedEventId) { LOG.info("updating resolved outage {} with event id {}", outageId, regainedEventId); final OnmsEvent event = m_eventDao.get(regainedEventId); final OnmsOutage outage = m_outageDao.get(outageId); if (outage == null) { LOG.warn("Failed to update outage {} with event id {}. The outage no longer exists.", outageId, regainedEventId); return; } // Update the outage outage.setServiceRegainedEvent(event); m_outageDao.saveOrUpdate(outage); }
/** {@inheritDoc} */ @Override public void updateOpenOutageWithEventId(int outageId, int lostEventId) { LOG.info("updating open outage {} with event id {}", outageId, lostEventId); final OnmsEvent event = m_eventDao.get(lostEventId); final OnmsOutage outage = m_outageDao.get(outageId); if (outage == null) { LOG.warn("Failed to update outage {} with event id {}. The outage no longer exists.", outageId, lostEventId); return; } // Update the outage outage.setServiceLostEvent(event); m_outageDao.saveOrUpdate(outage); }