View Javadoc

1   /**
2    * 
3    */
4   package de.tivsource.page.entity.reservation;
5   
6   import java.util.Date;
7   
8   import javax.persistence.Basic;
9   import javax.persistence.Column;
10  import javax.persistence.Entity;
11  import javax.persistence.EnumType;
12  import javax.persistence.Enumerated;
13  import javax.persistence.FetchType;
14  import javax.persistence.Id;
15  import javax.persistence.JoinColumn;
16  import javax.persistence.Lob;
17  import javax.persistence.ManyToOne;
18  import javax.persistence.Temporal;
19  
20  import org.hibernate.envers.Audited;
21  import org.hibernate.search.annotations.DocumentId;
22  
23  import de.tivsource.page.entity.event.Event;
24  import de.tivsource.page.enumeration.Origin;
25  
26  /**
27   * @author Marc Michele
28   *
29   */
30  @Audited
31  @Entity
32  public class Reservation {
33  
34      /**
35       * UUID des Objektes der Klasse Reservation, diese ID ist einmalig über alle
36       * Objekte hinweg und sollte der bevorzugte weg sein auf bestimmte Objekte
37       * zuzugreifen.
38       */
39      @Id
40      @DocumentId
41      @Column(name="uuid", unique=true, length=42)
42      private String uuid;
43  
44      /**
45       * Attribute dass das Geschlecht der Person enthält, true wenn weiblich und false wenn männlich.
46       */
47      @Basic
48      @org.hibernate.annotations.Type(type = "yes_no")
49      private Boolean gender;
50  
51      private String firstname;
52  
53      private String lastname;
54  
55      private String email;
56  
57      private String telephone;
58  
59      private Integer quantity;
60  
61      @Temporal(javax.persistence.TemporalType.TIMESTAMP)
62      @Column(name="reservation_time")
63      private Date time;
64  
65      @Lob
66      private String wishes;
67  
68      @ManyToOne(fetch = FetchType.EAGER)
69      @JoinColumn(name = "event_uuid")
70      private Event event;
71  
72      @Basic
73      @org.hibernate.annotations.Type(type = "yes_no")
74      private Boolean privacy;
75  
76      @Basic
77      @org.hibernate.annotations.Type(type = "yes_no")
78      private Boolean confirmed;
79  
80      private String confirmedAddress;
81  
82      @Temporal(javax.persistence.TemporalType.TIMESTAMP)
83      private Date confirmedDate;
84  
85      private String confirmedBy;
86  
87      @Temporal(javax.persistence.TemporalType.TIMESTAMP)
88      private Date created;
89  
90      private String createdAddress;
91  
92      @Temporal(javax.persistence.TemporalType.TIMESTAMP)
93      private Date modified;
94  
95      private String modifiedBy;
96  
97      private String modifiedAddress;
98  
99      @Enumerated(EnumType.STRING)
100     private Origin origin;
101     
102     public String getUuid() {
103         return uuid;
104     }
105 
106     public void setUuid(String uuid) {
107         this.uuid = uuid;
108     }
109 
110     public Boolean getGender() {
111         return gender;
112     }
113 
114     public void setGender(Boolean gender) {
115         this.gender = gender;
116     }
117 
118     public String getFirstname() {
119         return firstname;
120     }
121 
122     public void setFirstname(String firstname) {
123         this.firstname = firstname;
124     }
125 
126     public String getLastname() {
127         return lastname;
128     }
129 
130     public void setLastname(String lastname) {
131         this.lastname = lastname;
132     }
133 
134     public String getEmail() {
135         return email;
136     }
137 
138     public void setEmail(String email) {
139         this.email = email;
140     }
141 
142     public String getTelephone() {
143         return telephone;
144     }
145 
146     public void setTelephone(String telephone) {
147         this.telephone = telephone;
148     }
149 
150     public Integer getQuantity() {
151         return quantity;
152     }
153 
154     public void setQuantity(Integer quantity) {
155         this.quantity = quantity;
156     }
157 
158     public Date getTime() {
159         return time;
160     }
161 
162     public void setTime(Date time) {
163         this.time = time;
164     }
165 
166     public String getWishes() {
167         return wishes;
168     }
169 
170     public void setWishes(String wishes) {
171         this.wishes = wishes;
172     }
173 
174     public Event getEvent() {
175         return event;
176     }
177 
178     public void setEvent(Event event) {
179         this.event = event;
180     }
181 
182     public Boolean getPrivacy() {
183         return privacy;
184     }
185 
186     public void setPrivacy(Boolean privacy) {
187         this.privacy = privacy;
188     }
189 
190     public Boolean getConfirmed() {
191         return confirmed;
192     }
193 
194     public void setConfirmed(Boolean confirmed) {
195         this.confirmed = confirmed;
196     }
197 
198     public String getConfirmedAddress() {
199 		return confirmedAddress;
200 	}
201 
202 	public void setConfirmedAddress(String confirmedAddress) {
203 		this.confirmedAddress = confirmedAddress;
204 	}
205 
206 	public Date getConfirmedDate() {
207 		return confirmedDate;
208 	}
209 
210 	public void setConfirmedDate(Date confirmedDate) {
211 		this.confirmedDate = confirmedDate;
212 	}
213 
214 	public String getConfirmedBy() {
215 		return confirmedBy;
216 	}
217 
218 	public void setConfirmedBy(String confirmedBy) {
219 		this.confirmedBy = confirmedBy;
220 	}
221 
222 	public Date getCreated() {
223         return created;
224     }
225 
226     public void setCreated(Date created) {
227         this.created = created;
228     }
229 
230     public String getCreatedAddress() {
231         return createdAddress;
232     }
233 
234     public void setCreatedAddress(String createdAddress) {
235         this.createdAddress = createdAddress;
236     }
237 
238 	public Date getModified() {
239 		return modified;
240 	}
241 
242 	public void setModified(Date modified) {
243 		this.modified = modified;
244 	}
245 
246 	public String getModifiedBy() {
247 		return modifiedBy;
248 	}
249 
250 	public void setModifiedBy(String modifiedBy) {
251 		this.modifiedBy = modifiedBy;
252 	}
253 
254 	public String getModifiedAddress() {
255 		return modifiedAddress;
256 	}
257 
258 	public void setModifiedAddress(String modifiedAddress) {
259 		this.modifiedAddress = modifiedAddress;
260 	}
261 
262 	public Origin getOrigin() {
263 		return origin;
264 	}
265 
266 	public void setOrigin(Origin origin) {
267 		this.origin = origin;
268 	}
269 
270 }// Ende class