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.Table;
029
030@Entity
031@Table(name="KRTST_CONF_SESS_PRES_T")
032public class SessionPresenter {
033
034    @Id
035    @Column(name = "ID")
036    @GeneratedValue(generator = "KRTST_CONF_SESS_PRES_S")
037    @PortableSequenceGenerator(name = "KRTST_CONF_SESS_PRES_S")
038    private String id;
039
040    @Column(name = "SESS_ID", updatable = false, insertable = false)
041    private String sessionId;
042
043    @Column(name = "PRES_ID")
044    private String presenterId;
045
046    @Column(name = "PRIMARY_IND")
047    private Boolean primary = Boolean.FALSE;
048
049    @ManyToOne(cascade = CascadeType.ALL)
050    @JoinColumn(name = "SESS_ID")
051    private ConferenceSession session;
052
053    @ManyToOne
054    @JoinColumn(name = "PRES_ID", referencedColumnName = "ID", updatable = false, insertable = false)
055    private PresenterInfo presenter;
056
057    public String getId() {
058        return id;
059    }
060
061    public void setId(String id) {
062        this.id = id;
063    }
064
065    public String getSessionId() {
066        return sessionId;
067    }
068
069    public void setSessionId(String sessionId) {
070        this.sessionId = sessionId;
071    }
072
073    public String getPresenterId() {
074        return presenterId;
075    }
076
077    public void setPresenterId(String presenterId) {
078        this.presenterId = presenterId;
079    }
080
081    public Boolean getPrimary() {
082        return primary;
083    }
084
085    public void setPrimary(Boolean primary) {
086        this.primary = primary;
087    }
088
089    public ConferenceSession getSession() {
090        return session;
091    }
092
093    public void setSession(ConferenceSession session) {
094        this.session = session;
095    }
096
097    public PresenterInfo getPresenter() {
098        return presenter;
099    }
100
101    public void setPresenter(PresenterInfo presenter) {
102        this.presenter = presenter;
103    }
104}