return createHistoricIncidentEvt(incident, HistoryEventTypes.INCIDENT_DELETE);
}
protected HistoryEvent createHistoricIncidentEvt(Incident incident, HistoryEventTypes eventType) {
// create event
HistoricIncidentEventEntity evt = loadIncidentEvent(incident);
// initialize
initHistoricIncidentEvent(evt, incident, eventType);
if (!HistoryEventTypes.INCIDENT_CREATE.equals(eventType)) {
evt.setEndTime(ClockUtil.getCurrentTime());
}
return evt;
}