[Home] [Help]
PACKAGE BODY: APPS.PER_SSL_DEL
Source
1 Package Body per_ssl_del as
2 /* $Header: pesslrhi.pkb 120.0.12010000.2 2008/09/09 11:18:51 pchowdav ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_ssl_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 set and unset the g_api_dml status as required (as we are about to
19 -- perform dml).
20 -- 2) To delete the specIfied row from the schema using the primary key in
21 -- the predicates.
22 -- 3) To trap any constraint violations that may have occurred.
23 -- 4) To raise any other errors.
24 --
25 -- Prerequisites:
26 -- This is an internal private Procedure which must be called from the del
27 -- Procedure.
28 --
29 -- In Parameters:
30 -- A Pl/Sql record structre.
31 --
32 -- Post Success:
33 -- The specIfied row will be delete from the schema.
34 --
35 -- Post Failure:
36 -- On the delete dml failure it is important to note that we always reset the
37 -- g_api_dml status to false.
38 -- If a child integrity constraint violation is raised the
39 -- constraint_error Procedure will be called.
40 -- If any other error is reported, the error will be raised after the
41 -- g_api_dml status is reset.
42 --
43 -- Developer Implementation Notes:
44 -- None.
45 --
46 -- Access Status:
47 -- Internal Row Handler Use Only.
48 --
49 -- {End Of Comments}
50 -- ----------------------------------------------------------------------------
51 Procedure delete_dml(p_rec in per_ssl_shd.g_rec_type) is
52 --
53 l_proc varchar2(72) := g_package||'delete_dml';
54 --
55 Begin
56 hr_utility.set_location('Entering:'||l_proc, 5);
57 --
58 -- Delete the per_salary_survey_lines row.
59 --
60 delete from per_salary_survey_lines
61 where salary_survey_line_id = p_rec.salary_survey_line_id;
62 --
63 hr_utility.set_location(' Leaving:'||l_proc, 10);
64 --
65 Exception
66 When hr_api.child_integrity_violated Then
67 -- Child integrity has been violated
68 per_ssl_shd.constraint_error
69 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
70 When Others Then
71 Raise;
72 End delete_dml;
73 --
74 -- ----------------------------------------------------------------------------
75 -- |------------------------------< pre_delete >------------------------------|
76 -- ----------------------------------------------------------------------------
77 -- {Start Of Comments}
78 --
79 -- Description:
80 -- This private Procedure contains any processing which is required before
81 -- the delete dml.
82 --
83 -- Prerequisites:
84 -- This is an internal Procedure which is called from the del Procedure.
85 --
86 -- In Parameters:
87 -- A Pl/Sql record structre.
88 --
89 -- Post Success:
90 -- Processing continues.
91 --
92 -- Post Failure:
93 -- If an error has occurred, an error message and exception will be raised
94 -- but not handled.
95 --
96 -- Developer Implementation Notes:
97 -- Any pre-processing required before the delete dml is issued should be
98 -- coded within this Procedure. It is important to note that any 3rd party
99 -- maintenance should be reviewed before placing in this Procedure.
100 --
101 -- Access Status:
102 -- Internal Row Handler Use Only.
103 --
104 -- {End Of Comments}
105 -- ----------------------------------------------------------------------------
106 Procedure pre_delete(p_rec in per_ssl_shd.g_rec_type) is
107 --
108 l_proc varchar2(72) := g_package||'pre_delete';
109 --
110 Begin
111 hr_utility.set_location('Entering:'||l_proc, 5);
112 --
113 hr_utility.set_location(' Leaving:'||l_proc, 10);
114 End pre_delete;
115 --
116 -- ----------------------------------------------------------------------------
117 -- |-----------------------------< post_delete >------------------------------|
118 -- ----------------------------------------------------------------------------
119 -- {Start Of Comments}
120 --
121 -- Description:
122 -- This private Procedure contains any processing which is required after the
123 -- delete dml.
124 --
125 -- Prerequisites:
126 -- This is an internal Procedure which is called from the del Procedure.
127 --
128 -- In Parameters:
129 -- A Pl/Sql record structre.
130 --
131 -- Post Success:
132 -- Processing continues.
133 --
134 -- Post Failure:
135 -- If an error has occurred, an error message and exception will be raised
136 -- but not handled.
137 --
138 -- Developer Implementation Notes:
139 -- Any post-processing required after the delete dml is issued should be
140 -- coded within this Procedure. It is important to note that any 3rd party
141 -- maintenance should be reviewed before placing in this Procedure.
142 --
143 -- Access Status:
144 -- Internal table Handler Use Only.
145 --
146 -- {End Of Comments}
147 -- ----------------------------------------------------------------------------
148 Procedure post_delete(p_rec in per_ssl_shd.g_rec_type) is
149 --
150 l_proc varchar2(72) := g_package||'post_delete';
151 --
152 Begin
153 hr_utility.set_location('Entering:'||l_proc, 5);
154 --
155 begin
156 per_ssl_rkd.after_delete
157 (p_salary_survey_line_id
158 => p_rec.salary_survey_line_id,
159 p_object_version_number_o
160 => per_ssl_shd.g_old_rec.object_version_number,
161 p_salary_survey_id_o
162 => per_ssl_shd.g_old_rec.salary_survey_id,
163 p_survey_job_name_code_o
164 => per_ssl_shd.g_old_rec.survey_job_name_code,
165 p_survey_region_code_o
166 => per_ssl_shd.g_old_rec.survey_region_code,
167 p_survey_seniority_code_o
168 => per_ssl_shd.g_old_rec.survey_seniority_code,
169 p_company_size_code_o
170 => per_ssl_shd.g_old_rec.company_size_code,
171 p_industry_code_o
172 => per_ssl_shd.g_old_rec.industry_code,
173 p_survey_age_code_o
174 => per_ssl_shd.g_old_rec.survey_age_code,
175 p_start_date_o
176 => per_ssl_shd.g_old_rec.start_date,
177 p_end_date_o
178 => per_ssl_shd.g_old_rec.end_date,
179 p_currency_code_o
180 => per_ssl_shd.g_old_rec.currency_code,
181 p_differential_o
182 => per_ssl_shd.g_old_rec.differential,
183 p_minimum_pay_o
184 => per_ssl_shd.g_old_rec.minimum_pay,
185 p_mean_pay_o
186 => per_ssl_shd.g_old_rec.mean_pay,
187 p_maximum_pay_o
188 => per_ssl_shd.g_old_rec.maximum_pay,
189 p_graduate_pay_o
190 => per_ssl_shd.g_old_rec.graduate_pay,
191 p_starting_pay_o
192 => per_ssl_shd.g_old_rec.starting_pay,
193 p_percentage_change_o
194 => per_ssl_shd.g_old_rec.percentage_change,
195 p_job_first_quartile_o
196 => per_ssl_shd.g_old_rec.job_first_quartile,
197 p_job_median_quartile_o
198 => per_ssl_shd.g_old_rec.job_median_quartile,
199 p_job_third_quartile_o
200 => per_ssl_shd.g_old_rec.job_third_quartile,
201 p_job_fourth_quartile_o
202 => per_ssl_shd.g_old_rec.job_fourth_quartile,
203 p_minimum_total_compensation_o
204 => per_ssl_shd.g_old_rec.minimum_total_compensation,
205 p_mean_total_compensation_o
206 => per_ssl_shd.g_old_rec.mean_total_compensation,
207 p_maximum_total_compensation_o
208 => per_ssl_shd.g_old_rec.maximum_total_compensation,
209 p_compnstn_first_quartile_o
210 => per_ssl_shd.g_old_rec.compnstn_first_quartile,
211 p_compnstn_median_quartile_o
212 => per_ssl_shd.g_old_rec.compnstn_median_quartile,
213 p_compnstn_third_quartile_o
214 => per_ssl_shd.g_old_rec.compnstn_third_quartile,
215 p_compnstn_fourth_quartile_o
216 => per_ssl_shd.g_old_rec.compnstn_fourth_quartile,
217 /*Added for Enhancement 4021737 */
218 p_tenth_percentile_o
219 => per_ssl_shd.g_old_rec.tenth_percentile,
220 p_twenty_fifth_percentile_o
221 => per_ssl_shd.g_old_rec.twenty_fifth_percentile,
222 p_fiftieth_percentile_o
223 => per_ssl_shd.g_old_rec.fiftieth_percentile,
224 p_seventy_fifth_percentile_o
225 => per_ssl_shd.g_old_rec.seventy_fifth_percentile,
226 p_ninetieth_percentile_o
227 => per_ssl_shd.g_old_rec.ninetieth_percentile,
228 p_minimum_bonus_o
229 => per_ssl_shd.g_old_rec.minimum_bonus,
230 p_mean_bonus_o
231 => per_ssl_shd.g_old_rec.mean_bonus,
232 p_maximum_bonus_o
233 => per_ssl_shd.g_old_rec.maximum_bonus,
234 p_minimum_salary_increase_o
235 => per_ssl_shd.g_old_rec.minimum_salary_increase,
236 p_mean_salary_increase_o
237 => per_ssl_shd.g_old_rec.mean_salary_increase,
238 p_maximum_salary_increase_o
239 => per_ssl_shd.g_old_rec.maximum_salary_increase,
240 p_min_variable_compensation_o
241 => per_ssl_shd.g_old_rec.min_variable_compensation,
242 p_mean_variable_compensation_o
243 => per_ssl_shd.g_old_rec.mean_variable_compensation,
244 p_max_variable_compensation_o
245 => per_ssl_shd.g_old_rec.max_variable_compensation,
246 p_minimum_stock_o
247 => per_ssl_shd.g_old_rec.minimum_stock,
248 p_mean_stock_o
249 => per_ssl_shd.g_old_rec.mean_stock,
250 p_maximum_stock_o
251 => per_ssl_shd.g_old_rec.maximum_stock,
252 p_stock_display_type_o
253 => per_ssl_shd.g_old_rec.stock_display_type,
254 /*End Enhancement 4021737 */
255 p_attribute_category_o
256 => per_ssl_shd.g_old_rec.attribute_category,
257 p_attribute1_o
258 => per_ssl_shd.g_old_rec.attribute1,
259 p_attribute2_o
260 => per_ssl_shd.g_old_rec.attribute2,
261 p_attribute3_o
262 => per_ssl_shd.g_old_rec.attribute3,
263 p_attribute4_o
264 => per_ssl_shd.g_old_rec.attribute4,
265 p_attribute5_o
266 => per_ssl_shd.g_old_rec.attribute5,
267 p_attribute6_o
268 => per_ssl_shd.g_old_rec.attribute6,
269 p_attribute7_o
270 => per_ssl_shd.g_old_rec.attribute7,
271 p_attribute8_o
272 => per_ssl_shd.g_old_rec.attribute8,
273 p_attribute9_o
274 => per_ssl_shd.g_old_rec.attribute9,
275 p_attribute10_o
276 => per_ssl_shd.g_old_rec.attribute10,
277 p_attribute11_o
278 => per_ssl_shd.g_old_rec.attribute11,
279 p_attribute12_o
280 => per_ssl_shd.g_old_rec.attribute12,
281 p_attribute13_o
282 => per_ssl_shd.g_old_rec.attribute13,
283 p_attribute14_o
284 => per_ssl_shd.g_old_rec.attribute14,
285 p_attribute15_o
286 => per_ssl_shd.g_old_rec.attribute15,
287 p_attribute16_o
288 => per_ssl_shd.g_old_rec.attribute16,
289 p_attribute17_o
290 => per_ssl_shd.g_old_rec.attribute17,
291 p_attribute18_o
292 => per_ssl_shd.g_old_rec.attribute18,
293 p_attribute19_o
294 => per_ssl_shd.g_old_rec.attribute19,
295 p_attribute20_o
296 => per_ssl_shd.g_old_rec.attribute20,
297 /*Added for Enhancement 4021737 */
298 p_attribute21_o
299 => per_ssl_shd.g_old_rec.attribute21,
300 p_attribute22_o
301 => per_ssl_shd.g_old_rec.attribute22,
302 p_attribute23_o
303 => per_ssl_shd.g_old_rec.attribute23,
304 p_attribute24_o
305 => per_ssl_shd.g_old_rec.attribute24,
306 p_attribute25_o
307 => per_ssl_shd.g_old_rec.attribute25,
308 p_attribute26_o
309 => per_ssl_shd.g_old_rec.attribute26,
310 p_attribute27_o
311 => per_ssl_shd.g_old_rec.attribute27,
312 p_attribute28_o
313 => per_ssl_shd.g_old_rec.attribute28,
314 p_attribute29_o
315 => per_ssl_shd.g_old_rec.attribute29,
316 p_attribute30_o
317 => per_ssl_shd.g_old_rec.attribute30
318 /*End Enhancement 4021737 */
319 );
320
321 exception
322 when hr_api.cannot_find_prog_unit then
323 hr_api.cannot_find_prog_unit_error
324 (p_module_name => 'PER_SALARY_SURVEY_LINES'
325 ,p_hook_type => 'AD'
326 );
327 end;
328 --
329 hr_utility.set_location(' Leaving:'||l_proc, 10);
330 --
331 End post_delete;
332 --
333 -- ----------------------------------------------------------------------------
334 -- |---------------------------------< del >----------------------------------|
335 -- ----------------------------------------------------------------------------
336 Procedure del
337 (
338 p_rec in per_ssl_shd.g_rec_type
339 ) is
340 --
341 l_proc varchar2(72) := g_package||'del';
342 --
343 Begin
344 hr_utility.set_location('Entering:'||l_proc, 5);
345 --
346 -- We must lock the row which we need to delete.
347 --
348 per_ssl_shd.lck
349 (
350 p_rec.salary_survey_line_id,
351 p_rec.object_version_number
352 );
353 --
354 -- Call the supporting delete validate operation
355 --
356 per_ssl_bus.delete_validate(p_rec);
357 --
358 -- Call the supporting pre-delete operation
359 --
360 pre_delete(p_rec);
361 --
362 -- Delete the row.
363 --
364 delete_dml(p_rec);
365 --
366 -- Call the supporting post-delete operation
367 --
368 post_delete(p_rec);
369 End del;
370 --
371 -- ----------------------------------------------------------------------------
372 -- |---------------------------------< del >----------------------------------|
373 -- ----------------------------------------------------------------------------
374 Procedure del
375 (
376 p_salary_survey_line_id in number,
377 p_object_version_number in number
378 ) is
379 --
380 l_rec per_ssl_shd.g_rec_type;
381 l_proc varchar2(72) := g_package||'del';
382 --
383 Begin
384 hr_utility.set_location('Entering:'||l_proc, 5);
385 --
386 -- As the delete Procedure accepts a plsql record structure we do need to
387 -- convert the arguments into the record structure.
388 -- We don't need to call the supplied conversion argument routine as we
389 -- only need a few attributes.
390 --
391 l_rec.salary_survey_line_id:= p_salary_survey_line_id;
392 l_rec.object_version_number := p_object_version_number;
393 --
394 -- Having converted the arguments into the per_ssl_rec
395 -- plsql record structure we must call the corresponding entity
396 -- business process
397 --
398 del(l_rec);
399 --
400 hr_utility.set_location(' Leaving:'||l_proc, 10);
401 End del;
402 --
403 End per_ssl_del;