changeset 78:98fe21a9fbe5

Formatting. Make the data attribute of type Object to make it more general.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 07 Jun 2013 11:45:46 +0200
parents 8af2a920f974
children bb22b5063a94
files src/main/java/de/intevation/lada/rest/Response.java
diffstat 1 files changed, 57 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/Response.java	Fri Jun 07 11:45:07 2013 +0200
+++ b/src/main/java/de/intevation/lada/rest/Response.java	Fri Jun 07 11:45:46 2013 +0200
@@ -1,59 +1,62 @@
 package de.intevation.lada.rest;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import de.intevation.lada.model.LProbe;
-
+/**
+* This class is nice!.
+*
+* @author <a href="mailto:torsten@intevation.de">Torsten Irländer</a>
+*/
 @SuppressWarnings("serial")
 public class Response implements java.io.Serializable {
-	
-	private Boolean success;
-	private String message;
-	private List<LProbe> data;
-	private String errors;
-	private String warnings;
-	
-	public Response(Boolean success, String message, LProbe data) {
-		super();
-		this.success = success;
-		this.message = message;
-		this.data = new ArrayList<LProbe>();
-		this.data.add(data);
-	}
-	public Response(boolean success, String message, List<LProbe> data) {
-		this.success = success;
-		this.message = message;
-		this.data = data;
-	}
-	public Boolean getSuccess() {
-		return success;
-	}
-	public void setSuccess(Boolean success) {
-		this.success = success;
-	}
-	public String getMessage() {
-		return message;
-	}
-	public void setMessage(String message) {
-		this.message = message;
-	}
-	public List<LProbe> getData() {
-		return data;
-	}
-	public void setData(List<LProbe> data) {
-		this.data = data;
-	}
-	public String getErrors() {
-		return errors;
-	}
-	public void setErrors(String errors) {
-		this.errors = errors;
-	}
-	public String getWarnings() {
-		return warnings;
-	}
-	public void setWarnings(String warnings) {
-		this.warnings = warnings;
-	}
+
+    private Boolean success;
+    private String message;
+    private Object data;
+    private String errors;
+    private String warnings;
+
+    public Response(boolean success, String message, Object data) {
+        this.success = success;
+        this.message = message;
+        this.data = data;
+    }
+
+    public Boolean getSuccess() {
+        return success;
+    }
+
+    public void setSuccess(Boolean success) {
+        this.success = success;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public Object getData() {
+        return data;
+    }
+
+    public void setData(Object data) {
+        this.data = data;
+    }
+
+    public String getErrors() {
+        return errors;
+    }
+
+    public void setErrors(String errors) {
+        this.errors = errors;
+    }
+
+    public String getWarnings() {
+        return warnings;
+    }
+
+    public void setWarnings(String warnings) {
+        this.warnings = warnings;
+    }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)