Blog.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 Blog
- implements Serializable {
- /** identifier field */
- private Long id;
- /** persistent field */
- private String username;
- /** persistent field */
- private String blogname;
- /** persistent field */
- private String description;
- /** nullable persistent field */
- private int cansee;
- /** nullable persistent field */
- private int sort;
- /** nullable persistent field */
- private int skin;
- /** nullable persistent field */
- private int multiuser;
- /** nullable persistent field */
- private int perartnum;
- /** nullable persistent field */
- private int newlyartnum;
- /** nullable persistent field */
- private int newlycomnum;
- /** nullable persistent field */
- private int letterbookmark;
- /** nullable persistent field */
- private int picbookmark;
- /** nullable persistent field */
- private int arttotal;
- /** nullable persistent field */
- private int notetotal;
- /** nullable persistent field */
- private Date regtime;
- /** nullable persistent field */
- private int pro;
- /** nullable persistent field */
- private int hits;
- /** nullable persistent field */
- private int calendarstyle;
- /** nullable persistent field */
- private String logourl;
- /** nullable persistent field */
- private String logosize;
- /** nullable persistent field */
- private int counterstyle;
- /** full constructor */
- public Blog(String username, String blogname, String description,
- int cansee, int sort, int skin, int multiuser, int perartnum,
- int newlyartnum, int newlycomnum, int letterbookmark,
- int picbookmark, int arttotal, int notetotal, Date regtime,
- int pro, int hits, int calendarstyle, String logourl,
- String logosize, int counterstyle) {
- this.username = username;
- this.blogname = blogname;
- this.description = description;
- this.cansee = cansee;
- this.sort = sort;
- this.skin = skin;
- this.multiuser = multiuser;
- this.perartnum = perartnum;
- this.newlyartnum = newlyartnum;
- this.newlycomnum = newlycomnum;
- this.letterbookmark = letterbookmark;
- this.picbookmark = picbookmark;
- this.arttotal = arttotal;
- this.notetotal = notetotal;
- this.regtime = regtime;
- this.pro = pro;
- this.hits = hits;
- this.calendarstyle = calendarstyle;
- this.logourl = logourl;
- this.logosize = logosize;
- this.counterstyle = counterstyle;
- }
- /** default constructor */
- public Blog() {
- }
- /** minimal constructor */
- public Blog(String username, String blogname, String description) {
- this.username = username;
- this.blogname = blogname;
- this.description = description;
- }
- public Long getId() {
- return this.id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getUsername() {
- return this.username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getBlogname() {
- return this.blogname;
- }
- public void setBlogname(String blogname) {
- this.blogname = blogname;
- }
- public String getDescription() {
- return this.description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
- public int getCansee() {
- return this.cansee;
- }
- public void setCansee(int cansee) {
- this.cansee = cansee;
- }
- public int getSort() {
- return this.sort;
- }
- public void setSort(int sort) {
- this.sort = sort;
- }
- public int getSkin() {
- return this.skin;
- }
- public void setSkin(int skin) {
- this.skin = skin;
- }
- public int getMultiuser() {
- return this.multiuser;
- }
- public void setMultiuser(int multiuser) {
- this.multiuser = multiuser;
- }
- public int getPerartnum() {
- return this.perartnum;
- }
- public void setPerartnum(int perartnum) {
- this.perartnum = perartnum;
- }
- public int getNewlyartnum() {
- return this.newlyartnum;
- }
- public void setNewlyartnum(int newlyartnum) {
- this.newlyartnum = newlyartnum;
- }
- public int getNewlycomnum() {
- return this.newlycomnum;
- }
- public void setNewlycomnum(int newlycomnum) {
- this.newlycomnum = newlycomnum;
- }
- public int getLetterbookmark() {
- return this.letterbookmark;
- }
- public void setLetterbookmark(int letterbookmark) {
- this.letterbookmark = letterbookmark;
- }
- public int getPicbookmark() {
- return this.picbookmark;
- }
- public void setPicbookmark(int picbookmark) {
- this.picbookmark = picbookmark;
- }
- public int getArttotal() {
- return this.arttotal;
- }
- public void setArttotal(int arttotal) {
- this.arttotal = arttotal;
- }
- public int getNotetotal() {
- return this.notetotal;
- }
- public void setNotetotal(int notetotal) {
- this.notetotal = notetotal;
- }
- public Date getRegtime() {
- return this.regtime;
- }
- public void setRegtime(Date regtime) {
- this.regtime = regtime;
- }
- public int getPro() {
- return this.pro;
- }
- public void setPro(int pro) {
- this.pro = pro;
- }
- public int getHits() {
- return this.hits;
- }
- public void setHits(int hits) {
- this.hits = hits;
- }
- public int getCalendarstyle() {
- return this.calendarstyle;
- }
- public void setCalendarstyle(int calendarstyle) {
- this.calendarstyle = calendarstyle;
- }
- public String getLogourl() {
- return this.logourl;
- }
- public void setLogourl(String logourl) {
- this.logourl = logourl;
- }
- public String getLogosize() {
- return this.logosize;
- }
- public void setLogosize(String logosize) {
- this.logosize = logosize;
- }
- public int getCounterstyle() {
- return this.counterstyle;
- }
- public void setCounterstyle(int counterstyle) {
- this.counterstyle = counterstyle;
- }
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .toString();
- }
- public boolean equals(Object other) {
- if (! (other instanceof Blog)) {
- return false;
- }
- Blog castOther = (Blog) other;
- return new EqualsBuilder()
- .append(this.getId(), castOther.getId())
- .isEquals();
- }
- public int hashCode() {
- return new HashCodeBuilder()
- .append(getId())
- .toHashCode();
- }
- }