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

📄 basettestinfo.java

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

import java.io.Serializable;


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

public abstract class BaseTTestInfo  implements Serializable {

	public static String REF = "TTestInfo";
	public static String PROP_FLAG = "flag";
	public static String PROP_T_TESTDATE = "TTestdate";
	public static String PROP_T_TESTNAME = "TTestname";
	public static String PROP_T_TESTPOINT = "TTestpoint";
	public static String PROP_T_TESTTIME = "TTesttime";


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

	/**
	 * Constructor for primary key
	 */
	public BaseTTestInfo (java.lang.Integer tTestid) {
		this.setTTestid(tTestid);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseTTestInfo (
		java.lang.Integer tTestid,
		java.lang.String flag,
		java.util.Date tTestdate,
		java.lang.String tTestname,
		java.lang.Integer tTestpoint,
		java.lang.Integer tTesttime) {

		this.setTTestid(tTestid);
		this.setFlag(flag);
		this.setTTestdate(tTestdate);
		this.setTTestname(tTestname);
		this.setTTestpoint(tTestpoint);
		this.setTTesttime(tTesttime);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String flag;
	private java.util.Date tTestdate;
	private java.lang.String tTestname;
	private java.lang.Integer tTestpoint;
	private java.lang.Integer tTesttime;

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

	// collections
	private java.util.Set sGrades;
	private java.util.Set tClassTests;
	private java.util.Set tTests;



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

	/**
	 * Set the unique identifier of this class
	 * @param tTestid the new ID
	 */
	public void setTTestid (java.lang.Integer tTestid) {
		this.tTestid = tTestid;
		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_testdate
	 */
	public java.util.Date getTTestdate () {
		return tTestdate;
	}

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



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

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



	/**
	 * Return the value associated with the column: t_testpoint
	 */
	public java.lang.Integer getTTestpoint () {
		return tTestpoint;
	}

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



	/**
	 * Return the value associated with the column: t_testtime
	 */
	public java.lang.Integer getTTesttime () {
		return tTesttime;
	}

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



	/**
	 * 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;
	}



	/**
	 * 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: SGrades
	 */
	public java.util.Set getSGrades () {
		return sGrades;
	}

	/**
	 * Set the value related to the column: SGrades
	 * @param sGrades the SGrades value
	 */
	public void setSGrades (java.util.Set sGrades) {
		this.sGrades = sGrades;
	}

	public void addToSGrades (cn.hope.mana.pojo.SGrade sGrade) {
		if (null == getSGrades()) setSGrades(new java.util.HashSet());
		getSGrades().add(sGrade);
	}



	/**
	 * Return the value associated with the column: TClassTests
	 */
	public java.util.Set getTClassTests () {
		return tClassTests;
	}

	/**
	 * Set the value related to the column: TClassTests
	 * @param tClassTests the TClassTests value
	 */
	public void setTClassTests (java.util.Set tClassTests) {
		this.tClassTests = tClassTests;
	}

	public void addToTClassTests (cn.hope.mana.pojo.TClassTest tClassTest) {
		if (null == getTClassTests()) setTClassTests(new java.util.HashSet());
		getTClassTests().add(tClassTest);
	}



	/**
	 * Return the value associated with the column: TTests
	 */
	public java.util.Set getTTests () {
		return tTests;
	}

	/**
	 * Set the value related to the column: TTests
	 * @param tTests the TTests value
	 */
	public void setTTests (java.util.Set tTests) {
		this.tTests = tTests;
	}

	public void addToTTests (cn.hope.mana.pojo.TTest tTest) {
		if (null == getTTests()) setTTests(new java.util.HashSet());
		getTTests().add(tTest);
	}





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

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


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


}

⌨️ 快捷键说明

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