X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fdatarouter%2Fentity%2FSuggestionSearchEntity.java;h=bd3c5b78d417406cbe73b2b1e0f377d08cba0c77;hb=refs%2Fchanges%2F11%2F16311%2F2;hp=a41487ea8ca013d06b5002b0b31b2ace10ae8463;hpb=0a6e3351cce03350b59d9af91cbe38f3233ca0ff;p=aai%2Fdata-router.git diff --git a/src/main/java/org/onap/aai/datarouter/entity/SuggestionSearchEntity.java b/src/main/java/org/onap/aai/datarouter/entity/SuggestionSearchEntity.java index a41487e..bd3c5b7 100644 --- a/src/main/java/org/onap/aai/datarouter/entity/SuggestionSearchEntity.java +++ b/src/main/java/org/onap/aai/datarouter/entity/SuggestionSearchEntity.java @@ -57,7 +57,7 @@ public class SuggestionSearchEntity implements DocumentStoreDataEntity, Serializ private Map inputOutputData = new HashMap<>(); private Map filters = new HashMap<>(); private JSONObject filterPayload = new JSONObject(); - private StringBuffer searchSuggestionDisplayString = new StringBuffer(); + private StringBuilder searchSuggestionDisplayString = new StringBuilder(); private JSONArray payloadFilters = new JSONArray(); private UiFiltersSchemaUtility filtersSchemaUtility = new UiFiltersSchemaUtility(); @@ -124,7 +124,7 @@ public class SuggestionSearchEntity implements DocumentStoreDataEntity, Serializ } } - ArrayList listOfSearchSuggestionPermutations = new ArrayList(); + ArrayList listOfSearchSuggestionPermutations = new ArrayList<>(); ArrayList listToPermutate = new ArrayList<>(this.getInputOutputData().values()); @@ -152,7 +152,7 @@ public class SuggestionSearchEntity implements DocumentStoreDataEntity, Serializ JSONObject rootNode = new JSONObject(); JSONArray inputArray = new JSONArray(); JSONObject payloadNode = new JSONObject(); - StringBuffer outputString = new StringBuffer(); + StringBuilder outputString = new StringBuilder(); int payloadEntryCounter = 1; @@ -240,10 +240,10 @@ public class SuggestionSearchEntity implements DocumentStoreDataEntity, Serializ inputOutputData.put(attribute, entityFromUebEvent.get(attribute).asText()); if(filterConfig != null) { - JSONObject filterPayload = new JSONObject(); - filterPayload.put(FILTER_ID, filterConfig.getFilterId()); - filterPayload.put(FILTER_VALUE, entityFromUebEvent.get(attribute).asText()); - this.payloadFilters.put(filterPayload); + JSONObject jsonFilterPayload = new JSONObject(); + jsonFilterPayload.put(FILTER_ID, filterConfig.getFilterId()); + jsonFilterPayload.put(FILTER_VALUE, entityFromUebEvent.get(attribute).asText()); + this.payloadFilters.put(jsonFilterPayload); } else { this.filterPayload.put(attribute, entityFromUebEvent.get(attribute).asText()); } @@ -292,7 +292,7 @@ public class SuggestionSearchEntity implements DocumentStoreDataEntity, Serializ return id; } - public StringBuffer getSearchSuggestionDisplayString() { + public StringBuilder getSearchSuggestionDisplayString() { return searchSuggestionDisplayString; } @@ -324,7 +324,7 @@ public class SuggestionSearchEntity implements DocumentStoreDataEntity, Serializ return inputOutputData; } - public void setSearchSuggestionDisplayString(StringBuffer searchSuggestionDisplayString) { + public void setSearchSuggestionDisplayString(StringBuilder searchSuggestionDisplayString) { this.searchSuggestionDisplayString = searchSuggestionDisplayString; }