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 OfferedGame extends BeanSupport<OfferedGame>
30 {
31 private User m_offerer;
32 private Date m_startTime;
33 private Integer m_duration;
34 private Location m_location;
35
36 /***
37 * Get the duration in seconds of the game.
38 *
39 * @return The duration in seconds of the game.
40 */
41 public Integer getDuration()
42 {
43 return m_duration;
44 }
45
46 /***
47 * Set the duration in seconds of the game.
48 *
49 * @param duration The duration in seconds of the game.
50 */
51 public void setDuration(Integer duration)
52 {
53 m_duration = duration;
54 }
55
56 @ManyToOne
57 public Location getLocation()
58 {
59 return m_location;
60 }
61
62 public void setLocation(Location location)
63 {
64 m_location = location;
65 }
66
67 @ManyToOne
68 public User getOfferer()
69 {
70 return m_offerer;
71 }
72
73 public void setOfferer(User offerer)
74 {
75 m_offerer = offerer;
76 }
77
78 @Temporal(value=TemporalType.TIMESTAMP)
79 public Date getStartTime()
80 {
81 return m_startTime;
82 }
83
84 public void setStartTime(Date startTime)
85 {
86 m_startTime = startTime;
87 }
88 }