package de.tblsoft.search.response;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by tblsoft on 11.11.16.
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SearchResponse {

    private Integer statusCode = 200;

    private Map<String, SearchResult> result = new HashMap<>();

    private long time;


    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }

    public Map<String, SearchResult> getResult() {
        return result;
    }

    public void setResult(Map<String, SearchResult> result) {
        this.result = result;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

}

@@ -80,24 +80,47 @@
 onInclude;%0A%0A
+import java.util.Date;%0A
 import java.
@@ -133,16 +133,16 @@
 ashMap;%0A
-
 import j
@@ -401,16 +401,60 @@
  time;%0A%0A
+    private Date currentTime = new Date();%0A%0A
 %0A    pub
@@ -920,10 +920,177 @@
 %0A    %7D%0A%0A
+    public Date getCurrentTime() %7B%0A        return currentTime;%0A    %7D%0A%0A    public void setCurrentTime(Date currentTime) %7B%0A        this.currentTime = currentTime;%0A    %7D%0A
 %7D%0A

add the current time to the response object