@Transactional
  protected AlertCurrentEntity mergeTransactional(AlertCurrentEntity alert) {
    // perform the JPA merge
    alert = m_entityManagerProvider.get().merge(alert);

    // if caching is enabled, update the cache
    if( m_configuration.isAlertCacheEnabled() ){
      AlertCacheKey key = AlertCacheKey.build(alert);
      m_currentAlertCache.put(key, alert);
    }

    return alert;
  }
Merge the speicified current alert with the existing alert in the database.

@param alert
         the current alert to merge (not {@code null}).
@return the updated current alert with merged content (never {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java