⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 news.java.svn-base

📁 本人编写的基于spring + spring mvc + hibernate架构的新闻系统
💻 SVN-BASE
字号:
package org.coldice.model;

import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * News generated by MyEclipse - Hibernate Tools
 */

public class News extends BaseObject implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer newsid;

	private Integer category;

	private String newstitle;

	private String newscontent;

	private Date newsdate;

	private String author;

	// Constructors

	/** default constructor */
	public News() {
	}

	/** minimal constructor */
	public News(Date newsdate) {
		this.newsdate = newsdate;
	}

	/** full constructor */
	public News(Integer category, String newstitle, String newscontent,
			Date newsdate, String author) {
		this.category = category;
		this.newstitle = newstitle;
		this.newscontent = newscontent;
		this.newsdate = newsdate;
		this.author = author;
	}

	// Property accessors

	public Integer getNewsid() {
		return this.newsid;
	}

	public void setNewsid(Integer newsid) {
		this.newsid = newsid;
	}

	public Integer getCategory() {
		return this.category;
	}

	public void setCategory(Integer category) {
		this.category = category;
	}

	public String getNewstitle() {
		return this.newstitle;
	}

	public void setNewstitle(String newstitle) {
		this.newstitle = newstitle;
	}

	public String getNewscontent() {
		return this.newscontent;
	}

	public void setNewscontent(String newscontent) {
		this.newscontent = newscontent;
	}

	public Date getNewsdate() {
		return this.newsdate;
	}

	public void setNewsdate(Date newsdate) {
		this.newsdate = newsdate;
	}

	public String getAuthor() {
		return this.author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof News)) {
			return false;
		}
		News rhs = (News) object;
		return new EqualsBuilder().appendSuper(this.equals(object)).append(
				this.newscontent, rhs.newscontent).append(this.newsdate,
				rhs.newsdate).append(this.category, rhs.category).append(
				this.author, rhs.author).append(this.newstitle, rhs.newstitle)
				.append(this.newsid, rhs.newsid).isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(1928086997, 1431161889).appendSuper(
				this.hashCode()).append(this.newscontent).append(this.newsdate)
				.append(this.category).append(this.author).append(
						this.newstitle).append(this.newsid).toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("newsdate", this.newsdate)
				.append("newsid", this.newsid).append("author", this.author)
				.append("category", this.category).append("newstitle",
						this.newstitle).append("newscontent", this.newscontent)
				.toString();
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -