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

📄 basetblogtype.java

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

import java.io.Serializable;


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

public abstract class BaseTBlogtype  implements Serializable {

	public static String REF = "TBlogtype";
	public static String PROP_FLAG = "flag";
	public static String PROP_T_TITLE = "TTitle";


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

	/**
	 * Constructor for primary key
	 */
	public BaseTBlogtype (java.lang.Integer tTypeid) {
		this.setTTypeid(tTypeid);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseTBlogtype (
		java.lang.Integer tTypeid,
		java.lang.String flag,
		java.lang.String tTitle) {

		this.setTTypeid(tTypeid);
		this.setFlag(flag);
		this.setTTitle(tTitle);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String flag;
	private java.lang.String tTitle;

	// collections
	private java.util.Set tBlogs;



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

	/**
	 * Set the unique identifier of this class
	 * @param tTypeid the new ID
	 */
	public void setTTypeid (java.lang.Integer tTypeid) {
		this.tTypeid = tTypeid;
		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_title
	 */
	public java.lang.String getTTitle () {
		return tTitle;
	}

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



	/**
	 * Return the value associated with the column: TBlogs
	 */
	public java.util.Set getTBlogs () {
		return tBlogs;
	}

	/**
	 * Set the value related to the column: TBlogs
	 * @param tBlogs the TBlogs value
	 */
	public void setTBlogs (java.util.Set tBlogs) {
		this.tBlogs = tBlogs;
	}

	public void addToTBlogs (cn.hope.front.pojo.TBlog tBlog) {
		if (null == getTBlogs()) setTBlogs(new java.util.HashSet());
		getTBlogs().add(tBlog);
	}





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

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


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


}

⌨️ 快捷键说明

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