1 package org.onap.aai.sparky.search.entity;
3 import java.util.ArrayList;
6 import org.onap.aai.sparky.common.search.CommonSearchSuggestion;
8 public class MockSearchResponse {
9 private long processingTimeInMs;
10 private int totalFound;
12 private List<CommonSearchSuggestion> suggestions;
15 * Instantiates a new search response.
17 public MockSearchResponse() {
18 this.suggestions = new ArrayList<CommonSearchSuggestion>();
19 this.processingTimeInMs = 0;
23 public long getProcessingTimeInMs() {
24 return processingTimeInMs;
27 public void setProcessingTimeInMs(long processingTimeInMs) {
28 this.processingTimeInMs = processingTimeInMs;
31 public int getTotalFound() {
35 public void setTotalFound(int totalFound) {
36 this.totalFound = totalFound;
39 public List<CommonSearchSuggestion> getSuggestions() {
43 public void setSuggestions(List<CommonSearchSuggestion> suggestions) {
44 this.suggestions = suggestions;
48 * Adds the entity entry.
50 * @param suggestionEntry that will be converted to JSON
52 public void addSuggestion(CommonSearchSuggestion suggestionEntity){
53 suggestions.add(suggestionEntity);
57 * Increments the total number of hits for this SearchResponse by
58 * the value passed in.
60 * @param additionalCount - Count to increment the total found
62 public void addToTotalFound(int additionalCount) {
63 totalFound += additionalCount;
67 public String toString() {
68 return "DummySearchResponse [processingTimeInMs=" + processingTimeInMs + ", totalFound="
69 + totalFound + ", suggestions=" + suggestions + "]";