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@Entity 033@Table(name = "KRMS_CNTXT_VLD_RULE_TYP_T") 034public class ContextValidRuleBo implements Versioned, Serializable { 035 036 private static final long serialVersionUID = 1l; 037 038 @PortableSequenceGenerator(name = "KRMS_CNTXT_VLD_RULE_TYP_S") 039 @GeneratedValue(generator = "KRMS_CNTXT_VLD_RULE_TYP_S") 040 @Id 041 @Column(name = "CNTXT_VLD_RULE_ID") 042 private String id; 043 044 @Column(name = "CNTXT_ID") 045 private String contextId; 046 047 @Column(name = "RULE_TYP_ID") 048 private String ruleTypeId; 049 050 @Column(name = "VER_NBR") 051 @Version 052 private Long versionNumber; 053 054 @ManyToOne(targetEntity = KrmsTypeBo.class, cascade = { CascadeType.REFRESH }) 055 @JoinColumn(name = "RULE_TYP_ID", referencedColumnName = "TYP_ID", insertable = false, updatable = false) 056 private KrmsTypeBo ruleType; 057 058 public String getId() { 059 return id; 060 } 061 062 public void setId(String id) { 063 this.id = id; 064 } 065 066 public String getContextId() { 067 return contextId; 068 } 069 070 public void setContextId(String contextId) { 071 this.contextId = contextId; 072 } 073 074 public String getRuleTypeId() { 075 return ruleTypeId; 076 } 077 078 public void setRuleTypeId(String ruleTypeId) { 079 this.ruleTypeId = ruleTypeId; 080 } 081 082 public Long getVersionNumber() { 083 return versionNumber; 084 } 085 086 public void setVersionNumber(Long versionNumber) { 087 this.versionNumber = versionNumber; 088 } 089 090 public KrmsTypeBo getRuleType() { 091 return ruleType; 092 } 093 094 public void setRuleType(KrmsTypeBo ruleType) { 095 this.ruleType = ruleType; 096 } 097}