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

📄 basecfourm.java

📁 持久层hibernate技术使用的一个例子
💻 JAVA
字号:
package cn.hope.front.pojo.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the c_fourm table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="c_fourm"
 */

public abstract class BaseCFourm  implements Serializable {

	public static String REF = "CFourm";
	public static String PROP_FLAG = "flag";
	public static String PROP_T_BADGE = "TBadge";
	public static String PROP_T_RESTORE = "TRestore";
	public static String PROP_T_TIME = "TTime";
	public static String PROP_T_TOPICCONTENT = "TTopiccontent";
	public static String PROP_T_TOPICNAME = "TTopicname";


	// constructors
	public BaseCFourm () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseCFourm (java.lang.Integer tTopicid) {
		this.setTTopicid(tTopicid);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseCFourm (
		java.lang.Integer tTopicid,
		java.util.Date tTime,
		java.lang.String tTopicname) {

		this.setTTopicid(tTopicid);
		this.setTTime(tTime);
		this.setTTopicname(tTopicname);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer tTopicid;

	// fields
	private java.lang.String flag;
	private java.lang.String tBadge;
	private java.lang.Integer tRestore;
	private java.util.Date tTime;
	private java.lang.String tTopiccontent;
	private java.lang.String tTopicname;

	// many to one
	private cn.hope.front.pojo.CFlevel2 cFlevel2;
	private cn.hope.front.pojo.Student student;
	private cn.hope.front.pojo.TInfo tInfo;

	// collections
	private java.util.Set cRefourms;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="t_topicid"
     */
	public java.lang.Integer getTTopicid () {
		return tTopicid;
	}

	/**
	 * Set the unique identifier of this class
	 * @param tTopicid the new ID
	 */
	public void setTTopicid (java.lang.Integer tTopicid) {
		this.tTopicid = tTopicid;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: flag
	 */
	public java.lang.String getFlag () {
		return flag;
	}

	/**
	 * Set the value related to the column: flag
	 * @param flag the flag value
	 */
	public void setFlag (java.lang.String flag) {
		this.flag = flag;
	}



	/**
	 * Return the value associated with the column: t_badge
	 */
	public java.lang.String getTBadge () {
		return tBadge;
	}

	/**
	 * Set the value related to the column: t_badge
	 * @param tBadge the t_badge value
	 */
	public void setTBadge (java.lang.String tBadge) {
		this.tBadge = tBadge;
	}



	/**
	 * Return the value associated with the column: t_restore
	 */
	public java.lang.Integer getTRestore () {
		return tRestore;
	}

	/**
	 * Set the value related to the column: t_restore
	 * @param tRestore the t_restore value
	 */
	public void setTRestore (java.lang.Integer tRestore) {
		this.tRestore = tRestore;
	}



	/**
	 * Return the value associated with the column: t_time
	 */
	public java.util.Date getTTime () {
		return tTime;
	}

	/**
	 * Set the value related to the column: t_time
	 * @param tTime the t_time value
	 */
	public void setTTime (java.util.Date tTime) {
		this.tTime = tTime;
	}



	/**
	 * Return the value associated with the column: t_topiccontent
	 */
	public java.lang.String getTTopiccontent () {
		return tTopiccontent;
	}

	/**
	 * Set the value related to the column: t_topiccontent
	 * @param tTopiccontent the t_topiccontent value
	 */
	public void setTTopiccontent (java.lang.String tTopiccontent) {
		this.tTopiccontent = tTopiccontent;
	}



	/**
	 * Return the value associated with the column: t_topicname
	 */
	public java.lang.String getTTopicname () {
		return tTopicname;
	}

	/**
	 * Set the value related to the column: t_topicname
	 * @param tTopicname the t_topicname value
	 */
	public void setTTopicname (java.lang.String tTopicname) {
		this.tTopicname = tTopicname;
	}



	/**
	 * Return the value associated with the column: t_sortid
	 */
	public cn.hope.front.pojo.CFlevel2 getCFlevel2 () {
		return cFlevel2;
	}

	/**
	 * Set the value related to the column: t_sortid
	 * @param cFlevel2 the t_sortid value
	 */
	public void setCFlevel2 (cn.hope.front.pojo.CFlevel2 cFlevel2) {
		this.cFlevel2 = cFlevel2;
	}



	/**
	 * Return the value associated with the column: s_username
	 */
	public cn.hope.front.pojo.Student getStudent () {
		return student;
	}

	/**
	 * Set the value related to the column: s_username
	 * @param student the s_username value
	 */
	public void setStudent (cn.hope.front.pojo.Student student) {
		this.student = student;
	}



	/**
	 * Return the value associated with the column: t_id
	 */
	public cn.hope.front.pojo.TInfo getTInfo () {
		return tInfo;
	}

	/**
	 * Set the value related to the column: t_id
	 * @param tInfo the t_id value
	 */
	public void setTInfo (cn.hope.front.pojo.TInfo tInfo) {
		this.tInfo = tInfo;
	}



	/**
	 * Return the value associated with the column: CRefourms
	 */
	public java.util.Set getCRefourms () {
		return cRefourms;
	}

	/**
	 * Set the value related to the column: CRefourms
	 * @param cRefourms the CRefourms value
	 */
	public void setCRefourms (java.util.Set cRefourms) {
		this.cRefourms = cRefourms;
	}

	public void addToCRefourms (cn.hope.front.pojo.CRefourm cRefourm) {
		if (null == getCRefourms()) setCRefourms(new java.util.HashSet());
		getCRefourms().add(cRefourm);
	}





	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof cn.hope.front.pojo.CFourm)) return false;
		else {
			cn.hope.front.pojo.CFourm cFourm = (cn.hope.front.pojo.CFourm) obj;
			if (null == this.getTTopicid() || null == cFourm.getTTopicid()) return false;
			else return (this.getTTopicid().equals(cFourm.getTTopicid()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getTTopicid()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getTTopicid().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}

⌨️ 快捷键说明

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