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

📄 basemaction.java

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

import java.io.Serializable;


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

public abstract class BaseMAction  implements Serializable {

	public static String REF = "MAction";
	public static String PROP_ACTION = "action";
	public static String PROP_FLAG = "flag";
	public static String PROP_LEVEL = "level";
	public static String PROP_LOG = "log";


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

	/**
	 * Constructor for primary key
	 */
	public BaseMAction (java.lang.Integer actionId) {
		this.setActionId(actionId);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseMAction (
		java.lang.Integer actionId,
		java.lang.String action,
		java.lang.String flag,
		java.lang.Integer level,
		java.lang.Integer log) {

		this.setActionId(actionId);
		this.setAction(action);
		this.setFlag(flag);
		this.setLevel(level);
		this.setLog(log);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String action;
	private java.lang.String flag;
	private java.lang.Integer level;
	private java.lang.Integer log;

	// many to one
	private cn.hope.mana.pojo.MSubfun mSubfun;



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

	/**
	 * Set the unique identifier of this class
	 * @param actionId the new ID
	 */
	public void setActionId (java.lang.Integer actionId) {
		this.actionId = actionId;
		this.hashCode = Integer.MIN_VALUE;
	}




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

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



	/**
	 * 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.Integer getLevel () {
		return level;
	}

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



	/**
	 * Return the value associated with the column: log
	 */
	public java.lang.Integer getLog () {
		return log;
	}

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



	/**
	 * Return the value associated with the column: sub_id
	 */
	public cn.hope.mana.pojo.MSubfun getMSubfun () {
		return mSubfun;
	}

	/**
	 * Set the value related to the column: sub_id
	 * @param mSubfun the sub_id value
	 */
	public void setMSubfun (cn.hope.mana.pojo.MSubfun mSubfun) {
		this.mSubfun = mSubfun;
	}





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

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


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


}

⌨️ 快捷键说明

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