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

📄 news.java

📁 STRUTS数据库项目开发宝典
💻 JAVA
字号:
package com.relationinfo.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 org.apache.commons.lang.builder.ToStringStyle;

/**
 * This class is used to represent available roles in the database.
 * </p>
 * 
 * <p>
 * <a href="News.java.html"><i>www.relationinfo.com</i></a>
 * </p>
 * 
 * @author caoguangxin www.relationinfo.com Version by
 *         Dan Kibler dan@getrolling.com
 * 
 * @struts.form extends="BaseForm"
 * @hibernate.class table="News"
 */
public class News extends BaseObject implements Serializable {
	private static final long serialVersionUID = 3690197650654049848L;

	private String newscode;

	private String newcontent;

	private String pubdate;

	private User user;

	public News() {
	}

	public News(String newscode, String newcontent, String pubdate, User user) {
		this.newscode = newscode;
		this.newcontent = newcontent;
		this.pubdate = pubdate;
		this.user = user;

	}

	
	/**
	 * Returns the newscode.
	 * 
	 * @return String
	 * 
	 * @struts.validator type="required"
	 * @hibernate.id column="newscode" length="20" generator-class="assigned"
	 *               unsaved-value="version"
	 */
	public String getNewscode() {
		return this.newscode;
	}

	public String getPubdate() {
		return this.pubdate;
	}

	/**
	 * Returns the newcontent.
	 * 
	 * @return String
	 * 
	 * @struts.validator type="required"
	 * @hibernate.id column="newcontent" length="20" generator-class="assigned"
	 *               unsaved-value="version"
	 */
	public String getNewcontent() {
		return this.newcontent;
	}

	/**
	 * Returns the user.
	 * 
	 * @return user
	 * 
	 * @hibernate.many-to-one column="userid" cascade="none"
	 */
	public User getUser() {

		return user;
	}

	public void setNewscode(String newscode) {
		this.newscode = newscode;
	}

	/**
	 * Generated using Coaddressonclipse (pubdate://coaddressonclipse.sf.net)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof News)) {
			return false;
		}
		News rhs = (News) object;
		return new EqualsBuilder().append(this.newcontent, rhs.newcontent)
				.append(this.newscode, rhs.newscode).isEquals();
	}

	/**
	 * Generated using Coaddressonclipse (pubdate://coaddressonclipse.sf.net)
	 */
	public int hashCode() {
		return new HashCodeBuilder(1156335803, 987569255).append(
				this.newcontent).append(this.newscode).append(this.pubdate)
				.append(this.user).toHashCode();
	}

	/**
	 * Generated using Coaddressonclipse (pubdate://coaddressonclipse.sf.net)
	 */
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("newscode", this.newscode).append("newcontent",
						this.newcontent).append("pubdate", this.pubdate)
				.append("user", this.user).toString();
	}

}

⌨️ 快捷键说明

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