Projects / Hotel Management System / src / hoteldraft / Reservation.java
Reservation.java
Raw
package hoteldraft;

import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "reservations")
public class Reservation implements java.io.Serializable {

    @Id
    @Column(name = "ID")
    private int ID;
    @Column(name = "Fname")
    private String Fname;
    @Column(name = "Lname")
    private String Lname;
    @Column(name = "email")
    private String email;
    @Column(name = "roomType")
    private String roomType;
    @Column(name = "roomNo")
    private int roomNo;
    @Column(name = "guestCount")
    private int guestCount;
    @Id
    @Column(name = "arrivalDate")
    private Date arrivalDate;
    @Column(name = "departureDate")
    private Date departureDate;
    @Column(name = "specialRequest")
    private String specialRequest;

    //Constructors, getters and seters.
    public Reservation() {}

    public Reservation(int id, String Fname, String Lname, String email, String roomType, int roomNo, int guestCount, Date arrivalDate, Date departureDate, String specialRequest) {
        this.ID = id;
        this.Fname = Fname;
        this.Lname = Lname;
        this.email = email;
        this.roomType = roomType;
        this.roomNo = roomNo;
        this.guestCount = guestCount;
        this.arrivalDate = arrivalDate;
        this.departureDate = departureDate;
        this.specialRequest = specialRequest;
    }

    public Reservation(int id, Date arrivalDate) {
        this.ID = id;
        this.arrivalDate = arrivalDate;
    }

    public int getID() {
        return ID;
    }

    public void setID(int id) {
        this.ID = id;
    }

    public String getFname() {
        return Fname;
    }

    public void setFname(String Fname) {
        this.Fname = Fname;
    }

    public String getLname() {
        return Lname;
    }

    public void setLname(String Lname) {
        this.Lname = Lname;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    public int getRoomNo() {
        return roomNo;
    }

    public void setRoomNo(int roomNo) {
        this.roomNo = roomNo;
    }

    public int getGuestCount() {
        return guestCount;
    }

    public void setGuestCount(int guestCount) {
        this.guestCount = guestCount;
    }

    public Date getArrivalDate() {
        return arrivalDate;
    }

    public void setArrivalDate(Date arrivalDate) {
        this.arrivalDate = arrivalDate;
    }

    public Date getDepartureDate() {
        return departureDate;
    }

    public void setDepartureDate(Date departureDate) {
        this.departureDate = departureDate;
    }

    public String getSpecialRequest() {
        return specialRequest;
    }

    public void setSpecialRequest(String specialRequest) {
        this.specialRequest = specialRequest;
    }
}