code: @SuppressWarnings("deprecation")
  	public static Map<String, List<String>> convert(WebQuery query)
  	{
  		MultivaluedHashMap<String, String> map = new MultivaluedHashMap<>();
  
  		map.putSingle(WQUriControlField.FETCH.getName(), query.fetch);
  
  		if (query.dbfetch != null)
  			map.putSingle(WQUriControlField.DBFETCH.getName(), query.dbfetch);
  
  		if (query.expand != null)
  			map.put(WQUriControlField.EXPAND.getName(), list(query.expand));
  
  		map.put(WQUriControlField.ORDER.getName(),
  		        query.orderings.stream().map(WQOrder:: toLegacyForm).collect(Collectors.toList()));
  
  		if (query.getOffset() > 0)
  			map.putSingle(WQUriControlField.OFFSET.getName(), String.valueOf(query.getOffset()));
  
  		map.putSingle(WQUriControlField.LIMIT.getName(), String.valueOf(query.getLimit()));
  
  		if (query.constraints.computeSize)
  			map.putSingle(WQUriControlField.COMPUTE_SIZE.getName(), String.valueOf(query.constraints.computeSize));
  		if (query.constraints.subclass != null)
  			map.put(WQUriControlField.CLASS.getName(), list(query.constraints.subclass));
  
  		addConstraints(map, query.constraints);
  
  		return map;
  	}
docs: Convert a WebQueryDefinition to the equivalent legacy ResultSetConstraint (if possible)
  
  @param query
  
  @return
  
  @throws IllegalArgumentException
  if the provided query definition cannot be represented using legacy semantics