001/** 002 * Copyright 2005-2015 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 */ 016package org.kuali.rice.krms.impl.repository; 017 018import org.kuali.rice.core.api.mo.common.Versioned; 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; 029import javax.persistence.Version; 030import java.io.Serializable; 031 032/** 033 * Indicates an AgendaType that is valid for a Context 034 */ 035@Entity 036@Table(name = "KRMS_CNTXT_VLD_AGENDA_TYP_T") 037public class ContextValidAgendaBo implements Versioned, Serializable { 038 039 private static final long serialVersionUID = 1l; 040 041 @PortableSequenceGenerator(name = "KRMS_CNTXT_VLD_AGENDA_TYP_S") 042 @GeneratedValue(generator = "KRMS_CNTXT_VLD_AGENDA_TYP_S") 043 @Id 044 @Column(name = "CNTXT_VLD_AGENDA_ID") 045 private String id; 046 047 @Column(name = "CNTXT_ID") 048 private String contextId; 049 050 @Column(name = "AGENDA_TYP_ID") 051 private String agendaTypeId; 052 053 @Column(name = "VER_NBR") 054 @Version 055 private Long versionNumber; 056 057 @ManyToOne(targetEntity = KrmsTypeBo.class, cascade = { CascadeType.REFRESH }) 058 @JoinColumn(name = "AGENDA_TYP_ID", referencedColumnName = "TYP_ID", insertable = false, updatable = false) 059 private KrmsTypeBo agendaType; 060 061 public String getId() { 062 return id; 063 } 064 065 public void setId(String id) { 066 this.id = id; 067 } 068 069 public String getContextId() { 070 return contextId; 071 } 072 073 public void setContextId(String contextId) { 074 this.contextId = contextId; 075 } 076 077 public String getAgendaTypeId() { 078 return agendaTypeId; 079 } 080 081 public void setAgendaTypeId(String agendaTypeId) { 082 this.agendaTypeId = agendaTypeId; 083 } 084 085 public Long getVersionNumber() { 086 return versionNumber; 087 } 088 089 public void setVersionNumber(Long versionNumber) { 090 this.versionNumber = versionNumber; 091 } 092 093 public KrmsTypeBo getAgendaType() { 094 return agendaType; 095 } 096 097 public void setAgendaType(KrmsTypeBo agendaType) { 098 this.agendaType = agendaType; 099 } 100}