@RequiresSession
  public List<UpgradeEntity> findUpgrades(long clusterId) {
    TypedQuery<UpgradeEntity> query = entityManagerProvider.get().createNamedQuery(
        "UpgradeEntity.findAllForCluster", UpgradeEntity.class);

    query.setParameter("clusterId", Long.valueOf(clusterId));

    return daoUtils.selectList(query);
  }
@param clusterId the cluster id
@return the list of upgrades initiated for the cluster
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/UpgradeDAO.java