ReadyRead.java 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. package com.qxgmat.data.dao.entity;
  2. import java.io.Serializable;
  3. import java.util.Date;
  4. import javax.persistence.*;
  5. @Table(name = "ready_read")
  6. public class ReadyRead implements Serializable {
  7. @Id
  8. @Column(name = "`id`")
  9. @GeneratedValue(strategy = GenerationType.IDENTITY)
  10. private Integer id;
  11. /**
  12. * 板块
  13. */
  14. @Column(name = "`plate`")
  15. private String plate;
  16. /**
  17. * 标题
  18. */
  19. @Column(name = "`title`")
  20. private String title;
  21. /**
  22. * 链接
  23. */
  24. @Column(name = "`link`")
  25. private String link;
  26. @Column(name = "`create_time`")
  27. private Date createTime;
  28. @Column(name = "`update_time`")
  29. private Date updateTime;
  30. /**
  31. * 内容
  32. */
  33. @Column(name = "`content`")
  34. private String content;
  35. private static final long serialVersionUID = 1L;
  36. /**
  37. * @return id
  38. */
  39. public Integer getId() {
  40. return id;
  41. }
  42. /**
  43. * @param id
  44. */
  45. public void setId(Integer id) {
  46. this.id = id;
  47. }
  48. /**
  49. * 获取板块
  50. *
  51. * @return plate - 板块
  52. */
  53. public String getPlate() {
  54. return plate;
  55. }
  56. /**
  57. * 设置板块
  58. *
  59. * @param plate 板块
  60. */
  61. public void setPlate(String plate) {
  62. this.plate = plate;
  63. }
  64. /**
  65. * 获取标题
  66. *
  67. * @return title - 标题
  68. */
  69. public String getTitle() {
  70. return title;
  71. }
  72. /**
  73. * 设置标题
  74. *
  75. * @param title 标题
  76. */
  77. public void setTitle(String title) {
  78. this.title = title;
  79. }
  80. /**
  81. * 获取链接
  82. *
  83. * @return link - 链接
  84. */
  85. public String getLink() {
  86. return link;
  87. }
  88. /**
  89. * 设置链接
  90. *
  91. * @param link 链接
  92. */
  93. public void setLink(String link) {
  94. this.link = link;
  95. }
  96. /**
  97. * @return create_time
  98. */
  99. public Date getCreateTime() {
  100. return createTime;
  101. }
  102. /**
  103. * @param createTime
  104. */
  105. public void setCreateTime(Date createTime) {
  106. this.createTime = createTime;
  107. }
  108. /**
  109. * @return update_time
  110. */
  111. public Date getUpdateTime() {
  112. return updateTime;
  113. }
  114. /**
  115. * @param updateTime
  116. */
  117. public void setUpdateTime(Date updateTime) {
  118. this.updateTime = updateTime;
  119. }
  120. /**
  121. * 获取内容
  122. *
  123. * @return content - 内容
  124. */
  125. public String getContent() {
  126. return content;
  127. }
  128. /**
  129. * 设置内容
  130. *
  131. * @param content 内容
  132. */
  133. public void setContent(String content) {
  134. this.content = content;
  135. }
  136. @Override
  137. public String toString() {
  138. StringBuilder sb = new StringBuilder();
  139. sb.append(getClass().getSimpleName());
  140. sb.append(" [");
  141. sb.append("Hash = ").append(hashCode());
  142. sb.append(", id=").append(id);
  143. sb.append(", plate=").append(plate);
  144. sb.append(", title=").append(title);
  145. sb.append(", link=").append(link);
  146. sb.append(", createTime=").append(createTime);
  147. sb.append(", updateTime=").append(updateTime);
  148. sb.append(", content=").append(content);
  149. sb.append("]");
  150. return sb.toString();
  151. }
  152. public static ReadyRead.Builder builder() {
  153. return new ReadyRead.Builder();
  154. }
  155. public static class Builder {
  156. private ReadyRead obj;
  157. public Builder() {
  158. this.obj = new ReadyRead();
  159. }
  160. /**
  161. * @param id
  162. */
  163. public Builder id(Integer id) {
  164. obj.setId(id);
  165. return this;
  166. }
  167. /**
  168. * 设置板块
  169. *
  170. * @param plate 板块
  171. */
  172. public Builder plate(String plate) {
  173. obj.setPlate(plate);
  174. return this;
  175. }
  176. /**
  177. * 设置标题
  178. *
  179. * @param title 标题
  180. */
  181. public Builder title(String title) {
  182. obj.setTitle(title);
  183. return this;
  184. }
  185. /**
  186. * 设置链接
  187. *
  188. * @param link 链接
  189. */
  190. public Builder link(String link) {
  191. obj.setLink(link);
  192. return this;
  193. }
  194. /**
  195. * @param createTime
  196. */
  197. public Builder createTime(Date createTime) {
  198. obj.setCreateTime(createTime);
  199. return this;
  200. }
  201. /**
  202. * @param updateTime
  203. */
  204. public Builder updateTime(Date updateTime) {
  205. obj.setUpdateTime(updateTime);
  206. return this;
  207. }
  208. /**
  209. * 设置内容
  210. *
  211. * @param content 内容
  212. */
  213. public Builder content(String content) {
  214. obj.setContent(content);
  215. return this;
  216. }
  217. public ReadyRead build() {
  218. return this.obj;
  219. }
  220. }
  221. }