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

📄 baserole.java

📁 jsf+spring+ibatis 的一个程序,主要用来介绍JSF程序.
💻 JAVA
字号:
package com.wxd.common.popedom.persistence.entity.base;

import java.io.Serializable;


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

public abstract class BaseRole  implements Serializable {

	public static String REF = "Role";
	public static String PROP_ROLE_DESCRIBE = "RoleDescribe";
	public static String PROP_SYS = "Sys";
	public static String PROP_ROLE_NAME = "RoleName";
	public static String PROP_ID = "Id";
	public static String PROP_ROLE_ID = "RoleId";


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

	/**
	 * Constructor for primary key
	 */
	public BaseRole (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseRole (
		java.lang.Integer id,
		java.lang.String roleId,
		java.lang.String roleName) {

		this.setId(id);
		this.setRoleId(roleId);
		this.setRoleName(roleName);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

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

	// fields
	private java.lang.String roleId;
	private java.lang.String roleName;
	private java.lang.String roleDescribe;
	private boolean sys;

	// collections
	private java.util.Set<com.wxd.common.popedom.persistence.entity.RoleAction> roleActions;
	private java.util.Set<com.wxd.common.popedom.persistence.entity.OperatorRole> operatorRoles;



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

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




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

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



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

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



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

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



	/**
	 * Return the value associated with the column: is_sys
	 */
	public boolean isSys () {
		return sys;
	}

	/**
	 * Set the value related to the column: is_sys
	 * @param sys the is_sys value
	 */
	public void setSys (boolean sys) {
		this.sys = sys;
	}



	/**
	 * Return the value associated with the column: RoleActions
	 */
	public java.util.Set<com.wxd.common.popedom.persistence.entity.RoleAction> getRoleActions () {
		return roleActions;
	}

	/**
	 * Set the value related to the column: RoleActions
	 * @param roleActions the RoleActions value
	 */
	public void setRoleActions (java.util.Set<com.wxd.common.popedom.persistence.entity.RoleAction> roleActions) {
		this.roleActions = roleActions;
	}

	public void addToRoleActions (com.wxd.common.popedom.persistence.entity.RoleAction roleAction) {
		if (null == getRoleActions()) setRoleActions(new java.util.TreeSet<com.wxd.common.popedom.persistence.entity.RoleAction>());
		getRoleActions().add(roleAction);
	}



	/**
	 * Return the value associated with the column: OperatorRoles
	 */
	public java.util.Set<com.wxd.common.popedom.persistence.entity.OperatorRole> getOperatorRoles () {
		return operatorRoles;
	}

	/**
	 * Set the value related to the column: OperatorRoles
	 * @param operatorRoles the OperatorRoles value
	 */
	public void setOperatorRoles (java.util.Set<com.wxd.common.popedom.persistence.entity.OperatorRole> operatorRoles) {
		this.operatorRoles = operatorRoles;
	}

	public void addToOperatorRoles (com.wxd.common.popedom.persistence.entity.OperatorRole operatorRole) {
		if (null == getOperatorRoles()) setOperatorRoles(new java.util.TreeSet<com.wxd.common.popedom.persistence.entity.OperatorRole>());
		getOperatorRoles().add(operatorRole);
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.wxd.common.popedom.persistence.entity.Role)) return false;
		else {
			com.wxd.common.popedom.persistence.entity.Role role = (com.wxd.common.popedom.persistence.entity.Role) obj;
			if (null == this.getId() || null == role.getId()) return false;
			else return (this.getId().equals(role.getId()));
		}
	}

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


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


}

⌨️ 快捷键说明

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