Article.java
资源名称:Myblog.rar [点击查看]
上传用户:wlfwy2004
上传日期:2016-12-12
资源大小:33978k
文件大小:7k
源码类别:
Jsp/Servlet
开发平台:
Java
- package com.opensource.blog.model;
- import java.io.Serializable;
- import org.apache.commons.lang.builder.EqualsBuilder;
- import org.apache.commons.lang.builder.HashCodeBuilder;
- import org.apache.commons.lang.builder.ToStringBuilder;
- import java.util.*;
- public class Article
- implements Serializable {
- /** identifier field */
- private Long id;
- /** nullable persistent field */
- private long blogid;
- /** nullable persistent field */
- private String blogname;
- /** persistent field */
- private String title;
- /** nullable persistent field */
- private String content;
- /** persistent field */
- private long userid;
- /** persistent field */
- private String username;
- /** nullable persistent field */
- private String trackback;
- /** nullable persistent field */
- private int trackbacknum;
- /** nullable persistent field */
- private int face;
- /** nullable persistent field */
- private int faceplace;
- /** nullable persistent field */
- private int faceid;
- /** nullable persistent field */
- private int opencomment;
- /** nullable persistent field */
- private int commentnum;
- /** nullable persistent field */
- private int usesign;
- /** nullable persistent field */
- private String sign;
- /** nullable persistent field */
- private int contentsize;
- /** nullable persistent field */
- private long sortid;
- /** nullable persistent field */
- private String sortname;
- /** nullable persistent field */
- private int blogsortid;
- /** nullable persistent field */
- private String artkey;
- /** nullable persistent field */
- private int postmonth;
- /** nullable persistent field */
- private String postdate;
- /** nullable persistent field */
- private Date posttime;
- /** nullable persistent field */
- private int ishide;
- /** full constructor */
- public Article(long blogid, String blogname, String title, String content,
- long userid, String username, String trackback,
- int trackbacknum, int face, int faceplace, int faceid,
- int opencomment, int commentnum, int usesign, String sign,
- int contentsize, long sortid, String sortname,
- int blogsortid, String artkey, int postmonth,
- String postdate, Date posttime, int ishide) {
- this.blogid = blogid;
- this.blogname = blogname;
- this.title = title;
- this.content = content;
- this.userid = userid;
- this.username = username;
- this.trackback = trackback;
- this.trackbacknum = trackbacknum;
- this.face = face;
- this.faceplace = faceplace;
- this.faceid = faceid;
- this.opencomment = opencomment;
- this.commentnum = commentnum;
- this.usesign = usesign;
- this.sign = sign;
- this.contentsize = contentsize;
- this.sortid = sortid;
- this.sortname = sortname;
- this.blogsortid = blogsortid;
- this.artkey = artkey;
- this.postmonth = postmonth;
- this.postdate = postdate;
- this.posttime = posttime;
- this.ishide = ishide;
- }
- /** default constructor */
- public Article() {
- }
- /** minimal constructor */
- public Article(String title, long userid, String username) {
- this.title = title;
- this.userid = userid;
- this.username = username;
- }
- public Long getId() {
- return this.id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public long getBlogid() {
- return this.blogid;
- }
- public void setBlogid(long blogid) {
- this.blogid = blogid;
- }
- public String getBlogname() {
- return this.blogname;
- }
- public void setBlogname(String blogname) {
- this.blogname = blogname;
- }
- public String getTitle() {
- return this.title;
- }
- public void setTitle(String title) {
- this.title = title;
- }
- public String getContent() {
- return this.content;
- }
- public void setContent(String content) {
- this.content = content;
- }
- public long getUserid() {
- return this.userid;
- }
- public void setUserid(long userid) {
- this.userid = userid;
- }
- public String getUsername() {
- return this.username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getTrackback() {
- return this.trackback;
- }
- public void setTrackback(String trackback) {
- this.trackback = trackback;
- }
- public int getTrackbacknum() {
- return this.trackbacknum;
- }
- public void setTrackbacknum(int trackbacknum) {
- this.trackbacknum = trackbacknum;
- }
- public int getFace() {
- return this.face;
- }
- public void setFace(int face) {
- this.face = face;
- }
- public int getFaceplace() {
- return this.faceplace;
- }
- public void setFaceplace(int faceplace) {
- this.faceplace = faceplace;
- }
- public int getFaceid() {
- return this.faceid;
- }
- public void setFaceid(int faceid) {
- this.faceid = faceid;
- }
- public int getOpencomment() {
- return this.opencomment;
- }
- public void setOpencomment(int opencomment) {
- this.opencomment = opencomment;
- }
- public int getCommentnum() {
- return this.commentnum;
- }
- public void setCommentnum(int commentnum) {
- this.commentnum = commentnum;
- }
- public int getUsesign() {
- return this.usesign;
- }
- public void setUsesign(int usesign) {
- this.usesign = usesign;
- }
- public String getSign() {
- return this.sign;
- }
- public void setSign(String sign) {
- this.sign = sign;
- }
- public int getContentsize() {
- return this.contentsize;
- }
- public void setContentsize(int contentsize) {
- this.contentsize = contentsize;
- }
- public long getSortid() {
- return this.sortid;
- }
- public void setSortid(long sortid) {
- this.sortid = sortid;
- }
- public String getSortname() {
- return this.sortname;
- }
- public void setSortname(String sortname) {
- this.sortname = sortname;
- }
- public int getBlogsortid() {
- return this.blogsortid;
- }
- public void setBlogsortid(int blogsortid) {
- this.blogsortid = blogsortid;
- }
- public String getArtkey() {
- return this.artkey;
- }
- public void setArtkey(String artkey) {
- this.artkey = artkey;
- }
- public int getPostmonth() {
- return this.postmonth;
- }
- public void setPostmonth(int postmonth) {
- this.postmonth = postmonth;
- }
- public String getPostdate() {
- return this.postdate;
- }
- public void setPostdate(String postdate) {
- this.postdate = postdate;
- }
- public Date getPosttime() {
- return this.posttime;
- }
- public void setPosttime(Date posttime) {
- this.posttime = posttime;
- }
- public int getIshide() {
- return this.ishide;
- }
- public void setIshide(int ishide) {
- this.ishide = ishide;
- }
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .toString();
- }
- public boolean equals(Object other) {
- if (! (other instanceof Article)) {
- return false;
- }
- Article castOther = (Article) other;
- return new EqualsBuilder()
- .append(this.getId(), castOther.getId())
- .isEquals();
- }
- public int hashCode() {
- return new HashCodeBuilder()
- .append(getId())
- .toHashCode();
- }
- }