1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.promotego.beans;
20
21 import java.util.Date;
22
23 import javax.persistence.Entity;
24 import javax.persistence.ManyToOne;
25 import javax.persistence.Temporal;
26 import javax.persistence.TemporalType;
27
28 @Entity
29 public class ScheduledGame extends BeanSupport<ScheduledGame>
30 {
31 private User m_offerer;
32 private User m_accepter;
33 private Date m_startTime;
34 private int m_duration;
35 private Location m_location;
36 private Date m_lastReminder;
37
38 public ScheduledGame() { }
39
40 public ScheduledGame(OfferedGame offeredGame)
41 {
42 setOfferer(offeredGame.getOfferer());
43 setStartTime(offeredGame.getStartTime());
44 setDuration(offeredGame.getDuration());
45 setLocation(offeredGame.getLocation());
46 }
47
48 @ManyToOne
49 public User getAccepter()
50 {
51 return m_accepter;
52 }
53
54 public void setAccepter(User accepter)
55 {
56 m_accepter = accepter;
57 }
58
59 public int getDuration()
60 {
61 return m_duration;
62 }
63
64 public void setDuration(int duration)
65 {
66 m_duration = duration;
67 }
68
69 @ManyToOne
70 public Location getLocation()
71 {
72 return m_location;
73 }
74
75 public void setLocation(Location location)
76 {
77 m_location = location;
78 }
79
80 @ManyToOne
81 public User getOfferer()
82 {
83 return m_offerer;
84 }
85
86 public void setOfferer(User offerer)
87 {
88 m_offerer = offerer;
89 }
90
91 @Temporal(value=TemporalType.TIMESTAMP)
92 public Date getStartTime()
93 {
94 return m_startTime;
95 }
96
97 public void setStartTime(Date startTime)
98 {
99 m_startTime = startTime;
100 }
101
102 @Temporal(value=TemporalType.TIMESTAMP)
103 public Date getLastReminder()
104 {
105 return m_lastReminder;
106 }
107
108 public void setLastReminder(Date lastReminder)
109 {
110 m_lastReminder = lastReminder;
111 }
112 }