@RequiresSession
  public List<HostVersionEntity> findByCluster(String  clusterName) {
    final TypedQuery<HostVersionEntity> query = entityManagerProvider.get()
        .createNamedQuery("findByCluster", HostVersionEntity.class);
    query.setParameter("clusterName", clusterName);

    return daoUtils.selectList(query);
  }
Retrieve all of the cluster versions for the given cluster name.

@param clusterName Cluster name
@return Return all of the host versions that match the criteria.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java