Same as @updateDirections but updates based not on position but on key

@param original QueryParameters which would be updated
@param source   QueryParameters directions of which would be read
@return updated clone on @original with updated directions
485315
public static QueryParameters updateDirectionsByName(QueryParameters original, QueryParameters source) {
        QueryParameters updatedParams = new QueryParameters(original);

        if (source != null) {
            for (String sourceKey : source.keySet()) {
                if (updatedParams.containsKey(sourceKey) == true) {
                    updatedParams.updateDirection(sourceKey, source.getDirection(sourceKey));
                }
            }
        }

        return updatedParams;
    }
1308069
protected T newResourceAddress0(String original, String location,  ResourceOptions options) {

        final T address = newResourceAddress0(original, location);
        setOptions(address, location, options, options.getOption(QUALIFIER));
        return address;
    }
258525
private void updateMethodParameters(final Set<MethodParameter> parameters, final Set<MethodParameter> additional) {
        additional.forEach(a -> {
            // remove preexisting parameters with identical names
            final Optional<MethodParameter> existingParameter = parameters.stream().filter(p -> p.getName().equals(a.getName())).findAny();
            existingParameter.ifPresent(parameters::remove);
            parameters.add(a);
        });
    }
1166340
@Override
    public Map<String, Object> getParameters(
            HttpServletRequest request, HttpServletResponse response) {
        final Map<String, Object> mergedParameters = new LinkedHashMap<String, Object>();

        for (final TransformerConfigurationSource source : this.sources) {
            final Map<String, Object> parameters = source.getParameters(request, response);
            if (parameters != null) {
                mergedParameters.putAll(parameters);
            }
        }

        return mergedParameters;
    }
893366
public EntityMapping addSource(EntityType source) {
    if (entityMappings.containsKey(source.getId())) {
      throw new IllegalStateException("Mapping already present for source " + source.getId());
    }
    EntityMapping result = new EntityMapping(source, target);
    entityMappings.put(source.getId(), result);
    return result;
  }
651715
public QueryParameters updateDirection(String key, Direction direction) {
        this.direction.put(processKey(key), direction);

        return this;
    }
650929
static Source updateSource(SourceName sourceName) {
    try (SecurityCenterClient client = SecurityCenterClient.create()) {
      // Start setting up a request to update a source.
      // SourceName sourceName = SourceName.of(/*organization=*/"123234324",/*source=*/
      // "423432321");
      Source source =
          Source.newBuilder()
              .setDisplayName("Updated Display Name")
              .setName(sourceName.toString())
              .build();
      FieldMask updateMask = FieldMask.newBuilder().addPaths("display_name").build();

      UpdateSourceRequest.Builder request =
          UpdateSourceRequest.newBuilder().setSource(source).setUpdateMask(updateMask);

      // Call the API.
      Source response = client.updateSource(request.build());

      System.out.println("Updated Source: " + response);
      return response;
    } catch (IOException e) {
      throw new RuntimeException("Couldn't create client.", e);
    }
  }
844054
static Map<String, List<Integer>> updateParameterNamesToIndexes(Map<String, List<Integer>> parametersNameToIndex,
                                                                    List<ArrayParameter> arrayParametersSortedAsc) {
        for(Map.Entry<String, List<Integer>> parameterNameToIndexes : parametersNameToIndex.entrySet()) {
            List<Integer> newParameterIndex = new ArrayList<>(parameterNameToIndexes.getValue().size());
            for(Integer parameterIndex : parameterNameToIndexes.getValue()) {
                newParameterIndex.add(computeNewIndex(parameterIndex, arrayParametersSortedAsc));
            }
            parameterNameToIndexes.setValue(newParameterIndex);
        }

        return parametersNameToIndex;
    }
484739
public int updateByHql(String secondHalfOfHql, Object[] paramValues, Type[] paramTypes){
    	StringBuilder queryStr = new StringBuilder();
    	queryStr.append("update ")
			.append(this.clazz.getName())
			.append(" ");
    	if (secondHalfOfHql != null){
    		queryStr.append(secondHalfOfHql);
     	}
    	
        Session session = this.getCurrentSession();
    	Query query = session.createQuery(queryStr.toString());
    	setupQuery(query, paramValues, paramTypes, null, null);
        return query.executeUpdate();
    }
401679
public static String encodeParameter(Object source) {

		Assert.notNull(source, "Request parameter value must not be null!");

		try {
			return UriUtils.encodeQueryParam(source.toString(), ENCODING);
		} catch (Throwable e) {
			throw new IllegalStateException(e);
		}
	}
13395
static Map<String, String> findQueryParams(String baseParam, Method method) {
        Map<String, String> hrefVars = new HashMap<>();
        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
        for (int i = 0; i < parameterAnnotations.length; i++) {
            Annotation[] paramAnnotations = parameterAnnotations[i];
            for (Annotation paramAnnotation : paramAnnotations) {
                Class<?> parameterClass = method.getParameterTypes()[i];
                hrefVars.putAll(findQueryParamOnParameter(baseParam, parameterClass, paramAnnotation));
            }
        }
        return hrefVars;
    }
1027014
protected QueryParameters[] getQueryParams(InputHandler[] inputHandlers) {
        QueryParameters[] result = new QueryParameters[inputHandlers.length];

        for (int i = 0; i < inputHandlers.length; i++) {
            result[i] = inputHandlers[i].getQueryParameters();
        }

        return result;
    }
446094
public void performUpdateQuery(String queryString, SPARQLQueryBindingSet bindings, Transaction tx, boolean includeInferred, String baseURI) {
        SPARQLQueryDefinition qdef = sparqlManager.newQueryDefinition(queryString);
        if(notNull(baseURI) && !baseURI.isEmpty()){ qdef.setBaseUri(baseURI);}
        if (notNull(ruleset) ) {qdef.setRulesets(ruleset);}
        if(notNull(graphPerms)){ qdef.setUpdatePermissions(graphPerms);}
        qdef.setIncludeDefaultRulesets(includeInferred);
        sparqlManager.clearPageLength();
        sparqlManager.executeUpdate(qdef, tx);
    }
569284
public static QueryParameters updateTypesByName(QueryParameters original, QueryParameters source) {
        QueryParameters updatedParams = new QueryParameters(original);

        if (source != null) {
            for (String sourceKey : source.keySet()) {
                if (updatedParams.containsKey(sourceKey) == true) {
                    updatedParams.updateType(sourceKey, source.getType(sourceKey));
                }
            }
        }

        return updatedParams;
    }
1258460
public static void updateFileFromUrl(final String sourceUrl, final String destinationFilePath) throws
        UpdateException {
        updateFileFromUrl(sourceUrl, destinationFilePath, null, null);
    }
446224
@SuppressWarnings("unchecked")
    ViewQueryParameters<K, V> copy() {
        try {
            return (ViewQueryParameters<K, V>) this.clone();
        } catch (CloneNotSupportedException e) {
            //should not reach this code as this class implements Cloneable
            throw new RuntimeException(e);
        }
    }
1244508
@Override
    public DefaultActionOperation addQueryParameter(String key, String value) {
        this.queryParameters.add(key, value);
        return this;
    }