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

📄 deptinfo.java

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

package vincent;

import java.io.Serializable;

/**
 * 实体类 DeptInfo
 *
 * @author Virlene Cheng
 */
public class DeptInfo implements Serializable
{
    protected String deptId;
    protected String deptName;
    protected String description;
    
    /** Creates a new instance of DeptInfo */
    public DeptInfo()
    {
    }
    
    /**
     * 使用指定的值创建 DeptInfo 的新实例。
     * @param deptId,DeptInfo 的 deptId
     */
    public DeptInfo(String deptId)
    {
	this.setDeptId(deptId);
    }
    
    /**
     * 使用指定的值创建 DeptInfo 的新实例。
     * @param deptId,DeptInfo 的 deptId
     * @param deptName,DeptInfo 的 deptName
     */
    public DeptInfo(String deptId, String deptName)
    {
	this.setDeptId(deptId);
	this.setDeptName(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 此对象的散列代码值。
     */
    public int hashCode()
    {
	int hash = 0;
	hash += (this.getDeptId() != null ? this.getDeptId().hashCode() : 0);
	return hash;
    }
    
    /**
     * 确定其他对象是否等于此 DeptInfo。当且仅当
     * 参数不为 null 且该参数是具有与此对象相同 id 字段值的 DeptInfo 对象时,
     * 结果才为 <code>true</code>。
     * @param 对象,要比较的引用对象
     * 如果此对象与参数相同,则 @return <code>true</code>;
     * 否则为 <code>false</code>。
     */
    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.getDeptId() != other.getDeptId() && (this.getDeptId() == null || !this.getDeptId().equals(other.getDeptId()))) return false;
	return true;
    }
    
    /**
     * 返回对象的字符串表示法。该实现根据 id 字段
     * 构造此表示法。
     * @return 对象的字符串表示法。
     */
    public String toString()
    {
	return getDeptName();
    }
    
}

⌨️ 快捷键说明

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