1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.kew.rule.bo; |
18 | |
|
19 | |
import org.hibernate.annotations.Fetch; |
20 | |
import org.hibernate.annotations.FetchMode; |
21 | |
import org.hibernate.annotations.GenericGenerator; |
22 | |
import org.hibernate.annotations.Parameter; |
23 | |
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; |
24 | |
|
25 | |
import javax.persistence.*; |
26 | |
import java.util.ArrayList; |
27 | |
import java.util.List; |
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
@Entity |
37 | |
@Table(name="KREW_RULE_ATTR_T") |
38 | |
|
39 | |
@NamedQueries({ |
40 | |
@NamedQuery(name="RuleAttribute.FindById", query="select ra from RuleAttribute ra where ra.ruleAttributeId = :ruleAttributeId"), |
41 | |
@NamedQuery(name="RuleAttribute.FindByName", query="select ra from RuleAttribute ra where ra.name = :name"), |
42 | |
@NamedQuery(name="RuleAttribute.FindByClassName", query="select ra from RuleAttribute ra where ra.className = :className"), |
43 | |
@NamedQuery(name="RuleAttribute.GetAllRuleAttributes", query="select ra from RuleAttribute ra") |
44 | |
}) |
45 | |
public class RuleAttribute extends PersistableBusinessObjectBase { |
46 | |
|
47 | |
private static final long serialVersionUID = 1027673603158346349L; |
48 | |
@Id |
49 | |
@GeneratedValue(generator="KREW_RTE_TMPL_S") |
50 | |
@GenericGenerator(name="KREW_RTE_TMPL_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={ |
51 | |
@Parameter(name="sequence_name",value="KREW_RTE_TMPL_S"), |
52 | |
@Parameter(name="value_column",value="id") |
53 | |
}) |
54 | |
@Column(name="RULE_ATTR_ID") |
55 | |
private Long ruleAttributeId; |
56 | |
@Column(name="NM") |
57 | |
private String name; |
58 | |
@Column(name="LBL") |
59 | |
private String label; |
60 | |
@Column(name="RULE_ATTR_TYP_CD") |
61 | |
private String type; |
62 | |
@Column(name="CLS_NM") |
63 | |
private String className; |
64 | |
@Column(name="DESC_TXT") |
65 | |
private String description; |
66 | |
@Lob |
67 | |
@Basic(fetch=FetchType.LAZY) |
68 | |
@Column(name="XML") |
69 | |
private String xmlConfigData; |
70 | |
|
71 | |
@Column(name="SVC_NMSPC") |
72 | |
private String serviceNamespace; |
73 | |
|
74 | |
@OneToMany(fetch=FetchType.EAGER,cascade={CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE}, |
75 | |
targetEntity=org.kuali.rice.kew.rule.bo.RuleTemplateAttribute.class, mappedBy="ruleAttribute") |
76 | |
@Fetch(value=FetchMode.SELECT) |
77 | |
private List ruleTemplateAttributes; |
78 | |
@Transient |
79 | |
private List validValues; |
80 | |
|
81 | |
|
82 | |
@Transient |
83 | |
private String returnUrl; |
84 | |
|
85 | 0 | public RuleAttribute() { |
86 | 0 | ruleTemplateAttributes = new ArrayList(); |
87 | 0 | validValues = new ArrayList(); |
88 | 0 | } |
89 | |
|
90 | |
public List getValidValues() { |
91 | 0 | return validValues; |
92 | |
} |
93 | |
public void setValidValues(List ruleAttributeValidValues) { |
94 | 0 | this.validValues = ruleAttributeValidValues; |
95 | 0 | } |
96 | |
public List getRuleTemplateAttributes() { |
97 | 0 | return ruleTemplateAttributes; |
98 | |
} |
99 | |
public void setRuleTemplateAttributes(List ruleTemplateAttributes) { |
100 | 0 | this.ruleTemplateAttributes = ruleTemplateAttributes; |
101 | 0 | } |
102 | |
public String getDescription() { |
103 | 0 | return description; |
104 | |
} |
105 | |
public void setDescription(String description) { |
106 | 0 | this.description = description; |
107 | 0 | } |
108 | |
public String getLabel() { |
109 | 0 | return label; |
110 | |
} |
111 | |
public void setLabel(String label) { |
112 | 0 | this.label = label; |
113 | 0 | } |
114 | |
|
115 | |
public String getName() { |
116 | 0 | return name; |
117 | |
} |
118 | |
public void setName(String name) { |
119 | 0 | this.name = name; |
120 | 0 | } |
121 | |
public Long getRuleAttributeId() { |
122 | 0 | return ruleAttributeId; |
123 | |
} |
124 | |
public void setRuleAttributeId(Long ruleAttributeId) { |
125 | 0 | this.ruleAttributeId = ruleAttributeId; |
126 | 0 | } |
127 | |
public String getType() { |
128 | 0 | return type; |
129 | |
} |
130 | |
public void setType(String type) { |
131 | 0 | this.type = type; |
132 | 0 | } |
133 | |
|
134 | |
|
135 | |
|
136 | |
|
137 | |
public String getClassName() { |
138 | 0 | return className; |
139 | |
} |
140 | |
|
141 | |
|
142 | |
|
143 | |
public void setClassName(String className) { |
144 | 0 | this.className = className; |
145 | 0 | } |
146 | |
|
147 | |
public String getRuleAttributeActionsUrl() { |
148 | 0 | return "<a href=\"RuleAttributeReport.do?ruleAttributeId="+ruleAttributeId+"\" >report</a>"; |
149 | |
} |
150 | |
|
151 | |
public String getReturnUrl() { |
152 | 0 | return returnUrl; |
153 | |
} |
154 | |
public void setReturnUrl(String returnUrl) { |
155 | 0 | this.returnUrl = returnUrl; |
156 | 0 | } |
157 | |
|
158 | |
public String getXmlConfigData() { |
159 | 0 | return xmlConfigData; |
160 | |
} |
161 | |
|
162 | |
public void setXmlConfigData(String xmlConfigData) { |
163 | 0 | this.xmlConfigData = xmlConfigData; |
164 | 0 | } |
165 | |
|
166 | |
public String getServiceNamespace() { |
167 | 0 | return serviceNamespace; |
168 | |
} |
169 | |
|
170 | |
public void setServiceNamespace(String ServiceNamespace) { |
171 | 0 | this.serviceNamespace = ServiceNamespace; |
172 | 0 | } |
173 | |
} |