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

📄 basetservice.java

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

import java.io.Serializable;


/**
 * This is an object that contains data related to the t_service 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_service"
 */

public abstract class BaseTService  implements Serializable {

	public static String REF = "TService";
	public static String PROP_FLAG = "flag";
	public static String PROP_T_SVAPPEARANCE = "TSvappearance";
	public static String PROP_T_SVCATEGORY = "TSvcategory";
	public static String PROP_T_SVCONTENT = "TSvcontent";
	public static String PROP_T_SVTITLE = "TSvtitle";


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

	/**
	 * Constructor for primary key
	 */
	public BaseTService (java.lang.Integer tSvid) {
		this.setTSvid(tSvid);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseTService (
		java.lang.Integer tSvid,
		java.lang.String flag,
		java.lang.String tSvappearance,
		java.lang.String tSvcategory,
		java.lang.String tSvcontent,
		java.lang.String tSvtitle) {

		this.setTSvid(tSvid);
		this.setFlag(flag);
		this.setTSvappearance(tSvappearance);
		this.setTSvcategory(tSvcategory);
		this.setTSvcontent(tSvcontent);
		this.setTSvtitle(tSvtitle);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String flag;
	private java.lang.String tSvappearance;
	private java.lang.String tSvcategory;
	private java.lang.String tSvcontent;
	private java.lang.String tSvtitle;

	// many to one
	private cn.hope.mana.pojo.TInfo tInfoAnswer;
	private cn.hope.mana.pojo.TInfo tInfoAsk;



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

	/**
	 * Set the unique identifier of this class
	 * @param tSvid the new ID
	 */
	public void setTSvid (java.lang.Integer tSvid) {
		this.tSvid = tSvid;
		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_svappearance
	 */
	public java.lang.String getTSvappearance () {
		return tSvappearance;
	}

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



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

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



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

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



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

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



	/**
	 * Return the value associated with the column: t_answer
	 */
	public cn.hope.mana.pojo.TInfo getTInfoAnswer () {
		return tInfoAnswer;
	}

	/**
	 * Set the value related to the column: t_answer
	 * @param tInfoAnswer the t_answer value
	 */
	public void setTInfoAnswer (cn.hope.mana.pojo.TInfo tInfoAnswer) {
		this.tInfoAnswer = tInfoAnswer;
	}



	/**
	 * Return the value associated with the column: t_ask
	 */
	public cn.hope.mana.pojo.TInfo getTInfoAsk () {
		return tInfoAsk;
	}

	/**
	 * Set the value related to the column: t_ask
	 * @param tInfoAsk the t_ask value
	 */
	public void setTInfoAsk (cn.hope.mana.pojo.TInfo tInfoAsk) {
		this.tInfoAsk = tInfoAsk;
	}





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

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


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


}

⌨️ 快捷键说明

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