1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.ksb.messaging.bam; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.sql.Timestamp; |
20 | |
import java.util.ArrayList; |
21 | |
import java.util.List; |
22 | |
|
23 | |
import javax.persistence.Basic; |
24 | |
import javax.persistence.CascadeType; |
25 | |
import javax.persistence.Column; |
26 | |
import javax.persistence.Entity; |
27 | |
import javax.persistence.FetchType; |
28 | |
import javax.persistence.GeneratedValue; |
29 | |
import javax.persistence.Id; |
30 | |
import javax.persistence.Lob; |
31 | |
import javax.persistence.OneToMany; |
32 | |
import javax.persistence.Table; |
33 | |
import javax.persistence.Transient; |
34 | |
|
35 | |
import org.hibernate.annotations.GenericGenerator; |
36 | |
import org.hibernate.annotations.Parameter; |
37 | |
import org.kuali.rice.core.framework.persistence.jpa.OrmUtils; |
38 | |
import org.kuali.rice.ksb.api.messaging.AsynchronousCallback; |
39 | |
import org.kuali.rice.ksb.service.KSBServiceLocator; |
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
@Entity |
48 | |
@Table(name="KRSB_BAM_T") |
49 | |
|
50 | 0 | public class BAMTargetEntry implements Serializable { |
51 | |
|
52 | |
private static final long serialVersionUID = -8376674801367598316L; |
53 | |
|
54 | |
@Id |
55 | |
@GeneratedValue(generator="KRSB_BAM_S") |
56 | |
@GenericGenerator(name="KRSB_BAM_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={ |
57 | |
@Parameter(name="sequence_name",value="KRSB_BAM_S"), |
58 | |
@Parameter(name="value_column",value="id") |
59 | |
}) |
60 | |
@Column(name="BAM_ID") |
61 | |
private Long bamId; |
62 | |
@Column(name="SVC_NM") |
63 | |
private String serviceName; |
64 | |
@Column(name="MTHD_NM") |
65 | |
private String methodName; |
66 | |
@Column(name="THRD_NM") |
67 | |
private String threadName; |
68 | |
@Column(name="CALL_DT") |
69 | |
private Timestamp callDate; |
70 | |
@Column(name="SVC_URL") |
71 | |
private String serviceURL; |
72 | |
@Column(name="TGT_TO_STR") |
73 | |
private String targetToString; |
74 | |
@Column(name="EXCPN_TO_STR") |
75 | |
private String exceptionToString; |
76 | |
@Lob |
77 | |
@Basic(fetch=FetchType.LAZY) |
78 | |
@Column(name="EXCPN_MSG", length=4000) |
79 | |
private String exceptionMessage; |
80 | |
@Column(name="SRVR_IND") |
81 | |
private Boolean serverInvocation; |
82 | 0 | @OneToMany(cascade=CascadeType.ALL, mappedBy="bamParamId") |
83 | |
private List<BAMParam> bamParams = new ArrayList<BAMParam>(); |
84 | |
|
85 | |
|
86 | |
@Transient |
87 | |
private AsynchronousCallback callback; |
88 | |
|
89 | |
|
90 | |
public void beforeInsert(){ |
91 | 0 | OrmUtils.populateAutoIncValue(this, KSBServiceLocator.getRegistryEntityManagerFactory().createEntityManager()); |
92 | 0 | } |
93 | |
|
94 | |
public void addBamParam(BAMParam bamParam) { |
95 | 0 | this.bamParams.add(bamParam); |
96 | 0 | } |
97 | |
public String getExceptionToString() { |
98 | 0 | return this.exceptionToString; |
99 | |
} |
100 | |
public void setExceptionToString(String exceptionToString) { |
101 | 0 | this.exceptionToString = exceptionToString; |
102 | 0 | } |
103 | |
public String getServiceName() { |
104 | 0 | return this.serviceName; |
105 | |
} |
106 | |
public void setServiceName(String serviceName) { |
107 | 0 | this.serviceName = serviceName; |
108 | 0 | } |
109 | |
public String getServiceURL() { |
110 | 0 | return this.serviceURL; |
111 | |
} |
112 | |
public void setServiceURL(String serviceURL) { |
113 | 0 | this.serviceURL = serviceURL; |
114 | 0 | } |
115 | |
public String getTargetToString() { |
116 | 0 | return this.targetToString; |
117 | |
} |
118 | |
public void setTargetToString(String targetToString) { |
119 | 0 | this.targetToString = targetToString; |
120 | 0 | } |
121 | |
public Long getBamId() { |
122 | 0 | return this.bamId; |
123 | |
} |
124 | |
public void setBamId(Long bamId) { |
125 | 0 | this.bamId = bamId; |
126 | 0 | } |
127 | |
public String getExceptionMessage() { |
128 | 0 | return this.exceptionMessage; |
129 | |
} |
130 | |
public void setExceptionMessage(String exceptionMessage) { |
131 | 0 | this.exceptionMessage = exceptionMessage; |
132 | 0 | } |
133 | |
public Boolean getServerInvocation() { |
134 | 0 | return this.serverInvocation; |
135 | |
} |
136 | |
public void setServerInvocation(Boolean clientInvocation) { |
137 | 0 | this.serverInvocation = clientInvocation; |
138 | 0 | } |
139 | |
public Timestamp getCallDate() { |
140 | 0 | return this.callDate; |
141 | |
} |
142 | |
public void setCallDate(Timestamp callDate) { |
143 | 0 | this.callDate = callDate; |
144 | 0 | } |
145 | |
public String getMethodName() { |
146 | 0 | return this.methodName; |
147 | |
} |
148 | |
public void setMethodName(String methodName) { |
149 | 0 | this.methodName = methodName; |
150 | 0 | } |
151 | |
public String getThreadName() { |
152 | 0 | return this.threadName; |
153 | |
} |
154 | |
public void setThreadName(String threadName) { |
155 | 0 | this.threadName = threadName; |
156 | 0 | } |
157 | |
public List<BAMParam> getBamParams() { |
158 | 0 | return this.bamParams; |
159 | |
} |
160 | |
public void setBamParams(List<BAMParam> bamParams) { |
161 | 0 | this.bamParams = bamParams; |
162 | 0 | } |
163 | |
public AsynchronousCallback getCallback() { |
164 | 0 | return this.callback; |
165 | |
} |
166 | |
public void setCallback(AsynchronousCallback callback) { |
167 | 0 | this.callback = callback; |
168 | 0 | } |
169 | |
} |
170 | |
|