4 //import java.util.Vector;
6 import businessLogic.OfferManager;
7 import com.db4o.ObjectContainer;
8 import dataAccess.DB4oManager;
10 @SuppressWarnings("serial")
11 public class Offer implements Serializable {
13 private int offerNumber;
14 private Date firstDay;
17 private Booking booking;
18 private RuralHouse ruralHouse;
20 public Offer(RuralHouse ruralHouse, Date firstDay, Date lastDay, float price) {
21 this.firstDay=firstDay;
24 this.ruralHouse=ruralHouse;
25 this.offerNumber=OfferManager.getNumber();
28 public RuralHouse getRuralHouse() {
29 return this.ruralHouse;
32 public void setRuralHouse(RuralHouse ruralHouse) {
33 this.ruralHouse = ruralHouse;
36 public int getOfferNumber() {
37 return this.offerNumber;
40 public Date getFirstDay() {
44 public void setFirstDay(Date firstDay) {
45 this.firstDay = firstDay;
48 public Date getLastDay() {
52 public void setLastDay(Date lastDay) {
53 this.lastDay = lastDay;
56 public float getPrice() {
60 public void setPrice(float price) {
64 public Booking getBooking() {
68 public void setBooking(Booking booking) {
69 this.booking = booking;
72 public Booking createBook(String bookTelephoneNumber) {
73 Booking b=new Booking(bookTelephoneNumber, this);