FileDocCategorySizeDatePackage
Reservation.javaAPI DocExample1398Sun Apr 24 09:01:16 BST 2005com.springbook

Reservation.java

package com.springbook;

import java.util.Date;

public class Reservation {
    private int reservationId;
    private Date reservationDate;
    private Bike bike;
    private Customer customer;

    public Reservation() {

    }

    public int getReservationId() {
        return reservationId;
    }

    public void setReservationId(int reservationId) {
        this.reservationId = reservationId;
    }

    public Date getReservationDate() {
        return reservationDate;
    }

    public void setReservationDate(Date reservationDate) {
        this.reservationDate = reservationDate;
    }

    public Bike getBike() {
        return bike;
    }

    public void setBike(Bike bike) {
        this.bike = bike;
    }

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public Reservation(int id, Bike bike, Customer customer, Date date) {
        this.reservationId = id;
        this.bike = bike;
        this.customer = customer;
        this.reservationDate = date;
    }

    public String toString() {
        return "Reservation : " +
                "reservationId -- " + reservationId +
                "\n: reservationDate -- " + reservationDate +
                "\n: bike -- " + bike +
                "\n: customer -- " + customer +
                ".\n";
    }


}