Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard
 
7bf57b2f0f2b3cf0ae9489a8204918762e64648e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
package domain;

import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import java.util.Vector;


@SuppressWarnings("serial")
public class Offer implements Serializable {
	

	private int offerNumber;
	private Date firstDay; // Dates are stored as java.util.Date objects instead of java.sql.Date objects
	private Date lastDay;  // because, they are not well stored in db4o as java.util.Date objects
	private float price;   // This is coherent because objects of java.sql.Date are objects of java.util.Date 
	private Vector<Booking> bookings;  // That is: java.sql.Date is a subclass (or extends) java.util.Date
	private RuralHouse ruralHouse;

	
	public Offer(int offerNumber,RuralHouse ruralHouse, Date firstDay, Date lastDay, float price){
		  this.firstDay=firstDay;
		  this.lastDay=lastDay;
		  this.price=price;
		  this.ruralHouse=ruralHouse;
		  this.offerNumber=offerNumber;
	}
	/**
	 * Get the house number of the offer
	 * 
	 * @return the house number
	 */
	public RuralHouse getRuralHouse() {
		return this.ruralHouse;
	}

	/**
	 * Set the house number to a offer
	 * 
	 * @param house number
	 */
	public void setRuralHouse(RuralHouse ruralHouse) {
		this.ruralHouse = ruralHouse;
	}


	/**
	 * Get the offer number
	 * 
	 * @return offer number
	 */
	public int getOfferNumber() {
		return this.offerNumber;
	}

	

	/**
	 * Get the first day of the offer
	 * 
	 * @return the first day
	 */
	public Date getFirstDay() {
		return this.firstDay;
	}

	/**
	 * Set the first day of the offer
	 * 
	 * @param firstDay
	 *            The first day
	 */
	public void setFirstDay(Date firstDay) {
		this.firstDay = firstDay;
	}

	/**
	 * Get the last day of the offer
	 * 
	 * @return the last day
	 */
	public Date getLastDay() {
		return this.lastDay;
	}

	/**
	 * Set the last day of the offer
	 * 
	 * @param lastDay
	 *            The last day
	 */
	public void setLastDay(Date lastDay) {
		this.lastDay = lastDay;
	}

	/**
	 * Get the price
	 * 
	 * @return price
	 */
	public float getPrice() {
		return this.price;
	}

	/**
	 * Set the price
	 * 
	 * @param price
	 */
	public void setPrice(float price) {
		this.price = price;
	}

	
	/**
	 * This method creates a book with a corresponding parameters
	 * 
	 * @param First day, last day, house number and telephone
	 * @return a book
	 */
	public Booking createBooking(int numBooking,String bookTelephoneNumber,String name , String mail) {
		Client client = new Client(name,mail,bookTelephoneNumber);
		Booking b = new Booking(numBooking,this,client);
		this.bookings.add(b);
		return b;
			
	}
	
	public String toString(){
		return firstDay.toString()+", "+lastDay.toString()+", "+price;
	}
	public Vector<Booking> getBookings() {
		return bookings;
	}
	public void setBookings(Vector<Booking> bookings) {
		this.bookings = bookings;
	}
}

Commits for RRRRHHHH_CoderuralHouses/src/domain/Offer.java

Diff revisions: vs.
Revision Author Commited Message
7bf57b ... Diff Diff camjan Sun 17 May, 2015 11:59:22 +0000

Possibility of registering new owners added

e2ae30 ... Diff Diff Eneko Pinzolas Murua Tue 14 Apr, 2015 15:07:35 +0000

imports leaned

64482a ... Diff Diff Eneko Pinzolas Murua Sat 04 Apr, 2015 12:23:48 +0000

DeleteOffers and Modify Offers completed, both logic and GUI

06a849 ... Diff Diff pinene picture pinene Sat 07 Mar, 2015 13:48:38 +0000

unification with the actual initial project. Some things are new now, but there has been a feature that has been deleted.\n The feature of opening and closing the database per each query/store has been deleted by now

e0d74d ... unknown Thu 26 Feb, 2015 19:24:02 +0000

Given code uploaded