001/** 002 * Copyright 2005-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 */ 016package org.kuali.rice.krms.impl.repository; 017 018import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator; 019 020import javax.persistence.CascadeType; 021import javax.persistence.Column; 022import javax.persistence.Entity; 023import javax.persistence.GeneratedValue; 024import javax.persistence.Id; 025import javax.persistence.JoinColumn; 026import javax.persistence.ManyToOne; 027import javax.persistence.Table; 028import java.io.Serializable; 029 030@Entity 031@Table(name = "KRMS_RULE_ATTR_T") 032public class RuleAttributeBo extends BaseAttributeBo implements Serializable { 033 034 private static final long serialVersionUID = 1l; 035 036 @PortableSequenceGenerator(name = "KRMS_RULE_ATTR_S") 037 @GeneratedValue(generator = "KRMS_RULE_ATTR_S") 038 @Id 039 @Column(name = "RULE_ATTR_ID") 040 private String id; 041 042 @Column(name = "RULE_ID") 043 private String ruleId; 044 045 @ManyToOne(cascade = CascadeType.REFRESH) 046 @JoinColumn(name = "ATTR_DEFN_ID", referencedColumnName = "ATTR_DEFN_ID") 047 private KrmsAttributeDefinitionBo attributeDefinition; 048 049 @Override 050 public KrmsAttributeDefinitionBo getAttributeDefinition() { 051 return attributeDefinition; 052 } 053 054 public void setAttributeDefinition(KrmsAttributeDefinitionBo attributeDefinition) { 055 this.attributeDefinition = attributeDefinition; 056 } 057 058 public String getRuleId() { 059 return ruleId; 060 } 061 062 public void setRuleId(String ruleId) { 063 this.ruleId = ruleId; 064 } 065 066 @Override 067 public String getId() { 068 return id; 069 } 070 071 public void setId(String id) { 072 this.id = id; 073 } 074}