@RequiresSession
  public List<ClusterConfigEntity> getEnabledConfigs(long clusterId) {

    TypedQuery<ClusterConfigEntity> query = entityManagerProvider.get().createNamedQuery(
        "ClusterConfigEntity.findEnabledConfigs", ClusterConfigEntity.class);

    query.setParameter("clusterId", clusterId);

    return daoUtils.selectList(query);
  }
Gets the latest configurations for the specified cluster.

@param clusterId
         the cluster that the service is a part of.
@return the latest configurations for the specified cluster.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java