use of org.opennms.netmgt.model.OnmsReductionKeyMemo in project opennms by OpenNMS.
the class AlarmRepositoryHibernate method updateReductionKeyMemo.
/**
* {@inheritDoc}
*/
@Override
@Transactional
public void updateReductionKeyMemo(Integer alarmId, String body, String user) {
OnmsAlarm onmsAlarm = m_alarmDao.get(alarmId);
if (onmsAlarm != null) {
OnmsReductionKeyMemo memo = onmsAlarm.getReductionKeyMemo();
if (memo == null) {
memo = new OnmsReductionKeyMemo();
memo.setCreated(new Date());
}
memo.setBody(body);
memo.setAuthor(user);
memo.setReductionKey(onmsAlarm.getReductionKey());
memo.setUpdated(new Date());
m_memoDao.saveOrUpdate(memo);
onmsAlarm.setReductionKeyMemo(memo);
}
}
Aggregations