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

📄 roomconsumption.java

📁 Athena酒店小组_Athena酒店管理系统
💻 JAVA
字号:
/*
 * RoomConsumption.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 java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

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

	@Id
	@Column(name = "RoomNum", nullable = false)
	private String roomNum;

	@Column(name = "Account", nullable = false)
	private String account;

	@Column(name = "PeopleNum")
	private Integer peopleNum;

	@Column(name = "OpeningTime")
	@Temporal(TemporalType.TIMESTAMP)
	private Date openingTime;

	@Column(name = "EndingTime")
	@Temporal(TemporalType.TIMESTAMP)
	private Date endingTime;

	@Column(name = "Time")
	private String time;
    
    /** Creates a new instance of RoomConsumption */
    public RoomConsumption()
    {
    }

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

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

	/**
	 * 获取此 RoomConsumption 的 roomNum。
	 * @return roomNum
	 */
	public String getRoomNum()
	{
		return this.roomNum;
	}

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

	/**
	 * 获取此 RoomConsumption 的 account。
	 * @return account
	 */
	public String getAccount()
	{
		return this.account;
	}

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

	/**
	 * 获取此 RoomConsumption 的 peopleNum。
	 * @return peopleNum
	 */
	public Integer getPeopleNum()
	{
		return this.peopleNum;
	}

	/**
	 * 将此 RoomConsumption 的 peopleNum 设置为指定的值。
	 * @param peopleNum,新建 peopleNum
	 */
	public void setPeopleNum(Integer peopleNum)
	{
		this.peopleNum = peopleNum;
	}

	/**
	 * 获取此 RoomConsumption 的 openingTime。
	 * @return openingTime
	 */
	public Date getOpeningTime()
	{
		return this.openingTime;
	}

	/**
	 * 将此 RoomConsumption 的 openingTime 设置为指定的值。
	 * @param openingTime,新建 openingTime
	 */
	public void setOpeningTime(Date openingTime)
	{
		this.openingTime = openingTime;
	}

	/**
	 * 获取此 RoomConsumption 的 endingTime。
	 * @return endingTime
	 */
	public Date getEndingTime()
	{
		return this.endingTime;
	}

	/**
	 * 将此 RoomConsumption 的 endingTime 设置为指定的值。
	 * @param endingTime,新建 endingTime
	 */
	public void setEndingTime(Date endingTime)
	{
		this.endingTime = endingTime;
	}

	/**
	 * 获取此 RoomConsumption 的 time。
	 * @return time
	 */
	public String getTime()
	{
		return this.time;
	}

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

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

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

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

⌨️ 快捷键说明

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