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

📄 user.java

📁 本源码为教学管理信息系统
💻 JAVA
字号:
package com.wygl.xtgl.domain;import java.io.Serializable;import java.util.Calendar;import java.util.HashSet;import java.util.Set;import com.wygl.xtgl.domain.Employee;/** * @author author </a> * @version 0.0.0001 *  * @hibernate.class *  table="XTGL_USER" *  */public class User implements Serializable {		private String   id;              		 			   	     //用户ID	private String   name;           							 //用户名称	private String   password;              					 //用户密码	private String   email;   			     					 //用户电子邮箱	private Calendar timeOfCreation;		 					 //创建时间	private Set      userRoles =  new HashSet();                 //用户角色组合	private Employee employee;                                   //用户对应的员工		/**	 * @hibernate.id	 * column="USER_ID"	 *  length="36"	 *  generator-class="foreign"	 * @hibernate.generator-param name="property" value="employee"	 */	public String getId() {		return id;	}	public void setId(String id) {		this.id = id;	}	/**	 * @hibernate.property	 *  column="NAME"	 *  length="25"	 */		public String getName() {		return name;	}	public void setName(String name) {		this.name = name;	}	/**	 * @hibernate.property	 *  column="PASSWORD"	 *  length="25"	 */			public String getPassword() {		return password;	}	public void setPassword(String password) {		this.password = password;	}	/**	 * @hibernate.property	 *  column="EMAIL"	 *  length="60"	 */		public String getEmail() {		return email;	}	public void setEmail(String email) {		this.email = email;	}		/**	 * @hibernate.property	 *  column="TIMEOFCREATION"	 */		public Calendar getTimeOfCreation() {		return timeOfCreation;	}	public void setTimeOfCreation(Calendar timeOfCreation) {		this.timeOfCreation = timeOfCreation;	}		/**	 * @hibernate.set	 *  lazy="true"	 *  inverse="true"	 *  cascade="all"	 * @hibernate.collection-key	 *  column="USER_ID"	 * @hibernate.collection-one-to-many	 *  class="com.oliveinfo.xxwlyx.xtgl.domain.UserRole"	 * @return Set	 */	public Set getUserRoles() {		return userRoles;	}		/**	 * @param userRoles The userRoles to set.	 */	public void setUserRoles(Set userRoles) {		this.userRoles = userRoles;	}		public UserRole addRole(Role role){		UserRole ur = new UserRole();		ur.setRole(role);		ur.setUser(this);		this.getUserRoles().add(ur);		return ur;	}			/**	* @hibernate.one-to-one	* 	name="employee"	* 	cascade="none"	* 	class="com.oliveinfo.xxwlyx.xtgl.organization.domain.Employee"	* 	outer-join="auto"	* 	constrained="false"	* @return Returns the employee.	*/	public Employee getEmployee() {		return employee;	}	/**	 * @param employee The employee to set.	 */	public void setEmployee(Employee employee) {		this.employee = employee;	}		public boolean equals(Object other) {		if (other==null) return false;		if ( !(other instanceof User) ) return false;		return ( (User) other ).getName().equals(name);	}		public int hashCode() {		return id.hashCode();	}}

⌨️ 快捷键说明

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