[Home] [Help]
PACKAGE BODY: APPS.PQH_CER_DEL
Source
1 Package Body pqh_cer_del as
2 /* $Header: pqcerrhi.pkb 115.6 2002/11/27 04:43:16 rpasapul ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqh_cer_del.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< delete_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml delete logic. The functions of
17 -- this procedure are as follows:
18 -- 1) To delete the specified row from the schema using the primary key in
19 -- the predicates.
20 -- 2) To trap any constraint violations that may have occurred.
21 -- 3) To raise any other errors.
22 --
23 -- Prerequisites:
24 -- This is an internal private procedure which must be called from the del
25 -- procedure.
26 --
27 -- In Parameters:
28 -- A Pl/Sql record structre.
29 --
30 -- Post Success:
31 -- The specified row will be delete from the schema.
32 --
33 -- Post Failure:
34 -- If a child integrity constraint violation is raised the
35 -- constraint_error procedure will be called.
36 --
37 -- Developer Implementation Notes:
38 -- None.
39 --
40 -- Access Status:
41 -- Internal Row Handler Use Only.
42 --
43 -- {End Of Comments}
44 -- ----------------------------------------------------------------------------
45 Procedure delete_dml(p_rec in pqh_cer_shd.g_rec_type) is
46 --
47 l_proc varchar2(72) := g_package||'delete_dml';
48 --
49 Begin
50 hr_utility.set_location('Entering:'||l_proc, 5);
51 --
52 -- Delete the pqh_copy_entity_results row.
53 --
54 delete from pqh_copy_entity_results
55 where copy_entity_result_id = p_rec.copy_entity_result_id;
56 --
57 hr_utility.set_location(' Leaving:'||l_proc, 10);
58 --
59 Exception
60 When hr_api.child_integrity_violated then
61 -- Child integrity has been violated
62 pqh_cer_shd.constraint_error
63 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
64 When Others Then
65 Raise;
66 End delete_dml;
67 --
68 -- ----------------------------------------------------------------------------
69 -- |------------------------------< pre_delete >------------------------------|
70 -- ----------------------------------------------------------------------------
71 -- {Start Of Comments}
72 --
73 -- Description:
74 -- This private procedure contains any processing which is required before
75 -- the delete dml.
76 --
77 -- Prerequisites:
78 -- This is an internal procedure which is called from the del procedure.
79 --
80 -- In Parameters:
81 -- A Pl/Sql record structre.
82 --
83 -- Post Success:
84 -- Processing continues.
85 --
86 -- Post Failure:
87 -- If an error has occurred, an error message and exception will be raised
88 -- but not handled.
89 --
90 -- Developer Implementation Notes:
91 -- Any pre-processing required before the delete dml is issued should be
92 -- coded within this procedure. It is important to note that any 3rd party
93 -- maintenance should be reviewed before placing in this procedure.
94 --
95 -- Access Status:
96 -- Internal Row Handler Use Only.
97 --
98 -- {End Of Comments}
99 -- ----------------------------------------------------------------------------
100 Procedure pre_delete(p_rec in pqh_cer_shd.g_rec_type) is
101 --
102 l_proc varchar2(72) := g_package||'pre_delete';
103 --
104 Begin
105 hr_utility.set_location('Entering:'||l_proc, 5);
106 --
107 hr_utility.set_location(' Leaving:'||l_proc, 10);
108 End pre_delete;
109 --
110 -- ----------------------------------------------------------------------------
111 -- |-----------------------------< post_delete >------------------------------|
112 -- ----------------------------------------------------------------------------
113 -- {Start Of Comments}
114 --
115 -- Description:
116 -- This private procedure contains any processing which is required after the
117 -- delete dml.
118 --
119 -- Prerequisites:
120 -- This is an internal procedure which is called from the del procedure.
121 --
122 -- In Parameters:
123 -- A Pl/Sql record structre.
124 --
125 -- Post Success:
126 -- Processing continues.
127 --
128 -- Post Failure:
129 -- If an error has occurred, an error message and exception will be raised
130 -- but not handled.
131 --
132 -- Developer Implementation Notes:
133 -- Any post-processing required after the delete dml is issued should be
134 -- coded within this procedure. It is important to note that any 3rd party
135 -- maintenance should be reviewed before placing in this procedure.
136 --
137 -- Access Status:
138 -- Internal table Handler Use Only.
139 --
140 -- {End Of Comments}
141 -- ----------------------------------------------------------------------------
142 Procedure post_delete(
143 p_effective_date in date,p_rec in pqh_cer_shd.g_rec_type) is
144 --
145 l_proc varchar2(72) := g_package||'post_delete';
146 --
147 Begin
148 hr_utility.set_location('Entering:'||l_proc, 5);
149 --
150 --
151 -- Start of API User Hook for post_delete.
152 --
153 begin
154 --
155 pqh_cer_rkd.after_delete
156 (
157 p_copy_entity_result_id =>p_rec.copy_entity_result_id
158 ,p_copy_entity_txn_id_o =>pqh_cer_shd.g_old_rec.copy_entity_txn_id
159 ,p_result_type_cd_o =>pqh_cer_shd.g_old_rec.result_type_cd
160 ,p_number_of_copies_o =>pqh_cer_shd.g_old_rec.number_of_copies
161 ,p_status_o =>pqh_cer_shd.g_old_rec.status
162 ,p_src_copy_entity_result_id_o =>pqh_cer_shd.g_old_rec.src_copy_entity_result_id
163 ,p_information_category_o =>pqh_cer_shd.g_old_rec.information_category
164 ,p_information1_o =>pqh_cer_shd.g_old_rec.information1
165 ,p_information2_o =>pqh_cer_shd.g_old_rec.information2
166 ,p_information3_o =>pqh_cer_shd.g_old_rec.information3
167 ,p_information4_o =>pqh_cer_shd.g_old_rec.information4
168 ,p_information5_o =>pqh_cer_shd.g_old_rec.information5
169 ,p_information6_o =>pqh_cer_shd.g_old_rec.information6
170 ,p_information7_o =>pqh_cer_shd.g_old_rec.information7
171 ,p_information8_o =>pqh_cer_shd.g_old_rec.information8
172 ,p_information9_o =>pqh_cer_shd.g_old_rec.information9
173 ,p_information10_o =>pqh_cer_shd.g_old_rec.information10
174 ,p_information11_o =>pqh_cer_shd.g_old_rec.information11
175 ,p_information12_o =>pqh_cer_shd.g_old_rec.information12
176 ,p_information13_o =>pqh_cer_shd.g_old_rec.information13
177 ,p_information14_o =>pqh_cer_shd.g_old_rec.information14
178 ,p_information15_o =>pqh_cer_shd.g_old_rec.information15
179 ,p_information16_o =>pqh_cer_shd.g_old_rec.information16
180 ,p_information17_o =>pqh_cer_shd.g_old_rec.information17
181 ,p_information18_o =>pqh_cer_shd.g_old_rec.information18
182 ,p_information19_o =>pqh_cer_shd.g_old_rec.information19
183 ,p_information20_o =>pqh_cer_shd.g_old_rec.information20
184 ,p_information21_o =>pqh_cer_shd.g_old_rec.information21
185 ,p_information22_o =>pqh_cer_shd.g_old_rec.information22
186 ,p_information23_o =>pqh_cer_shd.g_old_rec.information23
187 ,p_information24_o =>pqh_cer_shd.g_old_rec.information24
188 ,p_information25_o =>pqh_cer_shd.g_old_rec.information25
189 ,p_information26_o =>pqh_cer_shd.g_old_rec.information26
190 ,p_information27_o =>pqh_cer_shd.g_old_rec.information27
191 ,p_information28_o =>pqh_cer_shd.g_old_rec.information28
192 ,p_information29_o =>pqh_cer_shd.g_old_rec.information29
193 ,p_information30_o =>pqh_cer_shd.g_old_rec.information30
194 ,p_information31_o =>pqh_cer_shd.g_old_rec.information31
195 ,p_information32_o =>pqh_cer_shd.g_old_rec.information32
196 ,p_information33_o =>pqh_cer_shd.g_old_rec.information33
197 ,p_information34_o =>pqh_cer_shd.g_old_rec.information34
198 ,p_information35_o =>pqh_cer_shd.g_old_rec.information35
199 ,p_information36_o =>pqh_cer_shd.g_old_rec.information36
200 ,p_information37_o =>pqh_cer_shd.g_old_rec.information37
201 ,p_information38_o =>pqh_cer_shd.g_old_rec.information38
202 ,p_information39_o =>pqh_cer_shd.g_old_rec.information39
203 ,p_information40_o =>pqh_cer_shd.g_old_rec.information40
204 ,p_information41_o =>pqh_cer_shd.g_old_rec.information41
205 ,p_information42_o =>pqh_cer_shd.g_old_rec.information42
206 ,p_information43_o =>pqh_cer_shd.g_old_rec.information43
207 ,p_information44_o =>pqh_cer_shd.g_old_rec.information44
208 ,p_information45_o =>pqh_cer_shd.g_old_rec.information45
209 ,p_information46_o =>pqh_cer_shd.g_old_rec.information46
210 ,p_information47_o =>pqh_cer_shd.g_old_rec.information47
211 ,p_information48_o =>pqh_cer_shd.g_old_rec.information48
212 ,p_information49_o =>pqh_cer_shd.g_old_rec.information49
213 ,p_information50_o =>pqh_cer_shd.g_old_rec.information50
214 ,p_information51_o =>pqh_cer_shd.g_old_rec.information51
215 ,p_information52_o =>pqh_cer_shd.g_old_rec.information52
216 ,p_information53_o =>pqh_cer_shd.g_old_rec.information53
217 ,p_information54_o =>pqh_cer_shd.g_old_rec.information54
218 ,p_information55_o =>pqh_cer_shd.g_old_rec.information55
219 ,p_information56_o =>pqh_cer_shd.g_old_rec.information56
220 ,p_information57_o =>pqh_cer_shd.g_old_rec.information57
221 ,p_information58_o =>pqh_cer_shd.g_old_rec.information58
222 ,p_information59_o =>pqh_cer_shd.g_old_rec.information59
223 ,p_information60_o =>pqh_cer_shd.g_old_rec.information60
224 ,p_information61_o =>pqh_cer_shd.g_old_rec.information61
225 ,p_information62_o =>pqh_cer_shd.g_old_rec.information62
226 ,p_information63_o =>pqh_cer_shd.g_old_rec.information63
227 ,p_information64_o =>pqh_cer_shd.g_old_rec.information64
228 ,p_information65_o =>pqh_cer_shd.g_old_rec.information65
229 ,p_information66_o =>pqh_cer_shd.g_old_rec.information66
230 ,p_information67_o =>pqh_cer_shd.g_old_rec.information67
231 ,p_information68_o =>pqh_cer_shd.g_old_rec.information68
232 ,p_information69_o =>pqh_cer_shd.g_old_rec.information69
233 ,p_information70_o =>pqh_cer_shd.g_old_rec.information70
234 ,p_information71_o =>pqh_cer_shd.g_old_rec.information71
235 ,p_information72_o =>pqh_cer_shd.g_old_rec.information72
236 ,p_information73_o =>pqh_cer_shd.g_old_rec.information73
237 ,p_information74_o =>pqh_cer_shd.g_old_rec.information74
238 ,p_information75_o =>pqh_cer_shd.g_old_rec.information75
239 ,p_information76_o =>pqh_cer_shd.g_old_rec.information76
240 ,p_information77_o =>pqh_cer_shd.g_old_rec.information77
241 ,p_information78_o =>pqh_cer_shd.g_old_rec.information78
242 ,p_information79_o =>pqh_cer_shd.g_old_rec.information79
243 ,p_information80_o =>pqh_cer_shd.g_old_rec.information80
244 ,p_information81_o =>pqh_cer_shd.g_old_rec.information81
245 ,p_information82_o =>pqh_cer_shd.g_old_rec.information82
246 ,p_information83_o =>pqh_cer_shd.g_old_rec.information83
247 ,p_information84_o =>pqh_cer_shd.g_old_rec.information84
248 ,p_information85_o =>pqh_cer_shd.g_old_rec.information85
249 ,p_information86_o =>pqh_cer_shd.g_old_rec.information86
250 ,p_information87_o =>pqh_cer_shd.g_old_rec.information87
251 ,p_information88_o =>pqh_cer_shd.g_old_rec.information88
252 ,p_information89_o =>pqh_cer_shd.g_old_rec.information89
253 ,p_information90_o =>pqh_cer_shd.g_old_rec.information90
254 ,p_information91_o =>pqh_cer_shd.g_old_rec.information91
255 ,p_information92_o =>pqh_cer_shd.g_old_rec.information92
256 ,p_information93_o =>pqh_cer_shd.g_old_rec.information93
257 ,p_information94_o =>pqh_cer_shd.g_old_rec.information94
258 ,p_information95_o =>pqh_cer_shd.g_old_rec.information95
259 ,p_information96_o =>pqh_cer_shd.g_old_rec.information96
260 ,p_information97_o =>pqh_cer_shd.g_old_rec.information97
261 ,p_information98_o =>pqh_cer_shd.g_old_rec.information98
262 ,p_information99_o =>pqh_cer_shd.g_old_rec.information99
263 ,p_information100_o =>pqh_cer_shd.g_old_rec.information100
264 ,p_information101_o =>pqh_cer_shd.g_old_rec.information101
265 ,p_information102_o =>pqh_cer_shd.g_old_rec.information102
266 ,p_information103_o =>pqh_cer_shd.g_old_rec.information103
267 ,p_information104_o =>pqh_cer_shd.g_old_rec.information104
268 ,p_information105_o =>pqh_cer_shd.g_old_rec.information105
269 ,p_information106_o =>pqh_cer_shd.g_old_rec.information106
270 ,p_information107_o =>pqh_cer_shd.g_old_rec.information107
271 ,p_information108_o =>pqh_cer_shd.g_old_rec.information108
272 ,p_information109_o =>pqh_cer_shd.g_old_rec.information109
273 ,p_information110_o =>pqh_cer_shd.g_old_rec.information110
274 ,p_information111_o =>pqh_cer_shd.g_old_rec.information111
275 ,p_information112_o =>pqh_cer_shd.g_old_rec.information112
276 ,p_information113_o =>pqh_cer_shd.g_old_rec.information113
277 ,p_information114_o =>pqh_cer_shd.g_old_rec.information114
278 ,p_information115_o =>pqh_cer_shd.g_old_rec.information115
279 ,p_information116_o =>pqh_cer_shd.g_old_rec.information116
280 ,p_information117_o =>pqh_cer_shd.g_old_rec.information117
281 ,p_information118_o =>pqh_cer_shd.g_old_rec.information118
282 ,p_information119_o =>pqh_cer_shd.g_old_rec.information119
283 ,p_information120_o =>pqh_cer_shd.g_old_rec.information120
284 ,p_information121_o =>pqh_cer_shd.g_old_rec.information121
285 ,p_information122_o =>pqh_cer_shd.g_old_rec.information122
286 ,p_information123_o =>pqh_cer_shd.g_old_rec.information123
287 ,p_information124_o =>pqh_cer_shd.g_old_rec.information124
288 ,p_information125_o =>pqh_cer_shd.g_old_rec.information125
289 ,p_information126_o =>pqh_cer_shd.g_old_rec.information126
290 ,p_information127_o =>pqh_cer_shd.g_old_rec.information127
291 ,p_information128_o =>pqh_cer_shd.g_old_rec.information128
292 ,p_information129_o =>pqh_cer_shd.g_old_rec.information129
293 ,p_information130_o =>pqh_cer_shd.g_old_rec.information130
294 ,p_information131_o =>pqh_cer_shd.g_old_rec.information131
295 ,p_information132_o =>pqh_cer_shd.g_old_rec.information132
296 ,p_information133_o =>pqh_cer_shd.g_old_rec.information133
297 ,p_information134_o =>pqh_cer_shd.g_old_rec.information134
298 ,p_information135_o =>pqh_cer_shd.g_old_rec.information135
299 ,p_information136_o =>pqh_cer_shd.g_old_rec.information136
300 ,p_information137_o =>pqh_cer_shd.g_old_rec.information137
301 ,p_information138_o =>pqh_cer_shd.g_old_rec.information138
302 ,p_information139_o =>pqh_cer_shd.g_old_rec.information139
303 ,p_information140_o =>pqh_cer_shd.g_old_rec.information140
304 ,p_information141_o =>pqh_cer_shd.g_old_rec.information141
305 ,p_information142_o =>pqh_cer_shd.g_old_rec.information142
306 ,p_information143_o =>pqh_cer_shd.g_old_rec.information143
307 ,p_information144_o =>pqh_cer_shd.g_old_rec.information144
308 ,p_information145_o =>pqh_cer_shd.g_old_rec.information145
312 ,p_information149_o =>pqh_cer_shd.g_old_rec.information149
309 ,p_information146_o =>pqh_cer_shd.g_old_rec.information146
310 ,p_information147_o =>pqh_cer_shd.g_old_rec.information147
311 ,p_information148_o =>pqh_cer_shd.g_old_rec.information148
313 ,p_information150_o =>pqh_cer_shd.g_old_rec.information150
314 ,p_information151_o =>pqh_cer_shd.g_old_rec.information151
315 ,p_information152_o =>pqh_cer_shd.g_old_rec.information152
316 ,p_information153_o =>pqh_cer_shd.g_old_rec.information153
317 ,p_information154_o =>pqh_cer_shd.g_old_rec.information154
318 ,p_information155_o =>pqh_cer_shd.g_old_rec.information155
319 ,p_information156_o =>pqh_cer_shd.g_old_rec.information156
320 ,p_information157_o =>pqh_cer_shd.g_old_rec.information157
321 ,p_information158_o =>pqh_cer_shd.g_old_rec.information158
322 ,p_information159_o =>pqh_cer_shd.g_old_rec.information159
323 ,p_information160_o =>pqh_cer_shd.g_old_rec.information160
324 ,p_information161_o =>pqh_cer_shd.g_old_rec.information161
325 ,p_information162_o =>pqh_cer_shd.g_old_rec.information162
326 ,p_information163_o =>pqh_cer_shd.g_old_rec.information163
327 ,p_information164_o =>pqh_cer_shd.g_old_rec.information164
328 ,p_information165_o =>pqh_cer_shd.g_old_rec.information165
329 ,p_information166_o =>pqh_cer_shd.g_old_rec.information166
330 ,p_information167_o =>pqh_cer_shd.g_old_rec.information167
331 ,p_information168_o =>pqh_cer_shd.g_old_rec.information168
332 ,p_information169_o =>pqh_cer_shd.g_old_rec.information169
333 ,p_information170_o =>pqh_cer_shd.g_old_rec.information170
334 ,p_information171_o =>pqh_cer_shd.g_old_rec.information171
335 ,p_information172_o =>pqh_cer_shd.g_old_rec.information172
336 ,p_information173_o =>pqh_cer_shd.g_old_rec.information173
337 ,p_information174_o =>pqh_cer_shd.g_old_rec.information174
338 ,p_information175_o =>pqh_cer_shd.g_old_rec.information175
339 ,p_information176_o =>pqh_cer_shd.g_old_rec.information176
340 ,p_information177_o =>pqh_cer_shd.g_old_rec.information177
341 ,p_information178_o =>pqh_cer_shd.g_old_rec.information178
342 ,p_information179_o =>pqh_cer_shd.g_old_rec.information179
343 ,p_information180_o =>pqh_cer_shd.g_old_rec.information180
344 ,p_information181_o =>pqh_cer_shd.g_old_rec.information181
345 ,p_information182_o =>pqh_cer_shd.g_old_rec.information182
346 ,p_information183_o =>pqh_cer_shd.g_old_rec.information183
347 ,p_information184_o =>pqh_cer_shd.g_old_rec.information184
348 ,p_information185_o =>pqh_cer_shd.g_old_rec.information185
349 ,p_information186_o =>pqh_cer_shd.g_old_rec.information186
350 ,p_information187_o =>pqh_cer_shd.g_old_rec.information187
351 ,p_information188_o =>pqh_cer_shd.g_old_rec.information188
352 ,p_information189_o =>pqh_cer_shd.g_old_rec.information189
353 ,p_information190_o =>pqh_cer_shd.g_old_rec.information190
354 ,p_mirror_entity_result_id_o =>pqh_cer_shd.g_old_rec.mirror_entity_result_id
355 ,p_mirror_src_entity_result_ido =>pqh_cer_shd.g_old_rec.mirror_src_entity_result_id
356 ,p_parent_entity_result_id_o =>pqh_cer_shd.g_old_rec.parent_entity_result_id
357 ,p_table_route_id_o =>pqh_cer_shd.g_old_rec.table_route_id
358 ,p_long_attribute1_o =>pqh_cer_shd.g_old_rec.long_attribute1
359 ,p_object_version_number_o =>pqh_cer_shd.g_old_rec.object_version_number
360 );
361 --
362 exception
363 --
364 when hr_api.cannot_find_prog_unit then
365 --
366 hr_api.cannot_find_prog_unit_error
367 (p_module_name => 'pqh_copy_entity_results'
368 ,p_hook_type => 'AD');
369 --
370 end;
371 --
372 -- End of API User Hook for post_delete.
373 --
374 --
375 hr_utility.set_location(' Leaving:'||l_proc, 10);
376 End post_delete;
377 --
378 -- ----------------------------------------------------------------------------
379 -- |---------------------------------< del >----------------------------------|
380 -- ----------------------------------------------------------------------------
381 Procedure del
382 (
383 p_effective_date in date,
384 p_rec in pqh_cer_shd.g_rec_type
385 ) is
386 --
387 l_proc varchar2(72) := g_package||'del';
388 --
389 Begin
390 hr_utility.set_location('Entering:'||l_proc, 5);
391 --
392 -- We must lock the row which we need to delete.
393 --
394 pqh_cer_shd.lck
395 (
396 p_rec.copy_entity_result_id,
397 p_rec.object_version_number
398 );
399 --
400 -- Call the supporting delete validate operation
401 --
402 pqh_cer_bus.delete_validate(p_rec
403 ,p_effective_date);
404 --
405 -- Call the supporting pre-delete operation
406 --
407 pre_delete(p_rec);
408 --
409 -- Delete the row.
410 --
411 delete_dml(p_rec);
412 --
413 -- Call the supporting post-delete operation
414 --
415 post_delete(
419 -- ----------------------------------------------------------------------------
416 p_effective_date,p_rec);
417 End del;
418 --
420 -- |---------------------------------< del >----------------------------------|
421 -- ----------------------------------------------------------------------------
422 Procedure del
423 (
424 p_effective_date in date,
425 p_copy_entity_result_id in number,
426 p_object_version_number in number
427 ) is
428 --
429 l_rec pqh_cer_shd.g_rec_type;
430 l_proc varchar2(72) := g_package||'del';
431 --
432 Begin
433 hr_utility.set_location('Entering:'||l_proc, 5);
434 --
435 -- As the delete procedure accepts a plsql record structure we do need to
436 -- convert the arguments into the record structure.
437 -- We don't need to call the supplied conversion argument routine as we
438 -- only need a few attributes.
439 --
440 l_rec.copy_entity_result_id:= p_copy_entity_result_id;
441 l_rec.object_version_number := p_object_version_number;
442 --
443 -- Having converted the arguments into the pqh_cer_rec
444 -- plsql record structure we must call the corresponding entity
445 -- business process
446 --
447 del(
448 p_effective_date,l_rec);
449 --
450 hr_utility.set_location(' Leaving:'||l_proc, 10);
451 End del;
452 --
453 end pqh_cer_del;