Update Reservation and ReservationTest classes.
[staff/due1/sed-hs15-srs-purple.git] / src / main / java / ch / bfh / ti / srs / dataschema / Reservation.java
CommitLineData
9a78ca13
MT
1/*\r
2 * Copyright (c) 2015 Berner Fachhochschule, Switzerland.\r
3 *\r
4 * Project Smart Reservation System.\r
5 *\r
6 * Distributable under GPL license. See terms of license at gnu.org.\r
7 */\r
8package ch.bfh.ti.srs.dataschema;\r
9\r
81c3aac6
MT
10import java.util.UUID;\r
11\r
9a78ca13
MT
12import ch.bfh.ti.daterange.DateRange;\r
13\r
14public class Reservation {\r
15\r
81c3aac6
MT
16 private UUID id;\r
17 private UUID groupId;\r
9a78ca13
MT
18 private User user;\r
19 private Resource resource;\r
20 private DateRange dateRange;\r
81c3aac6
MT
21 private String remark;\r
22\r
23 public Reservation(User user, Resource resource, DateRange DateRange, String remark) {\r
24 if (user == null)\r
25 throw new IllegalArgumentException("User must not be null");\r
26 if (resource == null)\r
27 throw new IllegalArgumentException("Resource must not be null");\r
28 if (dateRange == null)\r
29 throw new IllegalArgumentException("DateRange must not be null");\r
9a78ca13 30\r
9a78ca13
MT
31 this.user = user;\r
32 this.resource = resource;\r
33 this.dateRange = DateRange;\r
81c3aac6 34 this.remark = remark;\r
9a78ca13
MT
35 }\r
36\r
37 public User getUser() {\r
38 return user;\r
39 }\r
40\r
41 public Resource getResource() {\r
42 return resource;\r
43 }\r
44\r
45 public DateRange getDateRange() {\r
46 return dateRange;\r
47 }\r
48\r
81c3aac6
MT
49 public String getRemark() {\r
50 return remark;\r
9a78ca13
MT
51 }\r
52\r
53 public void setUser(User user) {\r
54 this.user = user;\r
55 }\r
81c3aac6 56 \r
9a78ca13
MT
57 public void setResource(Resource resource) {\r
58 this.resource = resource;\r
59 }\r
60\r
61 public void setDateRange(DateRange dateRange) {\r
62 this.dateRange = dateRange;\r
63 }\r
81c3aac6
MT
64\r
65 public void setRemark(String remark) {\r
66 this.remark = remark;\r
67 }\r
68 \r
69 private UUID createUUID() {\r
70 return null;\r
71 }\r
9a78ca13 72}\r