1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krms.impl.repository;
17
18 import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
19
20 import javax.persistence.CascadeType;
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.FetchType;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.Id;
26 import javax.persistence.JoinColumn;
27 import javax.persistence.ManyToOne;
28 import javax.persistence.Table;
29 import java.io.Serializable;
30
31 @Entity
32 @Table(name = "KRMS_RULE_ATTR_T")
33 public class RuleAttributeBo extends BaseAttributeBo implements Serializable {
34
35 private static final long serialVersionUID = 1l;
36
37 @PortableSequenceGenerator(name = "KRMS_RULE_ATTR_S")
38 @GeneratedValue(generator = "KRMS_RULE_ATTR_S")
39 @Id
40 @Column(name = "RULE_ATTR_ID")
41 private String id;
42
43 @ManyToOne()
44 @JoinColumn(name = "RULE_ID")
45 private RuleBo rule;
46
47 @ManyToOne(cascade = CascadeType.REFRESH)
48 @JoinColumn(name = "ATTR_DEFN_ID", referencedColumnName = "ATTR_DEFN_ID")
49 private KrmsAttributeDefinitionBo attributeDefinition;
50
51 @Override
52 public KrmsAttributeDefinitionBo getAttributeDefinition() {
53 return attributeDefinition;
54 }
55
56 public void setAttributeDefinition(KrmsAttributeDefinitionBo attributeDefinition) {
57 this.attributeDefinition = attributeDefinition;
58 }
59
60 public RuleBo getRule() {
61 return rule;
62 }
63
64 public void setRule(RuleBo rule) {
65 this.rule = rule;
66 }
67
68 @Override
69 public String getId() {
70 return id;
71 }
72
73 public void setId(String id) {
74 this.id = id;
75 }
76 }