package com.goafanti.common.bo; import java.util.ArrayList; import java.util.List; public class Result { private Object data; private List error = new ArrayList(); public Result() { } public Result(Object data) { this.data = data; } /** * @return the data */ public Object getData() { return data; } /** * @param data * the data to set */ public void setData(Object data) { this.data = data; } /** * @return the error */ public List getError() { return error; } /** * @param error * the error to set */ public void setError(List error) { this.error = error; } public Result error(Error e) { if (e != null) { this.error.add(e); } return this; } public Result data(Object o) { this.data = o; return this; } }