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

📄 basesrehw.java

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

import java.io.Serializable;


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

public abstract class BaseSRehw  implements Serializable {

	public static String REF = "SRehw";
	public static String PROP_FLAG = "flag";
	public static String PROP_RE_TIME = "reTime";
	public static String PROP_S_HWADD = "SHwadd";
	public static String PROP_S_HWCHECKINF = "SHwcheckinf";
	public static String PROP_S_HWCONTENT = "SHwcontent";
	public static String PROP_S_HWPOINT = "SHwpoint";
	public static String PROP_S_STATS = "SStats";


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

	/**
	 * Constructor for primary key
	 */
	public BaseSRehw (java.lang.Integer srhId) {
		this.setSrhId(srhId);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseSRehw (
		java.lang.Integer srhId,
		java.lang.String flag,
		java.util.Date reTime,
		java.lang.String sHwcontent,
		java.lang.String sStats) {

		this.setSrhId(srhId);
		this.setFlag(flag);
		this.setReTime(reTime);
		this.setSHwcontent(sHwcontent);
		this.setSStats(sStats);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String flag;
	private java.util.Date reTime;
	private java.lang.String sHwadd;
	private java.lang.String sHwcheckinf;
	private java.lang.String sHwcontent;
	private java.lang.Integer sHwpoint;
	private java.lang.String sStats;

	// many to one
	private cn.hope.front.pojo.Student student;
	private cn.hope.front.pojo.THomework tHomework;



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

	/**
	 * Set the unique identifier of this class
	 * @param srhId the new ID
	 */
	public void setSrhId (java.lang.Integer srhId) {
		this.srhId = srhId;
		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: re_time
	 */
	public java.util.Date getReTime () {
		return reTime;
	}

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



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

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



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

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



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

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



	/**
	 * Return the value associated with the column: s_hwpoint
	 */
	public java.lang.Integer getSHwpoint () {
		return sHwpoint;
	}

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



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

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



	/**
	 * 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_hwid
	 */
	public cn.hope.front.pojo.THomework getTHomework () {
		return tHomework;
	}

	/**
	 * Set the value related to the column: t_hwid
	 * @param tHomework the t_hwid value
	 */
	public void setTHomework (cn.hope.front.pojo.THomework tHomework) {
		this.tHomework = tHomework;
	}





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

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


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


}

⌨️ 快捷键说明

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