View Javadoc
1   /*
2    * Copyright 2006-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.kuali.rice.krad.test.conference;
18  
19  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
20  
21  import javax.persistence.CascadeType;
22  import javax.persistence.Column;
23  import javax.persistence.Entity;
24  import javax.persistence.GeneratedValue;
25  import javax.persistence.Id;
26  import javax.persistence.OneToMany;
27  import javax.persistence.Table;
28  import java.util.ArrayList;
29  import java.util.List;
30  
31  @Entity
32  @Table(name = "KRTST_CONF_COORD_T")
33  public class SessionCoordinator {
34  
35      @Id
36      @Column(name = "ID")
37      @GeneratedValue(generator = "KRTST_CONF_COORD_S")
38      @PortableSequenceGenerator(name = "KRTST_CONF_COORD_S")
39      private Long id;
40  
41      @Column(name = "NM")
42      private String name;
43  
44      @OneToMany(cascade = CascadeType.ALL, mappedBy = "coordinator")
45      private List<ConferenceSession> coordinatedSessions = new ArrayList<ConferenceSession>();
46  
47      @OneToMany(cascade = CascadeType.ALL, mappedBy = "altCoordinator1")
48      private List<ConferenceSession> altCoordinatedSessions1 = new ArrayList<ConferenceSession>();
49  
50      @OneToMany(cascade = CascadeType.ALL, mappedBy = "altCoordinator2")
51      private List<ConferenceSession> altCoordinatedSessions2 = new ArrayList<ConferenceSession>();
52  
53      public Long getId() {
54          return id;
55      }
56  
57      public void setId(Long id) {
58          this.id = id;
59      }
60  
61      public String getName() {
62          return name;
63      }
64  
65      public void setName(String name) {
66          this.name = name;
67      }
68  
69      public List<ConferenceSession> getCoordinatedSessions() {
70          return coordinatedSessions;
71      }
72  
73      public void setCoordinatedSessions(List<ConferenceSession> coordinatedSessions) {
74          this.coordinatedSessions = coordinatedSessions;
75      }
76  
77      public List<ConferenceSession> getAltCoordinatedSessions1() {
78          return altCoordinatedSessions1;
79      }
80  
81      public void setAltCoordinatedSessions1(List<ConferenceSession> altCoordinatedSessions1) {
82          this.altCoordinatedSessions1 = altCoordinatedSessions1;
83      }
84  
85      public List<ConferenceSession> getAltCoordinatedSessions2() {
86          return altCoordinatedSessions2;
87      }
88  
89      public void setAltCoordinatedSessions2(List<ConferenceSession> altCoordinatedSessions2) {
90          this.altCoordinatedSessions2 = altCoordinatedSessions2;
91      }
92  
93  }