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

📄 room.java

📁 基于JSF开发的一个洒店管理系,具有中文
💻 JAVA
字号:
/*
 * @(#)Room.java	1.0 05/10/10
 *
 * Copyright 2005 HUST Hotel, Inc. All rights reserved.
 */

package net.husthotel.beans;

import java.util.Date;

/**
 * 代表房间.
 * @author icerain
 * @version 1.0
 */
public class Room  {
	private String roomStyle; //房间类型
	private String roomPrice; //房间价格
	private String roomState; //房间状态
	private Date checkoutDate; //房屋退出时间
	private Date checkinDate ; //房屋入住时间
	private String roomNum; //房间号
	
	private boolean editable = false;
	private boolean deletable = false;
	
	public Room() {
		
	}
	
	/**
	 * 添加房间.
	 * @return a string 用于JSF导航;表示是否添加成功.
	 */
	public String addRoomAction() {
		/*
		 * Parameters:
		 *year - the year minus 1900.
		 *month - the month between 0-11.
		 *date - the day of the month between 1-31.
		 */
		checkoutDate = new Date(2000-1900,0,1); //默认值要在Mysql数据库中Date的范围内
		checkinDate = new Date(2000-1900,0,1);
		return new Administrator().addRoomAction(this);
	}
	
	/**
	 * 删除房间.
	 * @return a string 用于JSF导航;表示是否删除成功.
	 */
	public String deleteRoomAction() {
		if( new Administrator().deleteRoom(getRoomNum())) {
			return "aOperateSuc";
		}
		return "aOperateFail";
	}
	
	/**
	 * 修改房间信息.
	 * @return a string.
	 */
	public String modifyRoomInfoAction() {
		return new Administrator().modifyRoomInfo(this);
	}
	/*----------------------getter/setter 方法------------------------------*/
	public Date getCheckinDate() {
		return checkinDate;
	}
	public void setCheckinDate(Date checkinDate) {
		this.checkinDate = checkinDate;
	}
	public Date  getCheckoutDate() {
		return checkoutDate;
	}
	public void setCheckoutDate(Date checkoutDate) {
		this.checkoutDate = checkoutDate;
	}
	public String getRoomNum() {
		return roomNum;
	}
	public void setRoomNum(String roomNum) {
		this.roomNum = roomNum;
	}
	public String getRoomPrice() {
		return roomPrice;
	}
	public void setRoomPrice(String roomPrice) {
		this.roomPrice = roomPrice;
	}
	public String getRoomState() {
		return roomState;
	}
	public void setRoomState(String roomState) {
		this.roomState = roomState;
	}
	public String getRoomStyle() {
		return roomStyle;
	}
	public void setRoomStyle(String roomStyle) {
		this.roomStyle = roomStyle;
	}
	public boolean isEditable() {
		return editable;
	}
	public void setEditable(boolean editable) {
		this.editable = editable;
	}

	public boolean isDeletable() {
		return deletable;
	}

	public void setDeletable(boolean deletable) {
		//System.out.println("room:setDeletable" + deletable);
		this.deletable = deletable;
	}
	
}

⌨️ 快捷键说明

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