Adding UI extensibility
[aai/sparky-be.git] / src / main / java / org / onap / aai / sparky / search / SearchResponse.java
  *
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
-package org.onap.aai.sparky.viewandinspect.entity;
+package org.onap.aai.sparky.search;
 
 import java.util.ArrayList;
 import java.util.List;
 
-import org.onap.aai.sparky.suggestivesearch.SuggestionEntity;
+import org.onap.aai.sparky.search.entity.SearchSuggestion;
 
 /**
  * The Class SearchResponse.
@@ -35,13 +35,13 @@ public class SearchResponse {
   private long processingTimeInMs;
   private int totalFound;
 
-  private List<SuggestionEntity> suggestions;
+  private List<SearchSuggestion> suggestions;
 
   /**
    * Instantiates a new search response.
    */
   public SearchResponse() {
-    this.suggestions = new ArrayList<SuggestionEntity>();
+    this.suggestions = new ArrayList<SearchSuggestion>();
     this.processingTimeInMs = 0;
     this.totalFound = 0;
   }
@@ -62,11 +62,11 @@ public class SearchResponse {
     this.totalFound = totalFound;
   }
 
-  public List<SuggestionEntity> getSuggestions() {
+  public List<SearchSuggestion> getSuggestions() {
     return suggestions;
   }
 
-  public void setSuggestions(List<SuggestionEntity> suggestions) {
+  public void setSuggestions(List<SearchSuggestion> suggestions) {
     this.suggestions = suggestions;
   }
 
@@ -75,7 +75,7 @@ public class SearchResponse {
    *
    * @param suggestionEntry that will be converted to JSON
    */
-  public void addSuggestion(SuggestionEntity suggestionEntity) {
+  public void addSuggestion(SearchSuggestion suggestionEntity) {
     suggestions.add(suggestionEntity);
   }
 
@@ -87,4 +87,13 @@ public class SearchResponse {
   public void addToTotalFound(int additionalCount) {
     totalFound += additionalCount;
   }
+
+  @Override
+  public String toString() {
+    return "SearchResponse [processingTimeInMs=" + processingTimeInMs + ", totalFound=" + totalFound
+        + ", " + (suggestions != null ? "suggestions=" + suggestions : "") + "]";
+  }
+
+
+
 }