public static AlertCacheKey build(AlertCurrentEntity current) {
      AlertHistoryEntity history = current.getAlertHistory();
      AlertCacheKey key = new AlertCacheKey(history.getClusterId(),
          history.getAlertDefinition().getDefinitionName(), history.getHostName());

      return key;
    }
Builds a key from an entity.

@param current
         the entity to create the key for.
@return the key (never {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java