@RequiresSession
  public List<ClusterConfigEntity> getEnabledConfigsByTypes(Long clusterId, Collection<String> types) {
    TypedQuery<ClusterConfigEntity> query = entityManagerProvider.get().createNamedQuery(
        "ClusterConfigEntity.findEnabledConfigsByTypes",
      ClusterConfigEntity.class);

    query.setParameter("clusterId", clusterId);
    query.setParameter("types", types);

    return daoUtils.selectList(query);
  }
Looks for Cluster by ID
@param id ID of Cluster
@return Found entity or NULL
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java