@Override
  public QueryResponse queryForResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException,
      NoSuchResourceException, NoSuchParentResourceException {

    Set<Resource> results = getResources(request, predicate);

    return new QueryResponseImpl(results, request.getSortRequest() != null, false, results.size());
  }
Constructor.

@param managementController  the Ambari management controller
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java