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

📄 basemsubfun.java

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

import java.io.Serializable;


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

public abstract class BaseMSubfun  implements Serializable {

	public static String REF = "MSubfun";
	public static String PROP_FLAG = "flag";
	public static String PROP_LEVEL = "level";
	public static String PROP_MS_NAME = "msName";


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

	/**
	 * Constructor for primary key
	 */
	public BaseMSubfun (java.lang.Integer subId) {
		this.setSubId(subId);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseMSubfun (
		java.lang.Integer subId,
		java.lang.String flag,
		java.lang.String level,
		java.lang.String msName) {

		this.setSubId(subId);
		this.setFlag(flag);
		this.setLevel(level);
		this.setMsName(msName);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String flag;
	private java.lang.String level;
	private java.lang.String msName;

	// many to one
	private cn.hope.front.pojo.MMainfun mMainfun;

	// collections
	private java.util.Set mActions;
	private java.util.Set mGpowers;



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

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

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



	/**
	 * Return the value associated with the column: ms_name
	 */
	public java.lang.String getMsName () {
		return msName;
	}

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



	/**
	 * Return the value associated with the column: main_id
	 */
	public cn.hope.front.pojo.MMainfun getMMainfun () {
		return mMainfun;
	}

	/**
	 * Set the value related to the column: main_id
	 * @param mMainfun the main_id value
	 */
	public void setMMainfun (cn.hope.front.pojo.MMainfun mMainfun) {
		this.mMainfun = mMainfun;
	}



	/**
	 * Return the value associated with the column: MActions
	 */
	public java.util.Set getMActions () {
		return mActions;
	}

	/**
	 * Set the value related to the column: MActions
	 * @param mActions the MActions value
	 */
	public void setMActions (java.util.Set mActions) {
		this.mActions = mActions;
	}

	public void addToMActions (cn.hope.front.pojo.MAction mAction) {
		if (null == getMActions()) setMActions(new java.util.HashSet());
		getMActions().add(mAction);
	}



	/**
	 * Return the value associated with the column: MGpowers
	 */
	public java.util.Set getMGpowers () {
		return mGpowers;
	}

	/**
	 * Set the value related to the column: MGpowers
	 * @param mGpowers the MGpowers value
	 */
	public void setMGpowers (java.util.Set mGpowers) {
		this.mGpowers = mGpowers;
	}

	public void addToMGpowers (cn.hope.front.pojo.MGpower mGpower) {
		if (null == getMGpowers()) setMGpowers(new java.util.HashSet());
		getMGpowers().add(mGpower);
	}





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

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


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


}

⌨️ 快捷键说明

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