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

📄 baseteach.java

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

import java.io.Serializable;


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

public abstract class BaseTeach  implements Serializable {

	public static String REF = "Teach";
	public static String PROP_FLAG = "flag";


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

	/**
	 * Constructor for primary key
	 */
	public BaseTeach (java.lang.Integer thId) {
		this.setThId(thId);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String flag;

	// many to one
	private cn.hope.mana.pojo.SClass sClass;
	private cn.hope.mana.pojo.CSubject cSubject;
	private cn.hope.mana.pojo.TInfo tInfo;



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

	/**
	 * Set the unique identifier of this class
	 * @param thId the new ID
	 */
	public void setThId (java.lang.Integer thId) {
		this.thId = thId;
		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: s_classid
	 */
	public cn.hope.mana.pojo.SClass getSClass () {
		return sClass;
	}

	/**
	 * Set the value related to the column: s_classid
	 * @param sClass the s_classid value
	 */
	public void setSClass (cn.hope.mana.pojo.SClass sClass) {
		this.sClass = sClass;
	}



	/**
	 * Return the value associated with the column: s_sid
	 */
	public cn.hope.mana.pojo.CSubject getCSubject () {
		return cSubject;
	}

	/**
	 * Set the value related to the column: s_sid
	 * @param cSubject the s_sid value
	 */
	public void setCSubject (cn.hope.mana.pojo.CSubject cSubject) {
		this.cSubject = cSubject;
	}



	/**
	 * Return the value associated with the column: t_id
	 */
	public cn.hope.mana.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.mana.pojo.TInfo tInfo) {
		this.tInfo = tInfo;
	}





	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof cn.hope.mana.pojo.Teach)) return false;
		else {
			cn.hope.mana.pojo.Teach teach = (cn.hope.mana.pojo.Teach) obj;
			if (null == this.getThId() || null == teach.getThId()) return false;
			else return (this.getThId().equals(teach.getThId()));
		}
	}

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


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


}

⌨️ 快捷键说明

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