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

📄 deptinfo.java

📁 Athena酒店小组_Athena酒店管理系统
💻 JAVA
字号:
/*
 * DeptInfo.java
 *
 * Created on 2007年6月4日, 下午10:07
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package temp;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 实体类 DeptInfo
 * 
 * @author Virlene Cheng
 */
@Entity
@Table(name = "DeptInfo")
public class DeptInfo implements Serializable
{

	@Id
	@Column(name = "DeptId", nullable = false)
	private String deptId;

	@Column(name = "DeptName", nullable = false)
	private String deptName;

	@Column(name = "Description")
	private String description;
    
    /** Creates a new instance of DeptInfo */
    public DeptInfo()
    {
    }

	/**
	 * 使用指定的值创建 DeptInfo 的新实例。
	 * @param deptId,DeptInfo 的 deptId
	 */
	public DeptInfo(String deptId)
	{
		this.deptId = deptId;
	}

	/**
	 * 使用指定的值创建 DeptInfo 的新实例。
	 * @param deptId,DeptInfo 的 deptId
	 * @param deptName,DeptInfo 的 deptName
	 */
	public DeptInfo(String deptId, String deptName)
	{
		this.deptId = deptId;
		this.deptName = deptName;
	}

	/**
	 * 获取此 DeptInfo 的 deptId。
	 * @return deptId
	 */
	public String getDeptId()
	{
		return this.deptId;
	}

	/**
	 * 将此 DeptInfo 的 deptId 设置为指定的值。
	 * @param deptId,新建 deptId
	 */
	public void setDeptId(String deptId)
	{
		this.deptId = deptId;
	}

	/**
	 * 获取此 DeptInfo 的 deptName。
	 * @return deptName
	 */
	public String getDeptName()
	{
		return this.deptName;
	}

	/**
	 * 将此 DeptInfo 的 deptName 设置为指定的值。
	 * @param deptName,新建 deptName
	 */
	public void setDeptName(String deptName)
	{
		this.deptName = deptName;
	}

	/**
	 * 获取此 DeptInfo 的 description。
	 * @return description
	 */
	public String getDescription()
	{
		return this.description;
	}

	/**
	 * 将此 DeptInfo 的 description 设置为指定的值。
	 * @param description,新建 description
	 */
	public void setDescription(String description)
	{
		this.description = description;
	}

	/**
	 * 返回对象的散列代码值。该实现根据此对象
	 * 中 id 字段计算散列代码值。
	 * @return 此对象的散列代码值。
	 */
	@Override
	public int hashCode()
	{
		int hash = 0;
		hash += (this.deptId != null ? this.deptId.hashCode() : 0);
		return hash;
	}

	/**
	 * 确定其他对象是否等于此 DeptInfo。当且仅当
	 * 参数不为 null 且该参数是具有与此对象相同 id 字段值的 DeptInfo 对象时,
	 * 结果才为 <code>true</code>。
	 * @param 对象,要比较的引用对象
	 * 如果此对象与参数相同,则 @return <code>true</code>;
	 * 否则为 <code>false</code>。
	 */
	@Override
	public boolean equals(Object object)
	{
		// TODO: Warning - this method won't work in the case the id fields are not set
		if (!(object instanceof DeptInfo)) {
			return false;
		}
		DeptInfo other = (DeptInfo)object;
		if (this.deptId != other.deptId && (this.deptId == null || !this.deptId.equals(other.deptId))) return false;
		return true;
	}

	/**
	 * 返回对象的字符串表示法。该实现根据 id 字段
	 * 构造此表示法。
	 * @return 对象的字符串表示法。
	 */
	@Override
	public String toString()
	{
		return "temp.DeptInfo[deptId=" + deptId + "]";
	}
    
}

⌨️ 快捷键说明

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