📄 roominfo.java
字号:
package com.hotelmaster.home.domain;
import javax.persistence.*;
import org.hibernate.annotations.GenericGenerator;
/**
* Class description goes here.
*
* @author Liang
* @Date Apr 12, 2008
*/
@Entity
@Table(name="NHROOMINFO")
public class RoomInfo {
public static final String[] STATES = {"空闲","预定","租用","结帐","清洁","锁房"};
public static final int STATE_VACANT = 0;
public static final int STATE_RESERVED = 2;
public static final int STATE_RENTED = 3;
public static final int STATE_CHECKOUT = 4;
public static final int STATE_CLEANED = 5;
public static final int STATE_BLOCKED = 6;
private String roomInfoId;
private String roomInfoType;
private String roomInfoArea;
private String roomInfoFloor;
private Float roomInfoDiscount;
private Float roomInfoPrctPrice;
private String roomInfoTelphone;
private Integer roomInfoState;
private Boolean roomInfoAvlable;
@Id
@GeneratedValue(generator="assigned")
@GenericGenerator(name="assigned",strategy="assigned")
public String getRoomInfoId() {
return roomInfoId;
}
public void setRoomInfoId(String roomInfoId) {
this.roomInfoId = roomInfoId; //逻辑生成主键RM_...
}
@Column(nullable=false,length=10)
public String getRoomInfoType() { //RT...
return roomInfoType;
}
public void setRoomInfoType(String roomInfoType) {
this.roomInfoType = roomInfoType;
}
@Column(nullable=true,length=10)
public String getRoomInfoArea() {
return roomInfoArea;
}
public void setRoomInfoArea(String roomInfoArea) {
this.roomInfoArea = roomInfoArea;
}
@Column(nullable=false,length=4)
public String getRoomInfoFloor() {
return roomInfoFloor;
}
public void setRoomInfoFloor(String roomInfoFloor) {
this.roomInfoFloor = roomInfoFloor;
}
@Column(nullable=true)
public Float getRoomInfoDiscount() {
return roomInfoDiscount;
}
public void setRoomInfoDiscount(Float roomInfoDiscount) {
this.roomInfoDiscount = roomInfoDiscount;
}
@Column(nullable=false)
public Float getRoomInfoPrctPrice() {
return roomInfoPrctPrice;
}
public void setRoomInfoPrctPrice(Float roomInfoPrctPrice) {
this.roomInfoPrctPrice = roomInfoPrctPrice;
}
@Column(nullable=false,length=16)
public String getRoomInfoTelphone() {
return roomInfoTelphone;
}
public void setRoomInfoTelphone(String roomInfoTelphone) {
this.roomInfoTelphone = roomInfoTelphone;
}
@Column(nullable=false)
public Integer getRoomInfoState() {
return roomInfoState;
}
public void setRoomInfoState(Integer roomInfoState) {
this.roomInfoState = roomInfoState;
}
@Transient
public String getRoomInfoStateAsString() { return STATES[roomInfoState]; }
@Column(nullable=false)
public Boolean getRoomInfoAvlable() {
return roomInfoAvlable;
}
public void setRoomInfoAvlable(Boolean roomInfoAvlable) {
this.roomInfoAvlable = roomInfoAvlable;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -