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

📄 basetblog.java

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

import java.io.Serializable;


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

public abstract class BaseTBlog  implements Serializable {

	public static String REF = "TBlog";
	public static String PROP_FLAG = "flag";
	public static String PROP_T_ARTICLEQU = "TArticlequ";
	public static String PROP_TB_CON = "tbCon";
	public static String PROP_TB_TIME = "tbTime";
	public static String PROP_TB_TITLE = "tbTitle";


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

	/**
	 * Constructor for primary key
	 */
	public BaseTBlog (java.lang.Integer tbId) {
		this.setTbId(tbId);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseTBlog (
		java.lang.Integer tbId,
		java.lang.String flag,
		java.lang.Integer tArticlequ,
		java.lang.String tbCon,
		java.util.Date tbTime,
		java.lang.String tbTitle) {

		this.setTbId(tbId);
		this.setFlag(flag);
		this.setTArticlequ(tArticlequ);
		this.setTbCon(tbCon);
		this.setTbTime(tbTime);
		this.setTbTitle(tbTitle);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String flag;
	private java.lang.Integer tArticlequ;
	private java.lang.String tbCon;
	private java.util.Date tbTime;
	private java.lang.String tbTitle;

	// many to one
	private cn.hope.front.pojo.TInfo tInfo;
	private cn.hope.front.pojo.TBlogtype tBlogtype;

	// collections
	private java.util.Set tReblogs;



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

	/**
	 * Set the unique identifier of this class
	 * @param tbId the new ID
	 */
	public void setTbId (java.lang.Integer tbId) {
		this.tbId = tbId;
		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_articlequ
	 */
	public java.lang.Integer getTArticlequ () {
		return tArticlequ;
	}

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



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

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



	/**
	 * Return the value associated with the column: tb_time
	 */
	public java.util.Date getTbTime () {
		return tbTime;
	}

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



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

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



	/**
	 * 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: t_typeid
	 */
	public cn.hope.front.pojo.TBlogtype getTBlogtype () {
		return tBlogtype;
	}

	/**
	 * Set the value related to the column: t_typeid
	 * @param tBlogtype the t_typeid value
	 */
	public void setTBlogtype (cn.hope.front.pojo.TBlogtype tBlogtype) {
		this.tBlogtype = tBlogtype;
	}



	/**
	 * Return the value associated with the column: TReblogs
	 */
	public java.util.Set getTReblogs () {
		return tReblogs;
	}

	/**
	 * Set the value related to the column: TReblogs
	 * @param tReblogs the TReblogs value
	 */
	public void setTReblogs (java.util.Set tReblogs) {
		this.tReblogs = tReblogs;
	}

	public void addToTReblogs (cn.hope.front.pojo.TReblog tReblog) {
		if (null == getTReblogs()) setTReblogs(new java.util.HashSet());
		getTReblogs().add(tReblog);
	}





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

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


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


}

⌨️ 快捷键说明

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