# HG changeset patch # User Torsten Irländer # Date 1370598346 -7200 # Node ID 98fe21a9fbe51070a39168aae550c0d9f13c874e # Parent 8af2a920f9742b41f27f36e322f5ae1e0c2f09d3 Formatting. Make the data attribute of type Object to make it more general. diff -r 8af2a920f974 -r 98fe21a9fbe5 src/main/java/de/intevation/lada/rest/Response.java --- 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 Torsten Irländer +*/ @SuppressWarnings("serial") public class Response implements java.io.Serializable { - - private Boolean success; - private String message; - private List 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(); - this.data.add(data); - } - public Response(boolean success, String message, List 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 getData() { - return data; - } - public void setData(List 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; + } }