@Transactional
  public void removeAll(long clusterId) {
    List<UpgradeEntity> entities = findUpgrades(clusterId);

    for (UpgradeEntity entity : entities) {
      entityManagerProvider.get().remove(entity);
    }
  }
Removes all upgrades associated with the cluster.
@param clusterId the cluster id
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/UpgradeDAO.java