public static Event map ( EventType eventType ) { Event event = new Event ( ) ; event . setEventType ( mapEventTypeEnum ( eventType . getEventType ( ) ) ) ; Date date = ( eventType . getTimestamp ( ) == null ) ? new Date ( ) : eventType . getTimestamp ( ) . toGregorianCalendar ( ) . getTime ( ) ; event . setTimestamp ( date ) ; event . setOriginator ( mapOriginatorType ( eventType . getOriginator ( ) ) ) ; MessageInfo messageInfo = mapMessageInfo ( eventType . getMessageInfo ( ) ) ; event . setMessageInfo ( messageInfo ) ; String content = mapContent ( eventType . getContent ( ) ) ; event . setContent ( content ) ; event . getCustomInfo ( ) . clear ( ) ; event . getCustomInfo ( ) . putAll ( mapCustomInfo ( eventType . getCustomInfo ( ) ) ) ; return event ; }
Map the EventType .