TableDataInfo.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package com.bizmatics.model.page;
  2. import java.io.Serializable;
  3. import java.util.List;
  4. /**
  5. * 表格分页数据对象
  6. */
  7. public class TableDataInfo implements Serializable {
  8. private static final long serialVersionUID = 1L;
  9. /**
  10. * 总记录数
  11. */
  12. private long total;
  13. /**
  14. * 列表数据
  15. */
  16. private List<?> rows;
  17. /**
  18. * 消息状态码
  19. */
  20. private int code;
  21. /**
  22. * 消息内容
  23. */
  24. private String msg;
  25. /**
  26. * 表格数据对象
  27. */
  28. public TableDataInfo() {
  29. }
  30. /**
  31. * 分页
  32. *
  33. * @param list 列表数据
  34. * @param total 总记录数
  35. */
  36. public TableDataInfo(List<?> list, int total) {
  37. this.rows = list;
  38. this.total = total;
  39. }
  40. public long getTotal() {
  41. return total;
  42. }
  43. public void setTotal(long total) {
  44. this.total = total;
  45. }
  46. public List<?> getRows() {
  47. return rows;
  48. }
  49. public void setRows(List<?> rows) {
  50. this.rows = rows;
  51. }
  52. public int getCode() {
  53. return code;
  54. }
  55. public void setCode(int code) {
  56. this.code = code;
  57. }
  58. public String getMsg() {
  59. return msg;
  60. }
  61. public void setMsg(String msg) {
  62. this.msg = msg;
  63. }
  64. }