| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package com.goafanti.common.bo;
- import java.util.ArrayList;
- import java.util.List;
- public class Result {
- private Object data;
- private List<Error> error = new ArrayList<Error>();
- 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<Error> getError() {
- return error;
- }
- /**
- * @param error
- * the error to set
- */
- public void setError(List<Error> 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;
- }
- }
|