function fetchModel (model) {
    return new Promise(function (resolve, reject) {
      var subscribeToFinalStatus = false;

      if (model.shouldFetch()) {
        model.fetch();
        subscribeToFinalStatus = true;
      } else if (!model.isInFinalStatus()) {
        subscribeToFinalStatus = true;
      } else {
        resolve();
      }

      if (subscribeToFinalStatus) {
        model.once('inFinalStatus', function () {
          resolve();
        });
      }
    });
  }
Fetch all query objects (querySchemaModel, queryGeometryModel, queryRowsCollection)
 if necessary