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.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.FetchType;
23 import javax.persistence.GeneratedValue;
24 import javax.persistence.Id;
25 import javax.persistence.JoinColumn;
26 import javax.persistence.ManyToOne;
27 import javax.persistence.Table;
28 import java.io.Serializable;
29
30 @Entity
31 @Table(name = "KRMS_ACTN_ATTR_T")
32 public class ActionAttributeBo extends BaseAttributeBo implements Serializable {
33
34 private static final long serialVersionUID = 1l;
35
36 @PortableSequenceGenerator(name = "KRMS_ACTN_ATTR_S")
37 @GeneratedValue(generator = "KRMS_ACTN_ATTR_S")
38 @Id
39 @Column(name = "ACTN_ATTR_DATA_ID")
40 private String id;
41
42 @ManyToOne()
43 @JoinColumn(name = "ACTN_ID")
44 private ActionBo action;
45
46 @ManyToOne()
47 @JoinColumn(name = "ATTR_DEFN_ID", referencedColumnName = "ATTR_DEFN_ID")
48 private KrmsAttributeDefinitionBo attributeDefinition;
49
50 @Override
51 public KrmsAttributeDefinitionBo getAttributeDefinition() {
52 return attributeDefinition;
53 }
54
55 public void setAttributeDefinition(KrmsAttributeDefinitionBo attributeDefinition) {
56 this.attributeDefinition = attributeDefinition;
57 }
58
59 public String getActionId() {
60 if (action != null) {
61 return action.getId();
62 }
63
64 return null;
65 }
66
67 public ActionBo getAction() {
68 return action;
69 }
70
71 public void setAction(ActionBo action) {
72 this.action = action;
73 }
74
75 @Override
76 public String getId() {
77 return id;
78 }
79
80 public void setId(String id) {
81 this.id = id;
82 }
83 }