cdde621cf9d03cacc5c7cbbbc17177e7baa00e0d
[RRRRHHHH_Code] / ruralHouses / src / domain / Booking.java
1 package domain;
2
3 import java.io.Serializable;
4 import java.util.Date;
5
6 public class Booking implements Serializable  {
7
8         /**
9          * 
10          */
11         private static final long serialVersionUID = 1L;
12         private int bookingNumber;
13         private Date bookingDate;
14         private Client client;
15         private Offer offer;
16         
17         
18         public Booking() {
19         }
20
21         public Booking(int bN , Offer offer,Client client) {
22                 
23                 this.bookingNumber = bN;
24                 this.offer = offer;
25                 this.client=client;
26                 //Booking date is assigned to actual date
27                 this.bookingDate= new java.util.Date(System.currentTimeMillis());
28         }
29         
30         public void imprimete(){
31                 System.out.println(bookingNumber);
32                 System.out.println(bookingDate);
33                 System.out.println(client.toString());
34                 System.out.println(offer);      
35         }
36
37         public int getBookNumber() {
38                 return this.bookingNumber;
39         }
40
41         public void setOffer(Offer offer) {
42                 this.offer = offer;
43         }
44
45         public Offer getOffer() {
46                 return this.offer;
47         }
48
49         public float getPrice() {
50                 return this.offer.getPrice();
51         }
52         
53         public void setBookDate(Date bookDate) {
54                 this.bookingDate = bookDate;
55         }
56
57         public Date getBookDate() {
58                 return this.bookingDate;
59         }
60         
61         public Client getClient() {
62                 return client;
63         }
64
65         public void setClient(Client client) {
66                 this.client = client;
67         }
68         
69 }