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

📄 customercardinfo.java

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

package evan;

import java.io.Serializable;


/**
 * 实体类 CustomerCard
 * 
 * @author Virlene Cheng
 */

public class CustomerCardInfo implements Serializable
{

	private String cardId;

	private double money;

	private String password;
    
    /** Creates a new instance of CustomerCard */
    public CustomerCardInfo()
    {
    }

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

	/**
	 * 使用指定的值创建 CustomerCard 的新实例。
	 * @param cardId,CustomerCard 的 cardId
	 * @param money,CustomerCard 的 money
	 */
	public CustomerCardInfo(String cardId, double money)
	{
		this.cardId = cardId;
		this.money = money;
	}

	/**
	 * 获取此 CustomerCard 的 cardId。
	 * @return cardId
	 */
	public String getCardId()
	{
		return this.cardId;
	}

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

	/**
	 * 获取此 CustomerCard 的 money。
	 * @return money
	 */
	public double getMoney()
	{
		return this.money;
	}

	/**
	 * 将此 CustomerCard 的 money 设置为指定的值。
	 * @param money,新建 money
	 */
	public void setMoney(double money)
	{
		this.money = money;
	}

	/**
	 * 获取此 CustomerCard 的 customerId。
	 * @return customerId
	 */
	public String getPassword()
	{
		return this.password;
	}
	public void setPassword(String password)
	{
		this.password = password;
	}

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

	/**
	 * 确定其他对象是否等于此 CustomerCard。当且仅当
	 * 参数不为 null 且该参数是具有与此对象相同 id 字段值的 CustomerCard 对象时,
	 * 结果才为 <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 CustomerCardInfo)) {
			return false;
		}
		CustomerCardInfo other = (CustomerCardInfo)object;
		if (this.cardId != other.cardId && (this.cardId == null || !this.cardId.equals(other.cardId))) return false;
		return true;
	}

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

⌨️ 快捷键说明

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