public static Event convertToEvent(RecordableEvent event){
  Event dbEvent=new Event();
  dbEvent.setTimeInMillis(event.getTimestamp());
  dbEvent.setEventType(event.getType());
  dbEvent.setTenantId(event.getTenantId());
  dbEvent.setProjectId(event.getProjectId());
  dbEvent.setUserId(event.getUserId());
  dbEvent.setVirtualPool(event.getVirtualPool());
  dbEvent.setService(event.getService());
  dbEvent.setResourceId(event.getResourceId());
  dbEvent.setSeverity(event.getSeverity());
  dbEvent.setDescription(event.getDescription());
  dbEvent.setExtensions(event.getExtensions());
  dbEvent.setEventId(event.getEventId());
  dbEvent.setAlertType(event.getAlertType());
  dbEvent.setRecordType(event.getRecordType());
  dbEvent.setNativeGuid(event.getNativeGuid());
  dbEvent.setOperationalStatusCodes(event.getOperationalStatusCodes());
  dbEvent.setOperationalStatusDescriptions(event.getOperationalStatusDescriptions());
  dbEvent.setEventSource(event.getSource());
  return dbEvent;
}

public static Event convertToEvent ( RecordableEvent event ) { Event dbEvent = new Event ( ) ; dbEvent . setTimeInMillis ( event . getTimestamp ( ) ) ; dbEvent . setEventType ( event . getType ( ) ) ; dbEvent . setTenantId ( event . getTenantId ( ) ) ; dbEvent . setProjectId ( event . getProjectId ( ) ) ; dbEvent . setUserId ( event . getUserId ( ) ) ; dbEvent . setVirtualPool ( event . getVirtualPool ( ) ) ; dbEvent . setService ( event . getService ( ) ) ; dbEvent . setResourceId ( event . getResourceId ( ) ) ; dbEvent . setSeverity ( event . getSeverity ( ) ) ; dbEvent . setDescription ( event . getDescription ( ) ) ; dbEvent . setExtensions ( event . getExtensions ( ) ) ; dbEvent . setEventId ( event . getEventId ( ) ) ; dbEvent . setAlertType ( event . getAlertType ( ) ) ; dbEvent . setRecordType ( event . getRecordType ( ) ) ; dbEvent . setNativeGuid ( event . getNativeGuid ( ) ) ; dbEvent . setOperationalStatusCodes ( event . getOperationalStatusCodes ( ) ) ; dbEvent . setOperationalStatusDescriptions ( event . getOperationalStatusDescriptions ( ) ) ; dbEvent . setEventSource ( event . getSource ( ) ) ; return dbEvent ; }
converts a recordableevent to an event model
