001/*
002 * Copyright 2006-2014 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.kuali.rice.krad.test.conference;
018
019import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
020
021import javax.persistence.CascadeType;
022import javax.persistence.Column;
023import javax.persistence.Entity;
024import javax.persistence.GeneratedValue;
025import javax.persistence.Id;
026import javax.persistence.JoinColumn;
027import javax.persistence.ManyToOne;
028import javax.persistence.OneToMany;
029import javax.persistence.Table;
030import javax.persistence.Temporal;
031import javax.persistence.TemporalType;
032import java.io.Serializable;
033import java.util.ArrayList;
034import java.util.Date;
035import java.util.List;
036
037@Entity
038@Table(name="KRTST_CONF_SESS_T")
039public class ConferenceSession implements Serializable {
040
041    private static final long serialVersionUID = -7022847412734257626L;
042
043    @Id
044    @Column(name = "ID")
045    @GeneratedValue(generator = "KRTST_CONF_SESS_S")
046    @PortableSequenceGenerator(name = "KRTST_CONF_SESS_S")
047    private String id;
048
049    @Column(name = "TITLE")
050    private String sessionTitle;
051
052    @Column(name = "SESS_DT")
053    @Temporal(TemporalType.DATE)
054    private Date date;
055
056    @Column(name = "START_TIME")
057    private String startTime;
058
059    @Column(name = "END_TIME")
060    private String endTime;
061
062    @Column(name = "SESS_TYPE_CODE")
063    private String sessionTypeCode;
064
065    @Column(name = "DESCRIPTION")
066    private String description;
067
068    /**
069     * A bi-directional ManyToOne (mapped with a OneToMany on the other side)
070     */
071    @ManyToOne(cascade = CascadeType.ALL)
072    @JoinColumn(name = "COORD_ID")
073    private SessionCoordinator coordinator;
074
075    /**
076     * A bi-directional ManyToOne with a foreign key field and non-updatable reference.
077     */
078    @Column(name = "ALT_COORD1_ID")
079    private Long altCoordinator1Id;
080    @ManyToOne(cascade = CascadeType.ALL)
081    @JoinColumn(name = "ALT_COORD1_ID", insertable = false, updatable = false)
082    private SessionCoordinator altCoordinator1;
083
084    /**
085     * A bi-directional ManyToOne with a foreign key field and non-updatable field.
086     */
087    @Column(name = "ALT_COORD2_ID", insertable = false, updatable = false)
088    private Long altCoordinator2Id;
089    @ManyToOne(cascade = CascadeType.ALL)
090    @JoinColumn(name = "ALT_COORD2_ID")
091    private SessionCoordinator altCoordinator2;
092
093
094    /**
095     * A ManyToOne with no foreign key field.
096     */
097    @ManyToOne
098    @JoinColumn(name = "ROOM_ID")
099    private Room room;
100
101    /**
102     * A ManyToOne with a foreign key field and non updatable reference
103     */
104    @Column(name = "ALT_ROOM1_ID")
105    private String altRoom1Id;
106    @ManyToOne
107    @JoinColumn(name = "ALT_ROOM1_ID", insertable = false, updatable = false)
108    private Room altRoom1;
109
110    /**
111     * A ManyToOne with a foreign key field and non updatable field
112     */
113    @Column(name = "ALT_ROOM2_ID", insertable = false, updatable = false)
114    private String altRoom2Id;
115    @ManyToOne
116    @JoinColumn(name = "ALT_ROOM2_ID")
117    private Room altRoom2;
118
119
120    @OneToMany(cascade = CascadeType.ALL, mappedBy = "session")
121    private List<SessionPresenter> presenters = new ArrayList<SessionPresenter>();
122
123    public String getId() {
124        return id;
125    }
126
127    public void setId(String id) {
128        this.id = id;
129    }
130
131    public String getSessionTitle() {
132        return sessionTitle;
133    }
134
135    public void setSessionTitle(String sessionTitle) {
136        this.sessionTitle = sessionTitle;
137    }
138
139    public Date getDate() {
140        return date;
141    }
142
143    public void setDate(Date date) {
144        this.date = date;
145    }
146
147    public String getStartTime() {
148        return startTime;
149    }
150
151    public void setStartTime(String startTime) {
152        this.startTime = startTime;
153    }
154
155    public String getEndTime() {
156        return endTime;
157    }
158
159    public void setEndTime(String endTime) {
160        this.endTime = endTime;
161    }
162
163    public String getSessionTypeCode() {
164        return sessionTypeCode;
165    }
166
167    public void setSessionTypeCode(String sessionTypeCode) {
168        this.sessionTypeCode = sessionTypeCode;
169    }
170
171    public String getDescription() {
172        return description;
173    }
174
175    public void setDescription(String description) {
176        this.description = description;
177    }
178
179    public SessionCoordinator getCoordinator() {
180        return coordinator;
181    }
182
183    public void setCoordinator(SessionCoordinator coordinator) {
184        this.coordinator = coordinator;
185    }
186
187    public Long getAltCoordinator1Id() {
188        return altCoordinator1Id;
189    }
190
191    public void setAltCoordinator1Id(Long altCoordinator1Id) {
192        this.altCoordinator1Id = altCoordinator1Id;
193    }
194
195    public SessionCoordinator getAltCoordinator1() {
196        return altCoordinator1;
197    }
198
199    public void setAltCoordinator1(SessionCoordinator altCoordinator1) {
200        this.altCoordinator1 = altCoordinator1;
201    }
202
203    public Long getAltCoordinator2Id() {
204        return altCoordinator2Id;
205    }
206
207    public void setAltCoordinator2Id(Long altCoordinator2Id) {
208        this.altCoordinator2Id = altCoordinator2Id;
209    }
210
211    public SessionCoordinator getAltCoordinator2() {
212        return altCoordinator2;
213    }
214
215    public void setAltCoordinator2(SessionCoordinator altCoordinator2) {
216        this.altCoordinator2 = altCoordinator2;
217    }
218
219    public Room getRoom() {
220        return room;
221    }
222
223    public void setRoom(Room room) {
224        this.room = room;
225    }
226
227    public String getAltRoom1Id() {
228        return altRoom1Id;
229    }
230
231    public void setAltRoom1Id(String altRoom1Id) {
232        this.altRoom1Id = altRoom1Id;
233    }
234
235    public Room getAltRoom1() {
236        return altRoom1;
237    }
238
239    public void setAltRoom1(Room altRoom1) {
240        this.altRoom1 = altRoom1;
241    }
242
243    public String getAltRoom2Id() {
244        return altRoom2Id;
245    }
246
247    public void setAltRoom2Id(String altRoom2Id) {
248        this.altRoom2Id = altRoom2Id;
249    }
250
251    public Room getAltRoom2() {
252        return altRoom2;
253    }
254
255    public void setAltRoom2(Room altRoom2) {
256        this.altRoom2 = altRoom2;
257    }
258
259    public List<SessionPresenter> getPresenters() {
260        return presenters;
261    }
262
263    public void setPresenters(List<SessionPresenter> presenters) {
264        this.presenters = presenters;
265    }
266
267}