Added a _ prefix for query parameters to avoid constraint clashes

This commit is contained in:
Luca Frosini 2021-07-07 11:24:40 +02:00
parent 79f4fe330b
commit 4cb760f4c3
1 changed files with 5 additions and 5 deletions

View File

@ -196,7 +196,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
gxHTTPStringRequest.path(type); gxHTTPStringRequest.path(type);
Map<String,String> parameters = new HashMap<>(); Map<String,String> parameters = new HashMap<>();
parameters.put(AccessPath.POLYMORPHIC_PARAM, polymorphic.toString()); parameters.put(AccessPath._POLYMORPHIC_PARAM, polymorphic.toString());
gxHTTPStringRequest.queryParams(parameters); gxHTTPStringRequest.queryParams(parameters);
HttpURLConnection httpURLConnection = gxHTTPStringRequest.get(); HttpURLConnection httpURLConnection = gxHTTPStringRequest.get();
@ -241,7 +241,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
gxHTTPStringRequest.path(type); gxHTTPStringRequest.path(type);
Map<String,String> parameters = new HashMap<>(); Map<String,String> parameters = new HashMap<>();
parameters.put(AccessPath.POLYMORPHIC_PARAM, polymorphic.toString()); parameters.put(AccessPath._POLYMORPHIC_PARAM, polymorphic.toString());
includeAdditionalQueryParameters(gxHTTPStringRequest, parameters); includeAdditionalQueryParameters(gxHTTPStringRequest, parameters);
HttpURLConnection httpURLConnection = gxHTTPStringRequest.get(); HttpURLConnection httpURLConnection = gxHTTPStringRequest.get();
@ -399,8 +399,8 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
gxHTTPStringRequest.path(referenceEntityType); gxHTTPStringRequest.path(referenceEntityType);
Map<String,String> parameters = new HashMap<>(); Map<String,String> parameters = new HashMap<>();
parameters.put(AccessPath.DIRECTION_PARAM, direction.name()); parameters.put(AccessPath._DIRECTION_PARAM, direction.name());
parameters.put(AccessPath.POLYMORPHIC_PARAM, polymorphic.toString()); parameters.put(AccessPath._POLYMORPHIC_PARAM, polymorphic.toString());
if(referenceEntity == null) { if(referenceEntity == null) {
if(map != null && map.size() > 0) { if(map != null && map.size() > 0) {
@ -414,7 +414,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
} else { } else {
logger.info("Going to get {} linked by {} to {} with UUID {}", entityType, relationType, logger.info("Going to get {} linked by {} to {} with UUID {}", entityType, relationType,
referenceEntityType, referenceEntity); referenceEntityType, referenceEntity);
parameters.put(AccessPath.REFERENCE_PARAM, referenceEntity.toString()); parameters.put(AccessPath._REFERENCE_PARAM, referenceEntity.toString());
} }
includeAdditionalQueryParameters(gxHTTPStringRequest, parameters); includeAdditionalQueryParameters(gxHTTPStringRequest, parameters);