use of com.serotonin.m2m2.vo.comment.UserCommentVO in project ma-core-public by infiniteautomation.
the class EventDao method insertEvent.
private void insertEvent(EventInstance event) {
EventType type = event.getEventType();
Object[] args = new Object[11];
args[0] = type.getEventType();
args[1] = type.getEventSubtype();
args[2] = type.getReferenceId1();
args[3] = type.getReferenceId2();
args[4] = event.getActiveTimestamp();
args[5] = boolToChar(event.isRtnApplicable());
if (!event.isActive()) {
args[6] = event.getRtnTimestamp();
args[7] = event.getRtnCause();
}
args[8] = event.getAlarmLevel();
args[9] = writeTranslatableMessage(event.getMessage());
// For None Level Events
// if (event.getAlarmLevel() == AlarmLevels.DO_NOT_LOG) {
// event.setAcknowledgedTimestamp(event.getActiveTimestamp());
// args[10] = event.getAcknowledgedTimestamp();
// }
event.setId(doInsert(EVENT_INSERT, args, EVENT_INSERT_TYPES));
event.setEventComments(new LinkedList<UserCommentVO>());
}
Aggregations