code: protected String buildQueryString(Request request)
      {
          MultiMap resolvedParameters = null;
          if(parameterFactory != null)
          {
              resolvedParameters = parameterFactory.getParameters();
          }
  
          if(hasEntries(resolvedParameters))
              resolvedParameters = resolvedParameters.merge(request.getParameters());
          else
              resolvedParameters = request.getParameters();
  
          if(authorizationFactory != null)
          {
              MultiMap authEntries = authorizationFactory.getParameters();
              if(hasEntries(authEntries))
                  resolvedParameters = resolvedParameters.merge(authEntries);
          }
  
  
          int ct = 0;
          StringBuilder sb = new StringBuilder(512);
          for (Map.Entry<String, List<String>> entry : resolvedParameters.entries())
          {
              for (String value : entry.getValue())
              {
                  if(ct++ > 0)
                      sb.append("&");
                  sb.append(encode(entry.getKey())).append("=").append(encode(value));
              }
          }
  
          return sb.toString();
      }
docs: Build the query string for the specified request
  @param request the data service request
  @return The query string