1 Package Body ben_dpnt_egd_upd as
2
3
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ben_dpnt_egd_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml update logic. The processing of
17 -- this procedure is:
18 -- 1) Increment the object_version_number by 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) To set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) To update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) To trap any constraint violations that may have occurred.
25 -- 5) To raise any other errors.
26 --
27 -- Prerequisites:
28 -- This is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- In Parameters:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 -- On the update dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- If a check, unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- If any other error is reported, the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 -- The update 'set' attribute list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- Access Status:
50 -- Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml(p_rec in out nocopy ben_dpnt_egd_shd.g_rec_type) is
55 --
56 l_proc varchar2(72) := g_package||'update_dml';
57 --
58 Begin
59 hr_utility.set_location('Entering:'||l_proc, 5);
60 --
61 -- Increment the object version
62 --
63 p_rec.object_version_number := p_rec.object_version_number + 1;
64 --
65 ben_dpnt_egd_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ben_eligy_criteria Row
68 --
69 update ben_eligy_criteria_dpnt
70 set
71 eligy_criteria_dpnt_id = p_rec.eligy_criteria_dpnt_id
72 ,name = p_rec.name
73 ,short_code = p_rec.short_code
74 ,description = p_rec.description
75 ,criteria_type = p_rec.criteria_type
76 ,crit_col1_val_type_cd = p_rec.crit_col1_val_type_cd
77 ,crit_col1_datatype = p_rec.crit_col1_datatype
78 ,col1_lookup_type = p_rec.col1_lookup_type
79 ,col1_value_set_id = p_rec.col1_value_set_id
80 ,access_table_name1 = p_rec.access_table_name1
81 ,access_column_name1 = p_rec.access_column_name1
82 ,time_entry_access_table_name1 = p_rec.time_entry_access_tab_nam1
83 ,time_entry_access_col_name1 = p_rec.time_entry_access_col_nam1
84 ,crit_col2_val_type_cd = p_rec.crit_col2_val_type_cd
85 ,crit_col2_datatype = p_rec.crit_col2_datatype
86 ,col2_lookup_type = p_rec.col2_lookup_type
87 ,col2_value_set_id = p_rec.col2_value_set_id
88 ,access_table_name2 = p_rec.access_table_name2
89 ,access_column_name2 = p_rec.access_column_name2
90 ,time_entry_access_table_name2 = p_rec.time_entry_access_tab_nam2
91 ,time_entry_access_col_name2 = p_rec.time_entry_access_col_nam2
92 ,allow_range_validation_flag = p_rec.allow_range_validation_flg
93 ,user_defined_flag = p_rec.user_defined_flag
94 ,business_group_id = p_rec.business_group_id
95 ,egd_attribute_category = p_rec.egd_attribute_category
96 ,egd_attribute1 = p_rec.egd_attribute1
97 ,egd_attribute2 = p_rec.egd_attribute2
98 ,egd_attribute3 = p_rec.egd_attribute3
99 ,egd_attribute4 = p_rec.egd_attribute4
100 ,egd_attribute5 = p_rec.egd_attribute5
101 ,egd_attribute6 = p_rec.egd_attribute6
102 ,egd_attribute7 = p_rec.egd_attribute7
103 ,egd_attribute8 = p_rec.egd_attribute8
104 ,egd_attribute9 = p_rec.egd_attribute9
105 ,egd_attribute10 = p_rec.egd_attribute10
106 ,egd_attribute11 = p_rec.egd_attribute11
107 ,egd_attribute12 = p_rec.egd_attribute12
108 ,egd_attribute13 = p_rec.egd_attribute13
109 ,egd_attribute14 = p_rec.egd_attribute14
110 ,egd_attribute15 = p_rec.egd_attribute15
111 ,egd_attribute16 = p_rec.egd_attribute16
112 ,egd_attribute17 = p_rec.egd_attribute17
113 ,egd_attribute18 = p_rec.egd_attribute18
114 ,egd_attribute19 = p_rec.egd_attribute19
115 ,egd_attribute20 = p_rec.egd_attribute20
116 ,egd_attribute21 = p_rec.egd_attribute21
117 ,egd_attribute22 = p_rec.egd_attribute22
118 ,egd_attribute23 = p_rec.egd_attribute23
119 ,egd_attribute24 = p_rec.egd_attribute24
120 ,egd_attribute25 = p_rec.egd_attribute25
121 ,egd_attribute26 = p_rec.egd_attribute26
122 ,egd_attribute27 = p_rec.egd_attribute27
123 ,egd_attribute28 = p_rec.egd_attribute28
124 ,egd_attribute29 = p_rec.egd_attribute29
125 ,egd_attribute30 = p_rec.egd_attribute30
126 ,object_version_number = p_rec.object_version_number
127 ,allow_range_validation_flag2 = p_rec.allow_range_validation_flag2
128 ,time_access_calc_rule1 = p_rec.time_access_calc_rule1
129 ,time_access_calc_rule2 = p_rec.time_access_calc_rule2
130
131
132 where eligy_criteria_dpnt_id = p_rec.eligy_criteria_dpnt_id;
133 --
134 ben_dpnt_egd_shd.g_api_dml := false; -- Unset the api dml status
135 --
136 hr_utility.set_location(' Leaving:'||l_proc, 10);
137 --
138 Exception
139 When hr_api.check_integrity_violated Then
140 -- A check constraint has been violated
141 ben_dpnt_egd_shd.g_api_dml := false; -- Unset the api dml status
142 ben_dpnt_egd_shd.constraint_error
143 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
144 When hr_api.parent_integrity_violated Then
145 -- Parent integrity has been violated
146 ben_dpnt_egd_shd.g_api_dml := false; -- Unset the api dml status
147 ben_dpnt_egd_shd.constraint_error
148 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
149 When hr_api.unique_integrity_violated Then
150 -- Unique integrity has been violated
151 ben_dpnt_egd_shd.g_api_dml := false; -- Unset the api dml status
152 ben_dpnt_egd_shd.constraint_error
153 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
154 When Others Then
155 ben_dpnt_egd_shd.g_api_dml := false; -- Unset the api dml status
156 Raise;
157 End update_dml;
158 --
159 -- ----------------------------------------------------------------------------
160 -- |------------------------------< pre_update >------------------------------|
161 -- ----------------------------------------------------------------------------
162 -- {Start Of Comments}
163 --
164 -- Description:
165 -- This private procedure contains any processing which is required before
166 -- the update dml.
167 --
168 -- Prerequisites:
169 -- This is an internal procedure which is called from the upd procedure.
170 --
171 -- In Parameters:
172 -- A Pl/Sql record structre.
173 --
174 -- Post Success:
175 -- Processing continues.
176 --
177 -- Post Failure:
178 -- If an error has occurred, an error message and exception will be raised
179 -- but not handled.
180 --
181 -- Developer Implementation Notes:
182 -- Any pre-processing required before the update dml is issued should be
183 -- coded within this procedure. It is important to note that any 3rd party
184 -- maintenance should be reviewed before placing in this procedure.
185 --
186 -- Access Status:
187 -- Internal Row Handler Use Only.
188 --
189 -- {End Of Comments}
190 -- ----------------------------------------------------------------------------
191 Procedure pre_update(p_rec in ben_dpnt_egd_shd.g_rec_type) is
192 --
193 l_proc varchar2(72) := g_package||'pre_update';
194 --
195 Begin
196 hr_utility.set_location('Entering:'||l_proc, 5);
197 --
198 hr_utility.set_location(' Leaving:'||l_proc, 10);
199 End pre_update;
200 --
201 -- ----------------------------------------------------------------------------
202 -- |-----------------------------< post_update >------------------------------|
203 -- ----------------------------------------------------------------------------
204 -- {Start Of Comments}
205 --
206 -- Description:
207 -- This private procedure contains any processing which is required after the
208 -- update dml.
209 --
210 -- Prerequisites:
211 -- This is an internal procedure which is called from the upd procedure.
212 --
213 -- In Parameters:
214 -- A Pl/Sql record structre.
215 --
216 -- Post Success:
217 -- Processing continues.
218 --
219 -- Post Failure:
220 -- If an error has occurred, an error message and exception will be raised
221 -- but not handled.
222 --
223 -- Developer Implementation Notes:
224 -- Any post-processing required after the update dml is issued should be
225 -- coded within this procedure. It is important to note that any 3rd party
226 -- maintenance should be reviewed before placing in this procedure.
227 --
228 -- Access Status:
229 -- Internal Row Handler Use Only.
230 --
231 -- {End Of Comments}
232 -- ----------------------------------------------------------------------------
233 Procedure post_update( p_rec in ben_dpnt_egd_shd.g_rec_type
234 ,p_effective_date in date) is
235 --
236 l_proc varchar2(72) := g_package||'post_update';
237 --
238 Begin
239 hr_utility.set_location('Entering:'||l_proc, 5);
240 --
241 --
242 -- Start of API User Hook for post_update.
243 --
244 begin
245 --
246
247 ben_dpnt_egd_rku.after_update
248 (
249 p_eligy_criteria_dpnt_id => p_rec.eligy_criteria_dpnt_id
250 ,p_name => p_rec.name
251 ,p_short_code => p_rec.short_code
252 ,p_description => p_rec.description
253 ,p_criteria_type => p_rec.criteria_type
254 ,p_crit_col1_val_type_cd => p_rec.crit_col1_val_type_cd
255 ,p_crit_col1_datatype => p_rec.crit_col1_datatype
256 ,p_col1_lookup_type => p_rec.col1_lookup_type
257 ,p_col1_value_set_id => p_rec.col1_value_set_id
258 ,p_access_table_name1 => p_rec.access_table_name1
259 ,p_access_column_name1 => p_rec.access_column_name1
260 ,p_time_entry_access_tab_nam1 => p_rec.time_entry_access_tab_nam1
261 ,p_time_entry_access_col_nam1 => p_rec.time_entry_access_col_nam1
262 ,p_crit_col2_val_type_cd => p_rec.crit_col2_val_type_cd
263 ,p_crit_col2_datatype => p_rec.crit_col2_datatype
264 ,p_col2_lookup_type => p_rec.col2_lookup_type
265 ,p_col2_value_set_id => p_rec.col2_value_set_id
266 ,p_access_table_name2 => p_rec.access_table_name2
267 ,p_access_column_name2 => p_rec.access_column_name2
268 ,p_time_entry_access_tab_nam2 => p_rec.time_entry_access_tab_nam2
269 ,p_time_entry_access_col_nam2 => p_rec.time_entry_access_col_nam2
270 ,p_allow_range_validation_flg => p_rec.allow_range_validation_flg
271 ,p_user_defined_flag => p_rec.user_defined_flag
272 ,p_business_group_id => p_rec.business_group_id
273 ,p_egd_attribute_category => p_rec.egd_attribute_category
274 ,p_egd_attribute1 => p_rec.egd_attribute1
275 ,p_egd_attribute2 => p_rec.egd_attribute2
276 ,p_egd_attribute3 => p_rec.egd_attribute3
277 ,p_egd_attribute4 => p_rec.egd_attribute4
278 ,p_egd_attribute5 => p_rec.egd_attribute5
279 ,p_egd_attribute6 => p_rec.egd_attribute6
280 ,p_egd_attribute7 => p_rec.egd_attribute7
281 ,p_egd_attribute8 => p_rec.egd_attribute8
282 ,p_egd_attribute9 => p_rec.egd_attribute9
283 ,p_egd_attribute10 => p_rec.egd_attribute10
284 ,p_egd_attribute11 => p_rec.egd_attribute11
285 ,p_egd_attribute12 => p_rec.egd_attribute12
286 ,p_egd_attribute13 => p_rec.egd_attribute13
287 ,p_egd_attribute14 => p_rec.egd_attribute14
288 ,p_egd_attribute15 => p_rec.egd_attribute15
289 ,p_egd_attribute16 => p_rec.egd_attribute16
290 ,p_egd_attribute17 => p_rec.egd_attribute17
291 ,p_egd_attribute18 => p_rec.egd_attribute18
292 ,p_egd_attribute19 => p_rec.egd_attribute19
293 ,p_egd_attribute20 => p_rec.egd_attribute20
294 ,p_egd_attribute21 => p_rec.egd_attribute21
295 ,p_egd_attribute22 => p_rec.egd_attribute22
296 ,p_egd_attribute23 => p_rec.egd_attribute23
297 ,p_egd_attribute24 => p_rec.egd_attribute24
298 ,p_egd_attribute25 => p_rec.egd_attribute25
299 ,p_egd_attribute26 => p_rec.egd_attribute26
300 ,p_egd_attribute27 => p_rec.egd_attribute27
301 ,p_egd_attribute28 => p_rec.egd_attribute28
302 ,p_egd_attribute29 => p_rec.egd_attribute29
303 ,p_egd_attribute30 => p_rec.egd_attribute30
304 ,p_object_version_number => p_rec.object_version_number
305 ,p_effective_date => p_effective_date
306 ,p_allow_range_validation_flag2 => p_rec.allow_range_validation_flag2
307 ,p_time_access_calc_rule1 => p_rec.time_access_calc_rule1
308 ,p_time_access_calc_rule2 => p_rec.time_access_calc_rule2
309 ,p_name_o => ben_dpnt_egd_shd.g_old_rec.name
310 ,p_short_code_o => ben_dpnt_egd_shd.g_old_rec.short_code
311 ,p_description_o => ben_dpnt_egd_shd.g_old_rec.description
312 ,p_criteria_type_o => ben_dpnt_egd_shd.g_old_rec.criteria_type
313 ,p_crit_col1_val_type_cd_o => ben_dpnt_egd_shd.g_old_rec.crit_col1_val_type_cd
314 ,p_crit_col1_datatype_o => ben_dpnt_egd_shd.g_old_rec.crit_col1_datatype
315 ,p_col1_lookup_type_o => ben_dpnt_egd_shd.g_old_rec.col1_lookup_type
316 ,p_col1_value_set_id_o => ben_dpnt_egd_shd.g_old_rec.col1_value_set_id
317 ,p_access_table_name1_o => ben_dpnt_egd_shd.g_old_rec.access_table_name1
318 ,p_access_column_name1_o => ben_dpnt_egd_shd.g_old_rec.access_column_name1
319 ,p_time_entry_access_tab_nam1_o => ben_dpnt_egd_shd.g_old_rec.time_entry_access_tab_nam1
320 ,p_time_entry_access_col_nam1_o => ben_dpnt_egd_shd.g_old_rec.time_entry_access_col_nam1
321 ,p_crit_col2_val_type_cd_o => ben_dpnt_egd_shd.g_old_rec.crit_col2_val_type_cd
322 ,p_crit_col2_datatype_o => ben_dpnt_egd_shd.g_old_rec.crit_col2_datatype
323 ,p_col2_lookup_type_o => ben_dpnt_egd_shd.g_old_rec.col2_lookup_type
324 ,p_col2_value_set_id_o => ben_dpnt_egd_shd.g_old_rec.col2_value_set_id
325 ,p_access_table_name2_o => ben_dpnt_egd_shd.g_old_rec.access_table_name2
326 ,p_access_column_name2_o => ben_dpnt_egd_shd.g_old_rec.access_column_name2
327 ,p_time_entry_access_tab_nam2_o => ben_dpnt_egd_shd.g_old_rec.time_entry_access_tab_nam2
328 ,p_time_entry_access_col_nam2_o => ben_dpnt_egd_shd.g_old_rec.time_entry_access_col_nam2
329 ,p_allow_range_validation_flg_o => ben_dpnt_egd_shd.g_old_rec.allow_range_validation_flg
330 ,p_user_defined_flag_o => ben_dpnt_egd_shd.g_old_rec.user_defined_flag
331 ,p_business_group_id_o => ben_dpnt_egd_shd.g_old_rec.business_group_id
332 ,p_egd_attribute_category_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute_category
333 ,p_egd_attribute1_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute1
334 ,p_egd_attribute2_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute2
335 ,p_egd_attribute3_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute3
336 ,p_egd_attribute4_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute4
337 ,p_egd_attribute5_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute5
338 ,p_egd_attribute6_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute6
339 ,p_egd_attribute7_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute7
340 ,p_egd_attribute8_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute8
341 ,p_egd_attribute9_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute9
342 ,p_egd_attribute10_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute10
343 ,p_egd_attribute11_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute11
344 ,p_egd_attribute12_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute12
345 ,p_egd_attribute13_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute13
346 ,p_egd_attribute14_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute14
347 ,p_egd_attribute15_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute15
348 ,p_egd_attribute16_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute16
349 ,p_egd_attribute17_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute17
350 ,p_egd_attribute18_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute18
351 ,p_egd_attribute19_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute19
352 ,p_egd_attribute20_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute20
353 ,p_egd_attribute21_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute21
354 ,p_egd_attribute22_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute22
355 ,p_egd_attribute23_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute23
356 ,p_egd_attribute24_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute24
357 ,p_egd_attribute25_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute25
358 ,p_egd_attribute26_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute26
359 ,p_egd_attribute27_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute27
360 ,p_egd_attribute28_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute28
361 ,p_egd_attribute29_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute29
362 ,p_egd_attribute30_o => ben_dpnt_egd_shd.g_old_rec.egd_attribute30
363 ,p_object_version_number_o => ben_dpnt_egd_shd.g_old_rec.object_version_number
364 ,p_allw_range_validation_flg2_o => ben_dpnt_egd_shd.g_old_rec.allow_range_validation_flag2
365 ,p_time_access_calc_rule1_o => ben_dpnt_egd_shd.g_old_rec.time_access_calc_rule1
366 ,p_time_access_calc_rule2_o => ben_dpnt_egd_shd.g_old_rec.time_access_calc_rule2
367 );
368 --
369 exception
370 --
371 when hr_api.cannot_find_prog_unit then
372 --
373 hr_api.cannot_find_prog_unit_error
374 (p_module_name => 'ben_eligy_criteria_dpnt'
375 ,p_hook_type => 'AU');
376 --
377 end;
378 --
379 -- End of API User Hook for post_update.
380 --
381 --
382 hr_utility.set_location(' Leaving:'||l_proc, 10);
383 End post_update;
384 --
385 -- ----------------------------------------------------------------------------
386 -- |-----------------------------< convert_defs >-----------------------------|
387 -- ----------------------------------------------------------------------------
388 -- {Start Of Comments}
389 --
390 -- Description:
391 -- The Convert_Defs procedure has one very important function:
392 -- It must return the record structure for the row with all system defaulted
393 -- values converted into its corresponding parameter value for update. When
394 -- we attempt to update a row through the Upd process , certain
395 -- parameters can be defaulted which enables flexibility in the calling of
396 -- the upd process (e.g. only attributes which need to be updated need to be
397 -- specified). For the upd process to determine which attributes
398 -- have NOT been specified we need to check if the parameter has a reserved
399 -- system default value. Therefore, for all parameters which have a
400 -- corresponding reserved system default mechanism specified we need to
401 -- check if a system default is being used. If a system default is being
402 -- used then we convert the defaulted value into its corresponding attribute
403 -- value held in the g_old_rec data structure.
404 --
405 -- Prerequisites:
406 -- This private function can only be called from the upd process.
407 --
408 -- In Parameters:
409 -- A Pl/Sql record structre.
410 --
411 -- Post Success:
412 -- The record structure will be returned with all system defaulted parameter
413 -- values converted into its current row attribute value.
414 --
415 -- Post Failure:
416 -- No direct error handling is required within this function. Any possible
417 -- errors within this procedure will be a PL/SQL value error due to conversion
418 -- of datatypes or data lengths.
419 --
420 -- Developer Implementation Notes:
421 -- None.
422 --
423 -- Access Status:
424 -- Internal Row Handler Use Only.
425 --
426 -- {End Of Comments}
427 -- ----------------------------------------------------------------------------
428 Procedure convert_defs(p_rec in out nocopy ben_dpnt_egd_shd.g_rec_type) is
429 --
430 l_proc varchar2(72) := g_package||'convert_defs';
431 --
432 Begin
433 --
434 hr_utility.set_location('Entering:'||l_proc, 5);
435 --
436 -- We must now examine each argument value in the
437 -- p_rec plsql record structure
438 -- to see if a system default is being used. If a system default
439 -- is being used then we must set to the 'current' argument value.
440 --
441
442 If (p_rec.name = hr_api.g_varchar2) then
443 p_rec.name :=
444 ben_dpnt_egd_shd.g_old_rec.name;
445 End If;
446 If (p_rec.short_code = hr_api.g_varchar2) then
447 p_rec.short_code :=
448 ben_dpnt_egd_shd.g_old_rec.short_code;
449 End If;
450 If (p_rec.description = hr_api.g_varchar2) then
451 p_rec.description :=
452 ben_dpnt_egd_shd.g_old_rec.description;
453 End If;
454 If (p_rec.criteria_type = hr_api.g_varchar2) then
455 p_rec.criteria_type :=
456 ben_dpnt_egd_shd.g_old_rec.criteria_type;
457 End If;
458 If (p_rec.crit_col1_val_type_cd = hr_api.g_varchar2) then
459 p_rec.crit_col1_val_type_cd :=
460 ben_dpnt_egd_shd.g_old_rec.crit_col1_val_type_cd;
461 End If;
462 If (p_rec.crit_col1_datatype = hr_api.g_varchar2) then
463 p_rec.crit_col1_datatype :=
464 ben_dpnt_egd_shd.g_old_rec.crit_col1_datatype;
465 End If;
466 If (p_rec.col1_lookup_type = hr_api.g_varchar2) then
467 p_rec.col1_lookup_type :=
468 ben_dpnt_egd_shd.g_old_rec.col1_lookup_type;
469 End If;
470 If (p_rec.col1_value_set_id = hr_api.g_number) then
471 p_rec.col1_value_set_id :=
472 ben_dpnt_egd_shd.g_old_rec.col1_value_set_id;
473 End If;
474 If (p_rec.access_table_name1 = hr_api.g_varchar2) then
475 p_rec.access_table_name1 :=
476 ben_dpnt_egd_shd.g_old_rec.access_table_name1;
477 End If;
478 If (p_rec.access_column_name1 = hr_api.g_varchar2) then
479 p_rec.access_column_name1 :=
480 ben_dpnt_egd_shd.g_old_rec.access_column_name1;
481 End If;
482 If (p_rec.time_entry_access_tab_nam1 = hr_api.g_varchar2) then
483 p_rec.time_entry_access_tab_nam1 :=
484 ben_dpnt_egd_shd.g_old_rec.time_entry_access_tab_nam1;
485 End If;
486 If (p_rec.time_entry_access_col_nam1 = hr_api.g_varchar2) then
487 p_rec.time_entry_access_col_nam1 :=
488 ben_dpnt_egd_shd.g_old_rec.time_entry_access_col_nam1;
489 End If;
490 If (p_rec.crit_col2_val_type_cd = hr_api.g_varchar2) then
491 p_rec.crit_col2_val_type_cd :=
492 ben_dpnt_egd_shd.g_old_rec.crit_col2_val_type_cd;
493 End If;
494 If (p_rec.crit_col2_datatype = hr_api.g_varchar2) then
495 p_rec.crit_col2_datatype :=
496 ben_dpnt_egd_shd.g_old_rec.crit_col2_datatype;
497 End If;
498 If (p_rec.col2_lookup_type = hr_api.g_varchar2) then
499 p_rec.col2_lookup_type :=
500 ben_dpnt_egd_shd.g_old_rec.col2_lookup_type;
501 End If;
502 If (p_rec.col2_value_set_id = hr_api.g_number) then
503 p_rec.col2_value_set_id :=
504 ben_dpnt_egd_shd.g_old_rec.col2_value_set_id;
505 End If;
506 If (p_rec.access_table_name2 = hr_api.g_varchar2) then
507 p_rec.access_table_name2 :=
508 ben_dpnt_egd_shd.g_old_rec.access_table_name2;
509 End If;
510 If (p_rec.access_column_name2 = hr_api.g_varchar2) then
511 p_rec.access_column_name2 :=
512 ben_dpnt_egd_shd.g_old_rec.access_column_name2;
513 End If;
514 If (p_rec.time_entry_access_tab_nam2 = hr_api.g_varchar2) then
515 p_rec.time_entry_access_tab_nam2 :=
516 ben_dpnt_egd_shd.g_old_rec.time_entry_access_tab_nam2;
517 End If;
518 If (p_rec.time_entry_access_col_nam2 = hr_api.g_varchar2) then
519 p_rec.time_entry_access_col_nam2 :=
520 ben_dpnt_egd_shd.g_old_rec.time_entry_access_col_nam2;
521 End If;
522 If (p_rec.allow_range_validation_flg = hr_api.g_varchar2) then
523 p_rec.allow_range_validation_flg :=
524 ben_dpnt_egd_shd.g_old_rec.allow_range_validation_flg;
525 End If;
526 If (p_rec.user_defined_flag = hr_api.g_varchar2) then
527 p_rec.user_defined_flag :=
528 ben_dpnt_egd_shd.g_old_rec.user_defined_flag;
529 End If;
530 If (p_rec.business_group_id = hr_api.g_number) then
531 p_rec.business_group_id :=
532 ben_dpnt_egd_shd.g_old_rec.business_group_id;
533 End If;
534
535 If (p_rec.egd_attribute_category = hr_api.g_varchar2) then
536 p_rec.egd_attribute_category :=
537 ben_dpnt_egd_shd.g_old_rec.egd_attribute_category;
538 End If;
539 If (p_rec.egd_attribute1 = hr_api.g_varchar2) then
540 p_rec.egd_attribute1 :=
541 ben_dpnt_egd_shd.g_old_rec.egd_attribute1;
542 End If;
543 If (p_rec.egd_attribute2 = hr_api.g_varchar2) then
544 p_rec.egd_attribute2 :=
545 ben_dpnt_egd_shd.g_old_rec.egd_attribute2;
546 End If;
547 If (p_rec.egd_attribute3 = hr_api.g_varchar2) then
548 p_rec.egd_attribute3 :=
549 ben_dpnt_egd_shd.g_old_rec.egd_attribute3;
550 End If;
551 If (p_rec.egd_attribute4 = hr_api.g_varchar2) then
552 p_rec.egd_attribute4 :=
553 ben_dpnt_egd_shd.g_old_rec.egd_attribute4;
554 End If;
555 If (p_rec.egd_attribute5 = hr_api.g_varchar2) then
556 p_rec.egd_attribute5 :=
557 ben_dpnt_egd_shd.g_old_rec.egd_attribute5;
558 End If;
559 If (p_rec.egd_attribute6 = hr_api.g_varchar2) then
560 p_rec.egd_attribute6 :=
561 ben_dpnt_egd_shd.g_old_rec.egd_attribute6;
562 End If;
563 If (p_rec.egd_attribute7 = hr_api.g_varchar2) then
564 p_rec.egd_attribute7 :=
565 ben_dpnt_egd_shd.g_old_rec.egd_attribute7;
566 End If;
567 If (p_rec.egd_attribute8 = hr_api.g_varchar2) then
568 p_rec.egd_attribute8 :=
569 ben_dpnt_egd_shd.g_old_rec.egd_attribute8;
570 End If;
571 If (p_rec.egd_attribute9 = hr_api.g_varchar2) then
572 p_rec.egd_attribute9 :=
573 ben_dpnt_egd_shd.g_old_rec.egd_attribute9;
574 End If;
575 If (p_rec.egd_attribute10 = hr_api.g_varchar2) then
576 p_rec.egd_attribute10 :=
577 ben_dpnt_egd_shd.g_old_rec.egd_attribute10;
578 End If;
579 If (p_rec.egd_attribute11 = hr_api.g_varchar2) then
580 p_rec.egd_attribute11 :=
581 ben_dpnt_egd_shd.g_old_rec.egd_attribute11;
582 End If;
583 If (p_rec.egd_attribute12 = hr_api.g_varchar2) then
584 p_rec.egd_attribute12 :=
585 ben_dpnt_egd_shd.g_old_rec.egd_attribute12;
586 End If;
587 If (p_rec.egd_attribute13 = hr_api.g_varchar2) then
588 p_rec.egd_attribute13 :=
589 ben_dpnt_egd_shd.g_old_rec.egd_attribute13;
590 End If;
591 If (p_rec.egd_attribute14 = hr_api.g_varchar2) then
592 p_rec.egd_attribute14 :=
593 ben_dpnt_egd_shd.g_old_rec.egd_attribute14;
594 End If;
595 If (p_rec.egd_attribute15 = hr_api.g_varchar2) then
596 p_rec.egd_attribute15 :=
597 ben_dpnt_egd_shd.g_old_rec.egd_attribute15;
598 End If;
599 If (p_rec.egd_attribute16 = hr_api.g_varchar2) then
600 p_rec.egd_attribute16 :=
601 ben_dpnt_egd_shd.g_old_rec.egd_attribute16;
602 End If;
603 If (p_rec.egd_attribute17 = hr_api.g_varchar2) then
604 p_rec.egd_attribute17 :=
605 ben_dpnt_egd_shd.g_old_rec.egd_attribute17;
606 End If;
607 If (p_rec.egd_attribute18 = hr_api.g_varchar2) then
608 p_rec.egd_attribute18 :=
609 ben_dpnt_egd_shd.g_old_rec.egd_attribute18;
610 End If;
611 If (p_rec.egd_attribute19 = hr_api.g_varchar2) then
612 p_rec.egd_attribute19 :=
613 ben_dpnt_egd_shd.g_old_rec.egd_attribute19;
614 End If;
615 If (p_rec.egd_attribute20 = hr_api.g_varchar2) then
616 p_rec.egd_attribute20 :=
617 ben_dpnt_egd_shd.g_old_rec.egd_attribute20;
618 End If;
619 If (p_rec.egd_attribute21 = hr_api.g_varchar2) then
620 p_rec.egd_attribute21 :=
621 ben_dpnt_egd_shd.g_old_rec.egd_attribute21;
622 End If;
623 If (p_rec.egd_attribute22 = hr_api.g_varchar2) then
624 p_rec.egd_attribute22 :=
625 ben_dpnt_egd_shd.g_old_rec.egd_attribute22;
626 End If;
627 If (p_rec.egd_attribute23 = hr_api.g_varchar2) then
628 p_rec.egd_attribute23 :=
629 ben_dpnt_egd_shd.g_old_rec.egd_attribute23;
630 End If;
631 If (p_rec.egd_attribute24 = hr_api.g_varchar2) then
632 p_rec.egd_attribute24 :=
633 ben_dpnt_egd_shd.g_old_rec.egd_attribute24;
634 End If;
635 If (p_rec.egd_attribute25 = hr_api.g_varchar2) then
636 p_rec.egd_attribute25 :=
637 ben_dpnt_egd_shd.g_old_rec.egd_attribute25;
638 End If;
639 If (p_rec.egd_attribute26 = hr_api.g_varchar2) then
640 p_rec.egd_attribute26 :=
641 ben_dpnt_egd_shd.g_old_rec.egd_attribute26;
642 End If;
643 If (p_rec.egd_attribute27 = hr_api.g_varchar2) then
644 p_rec.egd_attribute27 :=
645 ben_dpnt_egd_shd.g_old_rec.egd_attribute27;
646 End If;
647 If (p_rec.egd_attribute28 = hr_api.g_varchar2) then
648 p_rec.egd_attribute28 :=
649 ben_dpnt_egd_shd.g_old_rec.egd_attribute28;
650 End If;
651 If (p_rec.egd_attribute29 = hr_api.g_varchar2) then
652 p_rec.egd_attribute29 :=
653 ben_dpnt_egd_shd.g_old_rec.egd_attribute29;
654 End If;
655 If (p_rec.egd_attribute30 = hr_api.g_varchar2) then
656 p_rec.egd_attribute30 :=
657 ben_dpnt_egd_shd.g_old_rec.egd_attribute30;
658 End If;
659 If (p_rec.allow_range_validation_flag2 = hr_api.g_varchar2) then
660 p_rec.allow_range_validation_flag2 :=
661 ben_dpnt_egd_shd.g_old_rec.allow_range_validation_flag2;
662 End If;
663 If (p_rec.time_access_calc_rule1 = hr_api.g_number) then
664 p_rec.time_access_calc_rule1 :=
665 ben_dpnt_egd_shd.g_old_rec.time_access_calc_rule1;
666 End If;
667 If (p_rec.time_access_calc_rule2 = hr_api.g_number) then
668 p_rec.time_access_calc_rule2 :=
669 ben_dpnt_egd_shd.g_old_rec.time_access_calc_rule2;
670 End If;
671
672 --
673 hr_utility.set_location(' Leaving:'||l_proc, 10);
674 --
675 End convert_defs;
676 --
677 -- ----------------------------------------------------------------------------
678 -- |---------------------------------< upd >----------------------------------|
679 -- ----------------------------------------------------------------------------
680 Procedure upd
681 (
682 p_rec in out nocopy ben_dpnt_egd_shd.g_rec_type
683 ,p_effective_date in date
684 ) is
685 --
686 l_proc varchar2(72) := g_package||'upd';
687 --
688 Begin
689 hr_utility.set_location('Entering:'||l_proc, 5);
690 --
691 -- We must lock the row which we need to update.
692
693 --
694 ben_dpnt_egd_shd.lck(p_rec.eligy_criteria_dpnt_id,
695 p_rec.object_version_number);
696 --
697 -- 1. During an update system defaults are used to determine if
698 -- arguments have been defaulted or not. We must therefore
699 -- derive the full record structure values to be updated.
700 --
701 -- 2. Call the supporting update validate operations.
702 --
703 convert_defs(p_rec);
704 ben_dpnt_egd_bus.update_validate(p_rec,p_effective_date);
705 --
706 -- Call the supporting pre-update operation
707 --
708 pre_update(p_rec);
709 --
710 -- Update the row.
711 --
712 update_dml(p_rec);
713 --
714 -- Call the supporting post-update operation
715 --
716 post_update(p_rec,p_effective_date);
717 End upd;
718 --
719 -- ----------------------------------------------------------------------------
720 -- |---------------------------------< upd >----------------------------------|
721 -- ----------------------------------------------------------------------------
722 Procedure upd
723 (
724 p_eligy_criteria_dpnt_id in number
725 ,p_name in varchar2 default hr_api.g_varchar2
726 ,p_short_code in varchar2 default hr_api.g_varchar2
727 ,p_description in varchar2 default hr_api.g_varchar2
728 ,p_criteria_type in varchar2 default hr_api.g_varchar2
729 ,p_crit_col1_val_type_cd in varchar2 default hr_api.g_varchar2
730 ,p_crit_col1_datatype in varchar2 default hr_api.g_varchar2
731 ,p_col1_lookup_type in varchar2 default hr_api.g_varchar2
732 ,p_col1_value_set_id in number default hr_api.g_number
733 ,p_access_table_name1 in varchar2 default hr_api.g_varchar2
734 ,p_access_column_name1 in varchar2 default hr_api.g_varchar2
735 ,p_time_entry_access_tab_nam1 in varchar2 default hr_api.g_varchar2
736 ,p_time_entry_access_col_nam1 in varchar2 default hr_api.g_varchar2
737 ,p_crit_col2_val_type_cd in varchar2 default hr_api.g_varchar2
738 ,p_crit_col2_datatype in varchar2 default hr_api.g_varchar2
739 ,p_col2_lookup_type in varchar2 default hr_api.g_varchar2
740 ,p_col2_value_set_id in number default hr_api.g_number
741 ,p_access_table_name2 in varchar2 default hr_api.g_varchar2
742 ,p_access_column_name2 in varchar2 default hr_api.g_varchar2
743 ,p_time_entry_access_tab_nam2 in varchar2 default hr_api.g_varchar2
744 ,p_time_entry_access_col_nam2 in varchar2 default hr_api.g_varchar2
745 ,p_allow_range_validation_flg in varchar2 default hr_api.g_varchar2
746 ,p_user_defined_flag in varchar2 default hr_api.g_varchar2
747 ,p_business_group_id in number default hr_api.g_number
748 ,p_egd_attribute_category in varchar2 default hr_api.g_varchar2
749 ,p_egd_attribute1 in varchar2 default hr_api.g_varchar2
750 ,p_egd_attribute2 in varchar2 default hr_api.g_varchar2
751 ,p_egd_attribute3 in varchar2 default hr_api.g_varchar2
752 ,p_egd_attribute4 in varchar2 default hr_api.g_varchar2
753 ,p_egd_attribute5 in varchar2 default hr_api.g_varchar2
754 ,p_egd_attribute6 in varchar2 default hr_api.g_varchar2
755 ,p_egd_attribute7 in varchar2 default hr_api.g_varchar2
756 ,p_egd_attribute8 in varchar2 default hr_api.g_varchar2
757 ,p_egd_attribute9 in varchar2 default hr_api.g_varchar2
758 ,p_egd_attribute10 in varchar2 default hr_api.g_varchar2
759 ,p_egd_attribute11 in varchar2 default hr_api.g_varchar2
760 ,p_egd_attribute12 in varchar2 default hr_api.g_varchar2
761 ,p_egd_attribute13 in varchar2 default hr_api.g_varchar2
762 ,p_egd_attribute14 in varchar2 default hr_api.g_varchar2
763 ,p_egd_attribute15 in varchar2 default hr_api.g_varchar2
764 ,p_egd_attribute16 in varchar2 default hr_api.g_varchar2
765 ,p_egd_attribute17 in varchar2 default hr_api.g_varchar2
766 ,p_egd_attribute18 in varchar2 default hr_api.g_varchar2
767 ,p_egd_attribute19 in varchar2 default hr_api.g_varchar2
768 ,p_egd_attribute20 in varchar2 default hr_api.g_varchar2
769 ,p_egd_attribute21 in varchar2 default hr_api.g_varchar2
770 ,p_egd_attribute22 in varchar2 default hr_api.g_varchar2
771 ,p_egd_attribute23 in varchar2 default hr_api.g_varchar2
772 ,p_egd_attribute24 in varchar2 default hr_api.g_varchar2
773 ,p_egd_attribute25 in varchar2 default hr_api.g_varchar2
774 ,p_egd_attribute26 in varchar2 default hr_api.g_varchar2
775 ,p_egd_attribute27 in varchar2 default hr_api.g_varchar2
776 ,p_egd_attribute28 in varchar2 default hr_api.g_varchar2
777 ,p_egd_attribute29 in varchar2 default hr_api.g_varchar2
778 ,p_egd_attribute30 in varchar2 default hr_api.g_varchar2
779 ,p_object_version_number in out nocopy number
780 ,p_effective_date in date
781 ,p_allow_range_validation_flag2 in varchar2 default hr_api.g_varchar2
782 ,p_time_access_calc_rule1 in number default hr_api.g_number
783 ,p_time_access_calc_rule2 in number default hr_api.g_number
784 ) is
785 --
786 l_rec ben_dpnt_egd_shd.g_rec_type;
787 l_proc varchar2(72) := g_package||'upd';
788 --
789 Begin
790 hr_utility.set_location('Entering:'||l_proc, 5);
791 --
792 -- Call conversion function to turn arguments into the
793 -- l_rec structure.
794 --
795 l_rec :=
796 ben_dpnt_egd_shd.convert_args
797 (
798 p_eligy_criteria_dpnt_id
799 ,p_name
800 ,p_short_code
801 ,p_description
802 ,p_criteria_type
803 ,p_crit_col1_val_type_cd
804 ,p_crit_col1_datatype
805 ,p_col1_lookup_type
806 ,p_col1_value_set_id
807 ,p_access_table_name1
808 ,p_access_column_name1
809 ,p_time_entry_access_tab_nam1
810 ,p_time_entry_access_col_nam1
811 ,p_crit_col2_val_type_cd
812 ,p_crit_col2_datatype
813 ,p_col2_lookup_type
814 ,p_col2_value_set_id
815 ,p_access_table_name2
816 ,p_access_column_name2
817 ,p_time_entry_access_tab_nam2
818 ,p_time_entry_access_col_nam2
819 ,p_allow_range_validation_flg
820 ,p_user_defined_flag
821 ,p_business_group_id
822 ,p_egd_attribute_category
823 ,p_egd_attribute1
824 ,p_egd_attribute2
825 ,p_egd_attribute3
826 ,p_egd_attribute4
827 ,p_egd_attribute5
828 ,p_egd_attribute6
829 ,p_egd_attribute7
830 ,p_egd_attribute8
831 ,p_egd_attribute9
832 ,p_egd_attribute10
833 ,p_egd_attribute11
834 ,p_egd_attribute12
835 ,p_egd_attribute13
836 ,p_egd_attribute14
837 ,p_egd_attribute15
838 ,p_egd_attribute16
839 ,p_egd_attribute17
840 ,p_egd_attribute18
841 ,p_egd_attribute19
842 ,p_egd_attribute20
843 ,p_egd_attribute21
844 ,p_egd_attribute22
845 ,p_egd_attribute23
846 ,p_egd_attribute24
847 ,p_egd_attribute25
848 ,p_egd_attribute26
849 ,p_egd_attribute27
850 ,p_egd_attribute28
851 ,p_egd_attribute29
852 ,p_egd_attribute30
853 ,p_object_version_number
854 ,p_allow_range_validation_flag2
855 ,p_time_access_calc_rule1
856 ,p_time_access_calc_rule2
857 );
858 --
859 -- Having converted the arguments into the
860 -- plsql record structure we call the corresponding record
861 -- business process.
862 --
863
864 upd(l_rec,p_effective_date);
865 p_object_version_number := l_rec.object_version_number;
866 --
867 hr_utility.set_location(' Leaving:'||l_proc, 10);
868 End upd;
869 --
870 end ben_dpnt_egd_upd;