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

📄 basemnounce.java

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

import java.io.Serializable;


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

public abstract class BaseMNounce  implements Serializable {

	public static String REF = "MNounce";
	public static String PROP_FLAG = "flag";
	public static String PROP_N_CONTENT = "NContent";
	public static String PROP_N_TIME = "NTime";
	public static String PROP_N_TITLE = "NTitle";


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

	/**
	 * Constructor for primary key
	 */
	public BaseMNounce (java.lang.Integer nId) {
		this.setNId(nId);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseMNounce (
		java.lang.Integer nId,
		java.lang.String flag,
		java.lang.String nContent,
		java.util.Date nTime,
		java.lang.String nTitle) {

		this.setNId(nId);
		this.setFlag(flag);
		this.setNContent(nContent);
		this.setNTime(nTime);
		this.setNTitle(nTitle);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String flag;
	private java.lang.String nContent;
	private java.util.Date nTime;
	private java.lang.String nTitle;

	// many to one
	private cn.hope.mana.pojo.MNtype mNtype;



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

	/**
	 * Set the unique identifier of this class
	 * @param nId the new ID
	 */
	public void setNId (java.lang.Integer nId) {
		this.nId = nId;
		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: n_content
	 */
	public java.lang.String getNContent () {
		return nContent;
	}

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



	/**
	 * Return the value associated with the column: n_time
	 */
	public java.util.Date getNTime () {
		return nTime;
	}

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



	/**
	 * Return the value associated with the column: n_title
	 */
	public java.lang.String getNTitle () {
		return nTitle;
	}

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



	/**
	 * Return the value associated with the column: type_id
	 */
	public cn.hope.mana.pojo.MNtype getMNtype () {
		return mNtype;
	}

	/**
	 * Set the value related to the column: type_id
	 * @param mNtype the type_id value
	 */
	public void setMNtype (cn.hope.mana.pojo.MNtype mNtype) {
		this.mNtype = mNtype;
	}





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

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


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


}

⌨️ 快捷键说明

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