ListRestResponse.java 1022 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package com.yaozhitech.spring5.common.msg;
  2. /**
  3. * ${DESCRIPTION}
  4. *
  5. * @author wanghaobin
  6. * @create 2017-06-09 7:32
  7. */
  8. public class ListRestResponse<T> {
  9. String msg;
  10. T result;
  11. int count;
  12. public String getMsg() {
  13. return msg;
  14. }
  15. public void setMsg(String msg) {
  16. this.msg = msg;
  17. }
  18. public T getResult() {
  19. return result;
  20. }
  21. public void setResult(T result) {
  22. this.result = result;
  23. }
  24. public int getCount() {
  25. return count;
  26. }
  27. public void setCount(int count) {
  28. this.count = count;
  29. }
  30. public ListRestResponse count(int count) {
  31. this.setCount(count);
  32. return this;
  33. }
  34. public ListRestResponse count(Long count) {
  35. this.setCount(count.intValue());
  36. return this;
  37. }
  38. public ListRestResponse msg(String msg) {
  39. this.setMsg(msg);
  40. return this;
  41. }
  42. public ListRestResponse result(T result) {
  43. this.setResult(result);
  44. return this;
  45. }
  46. }