1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.engine.node; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
|
20 | |
import javax.persistence.AttributeOverride; |
21 | |
import javax.persistence.AttributeOverrides; |
22 | |
import javax.persistence.Column; |
23 | |
import javax.persistence.Entity; |
24 | |
import javax.persistence.FetchType; |
25 | |
import javax.persistence.GeneratedValue; |
26 | |
import javax.persistence.GenerationType; |
27 | |
import javax.persistence.Id; |
28 | |
import javax.persistence.JoinColumn; |
29 | |
import javax.persistence.ManyToOne; |
30 | |
import javax.persistence.PrePersist; |
31 | |
import javax.persistence.SequenceGenerator; |
32 | |
import javax.persistence.Table; |
33 | |
|
34 | |
import org.apache.commons.lang.builder.ToStringBuilder; |
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
@Entity |
45 | |
@Table(name="KREW_RTE_NODE_CFG_PARM_T") |
46 | |
@AttributeOverrides({@AttributeOverride(name="key", column=@Column(name="KEY_CD")), @AttributeOverride(name="value", column=@Column(name="VAL"))}) |
47 | |
public class RouteNodeConfigParam extends KeyValuePair implements Serializable { |
48 | |
private static final long serialVersionUID = 5592421070149273014L; |
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
@Id |
54 | |
@Column(name="RTE_NODE_CFG_PARM_ID") |
55 | |
@GeneratedValue(strategy=GenerationType.AUTO, generator="KREW_RTE_NODE_CFG_PARM_SEQ_GEN") |
56 | |
@SequenceGenerator(name="KREW_RTE_NODE_CFG_PARM_SEQ_GEN", sequenceName="KREW_RTE_NODE_CFG_PARM_S") |
57 | |
private Long id; |
58 | |
|
59 | |
|
60 | |
|
61 | |
@ManyToOne(fetch=FetchType.EAGER) |
62 | |
@JoinColumn(name="RTE_NODE_ID") |
63 | |
private RouteNode routeNode; |
64 | |
|
65 | 0 | public RouteNodeConfigParam() {} |
66 | |
|
67 | |
public RouteNodeConfigParam(RouteNode routeNode, String key, String value) { |
68 | 0 | super(key, value); |
69 | 0 | this.routeNode = routeNode; |
70 | 0 | } |
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
public Long getId() { |
76 | 0 | return this.id; |
77 | |
} |
78 | |
|
79 | |
|
80 | |
|
81 | |
public void setId(Long id) { |
82 | 0 | this.id = id; |
83 | 0 | } |
84 | |
|
85 | |
|
86 | |
|
87 | |
public RouteNode getRouteNode() { |
88 | 0 | return this.routeNode; |
89 | |
} |
90 | |
|
91 | |
|
92 | |
|
93 | |
public void setRouteNode(RouteNode routeNode) { |
94 | 0 | this.routeNode = routeNode; |
95 | 0 | } |
96 | |
|
97 | |
public String toString() { |
98 | 0 | return new ToStringBuilder(this).append("id", id) |
99 | |
.append("routeNode", routeNode == null ? null : routeNode.getRouteNodeId()) |
100 | |
.append("key", key) |
101 | |
.append("value", value) |
102 | |
.toString(); |
103 | |
} |
104 | |
|
105 | |
} |