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.JoinColumn;
27  import javax.persistence.ManyToOne;
28  import javax.persistence.Table;
29  
30  @Entity
31  @Table(name="KRTST_CONF_SESS_PRES_T")
32  public class SessionPresenter {
33  
34      @Id
35      @Column(name = "ID")
36      @GeneratedValue(generator = "KRTST_CONF_SESS_PRES_S")
37      @PortableSequenceGenerator(name = "KRTST_CONF_SESS_PRES_S")
38      private String id;
39  
40      @Column(name = "SESS_ID", updatable = false, insertable = false)
41      private String sessionId;
42  
43      @Column(name = "PRES_ID")
44      private String presenterId;
45  
46      @Column(name = "PRIMARY_IND")
47      private Boolean primary = Boolean.FALSE;
48  
49      @ManyToOne(cascade = CascadeType.ALL)
50      @JoinColumn(name = "SESS_ID")
51      private ConferenceSession session;
52  
53      @ManyToOne
54      @JoinColumn(name = "PRES_ID", referencedColumnName = "ID", updatable = false, insertable = false)
55      private PresenterInfo presenter;
56  
57      public String getId() {
58          return id;
59      }
60  
61      public void setId(String id) {
62          this.id = id;
63      }
64  
65      public String getSessionId() {
66          return sessionId;
67      }
68  
69      public void setSessionId(String sessionId) {
70          this.sessionId = sessionId;
71      }
72  
73      public String getPresenterId() {
74          return presenterId;
75      }
76  
77      public void setPresenterId(String presenterId) {
78          this.presenterId = presenterId;
79      }
80  
81      public Boolean getPrimary() {
82          return primary;
83      }
84  
85      public void setPrimary(Boolean primary) {
86          this.primary = primary;
87      }
88  
89      public ConferenceSession getSession() {
90          return session;
91      }
92  
93      public void setSession(ConferenceSession session) {
94          this.session = session;
95      }
96  
97      public PresenterInfo getPresenter() {
98          return presenter;
99      }
100 
101     public void setPresenter(PresenterInfo presenter) {
102         this.presenter = presenter;
103     }
104 }