1
2
3
4
5 package org.directdemocracyportal.democracy.model.application;
6
7 import java.util.HashSet;
8 import java.util.Set;
9
10 import javax.persistence.Entity;
11 import javax.persistence.FetchType;
12 import javax.persistence.ManyToMany;
13
14 import org.directdemocracyportal.democracy.model.core.Environment;
15 import org.hibernate.annotations.Cache;
16 import org.hibernate.annotations.CacheConcurrencyStrategy;
17
18 /***
19 * The Class Application.
20 */
21 @Entity
22 @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
23 public class Application extends Environment
24 {
25
26 /*** The Constant serialVersionUID. */
27 private static final long serialVersionUID = -6744929275687711238L;
28
29 /*** The events. */
30 private Set<Event> events = new HashSet<Event>();
31
32 /***
33 * Gets the events.
34 *
35 * @return the events
36 */
37 @ManyToMany(fetch = FetchType.LAZY)
38 public Set<Event> getEvents() {
39 return events;
40 }
41
42 /***
43 * Sets the events.
44 *
45 * @param events the new events
46 */
47 public void setEvents(Set<Event> events) {
48 this.events = events;
49 }
50 }