[Home] [Help]
PACKAGE BODY: APPS.HXC_TIME_CATEGORY_COMP_API
Source
1 Package Body hxc_time_category_comp_api as
2 /* $Header: hxctccapi.pkb 120.2 2005/09/23 09:03:22 nissharm noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := ' hxc_time_category_comp_api.';
7
8 g_debug boolean := hr_utility.debug_enabled;
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------< create_time_category_comp>----------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 procedure create_time_category_comp
15 (p_validate in boolean default false
16 ,p_time_category_comp_id in out nocopy number
17 ,p_object_version_number in out nocopy number
18 ,p_time_category_id in number
19 ,p_ref_time_category_id in number
20 ,p_component_type_id number
21 ,p_flex_value_set_id number
22 ,p_value_id Varchar2
23 ,p_is_null in varchar2
24 ,p_equal_to in varchar2
25 ,p_type in varchar2
26 ) is
27 --
28 -- Declare cursors and local variables
29 --
30 l_proc varchar2(72);
31 l_object_version_number hxc_time_category_comps.object_version_number%TYPE;
32 l_time_category_comp_id hxc_time_category_comps.time_category_comp_id%TYPE;
33 --
34 begin
35 g_debug := hr_utility.debug_enabled;
36 --
37 if g_debug then
38 l_proc := g_package||' create_time_category_comp';
39 hr_utility.set_location('Entering:'|| l_proc, 10);
40 end if;
41 --
42 -- Issue a savepoint if operating in validation only mode
43 --
44 savepoint create_time_category_comp;
45 --
46 if g_debug then
47 hr_utility.set_location(l_proc, 20);
48 end if;
49 --
50 -- Call Before Process User Hook
51 --
52 begin
53 hxc_time_category_comp_BK_1.create_time_category_comp_b
54 (p_time_category_comp_id => p_time_category_comp_id
55 ,p_object_version_number => p_object_version_number
56 ,p_time_category_id => p_time_category_id
57 ,p_ref_time_category_id => p_ref_time_category_id
58 ,p_component_type_id => p_component_type_id
59 ,p_flex_value_set_id => p_flex_value_set_id
60 ,p_value_id => p_value_id
61 ,p_is_null => p_is_null
62 ,p_equal_to => p_equal_to
63 ,p_type => p_type
64 );
65 exception
66 when hr_api.cannot_find_prog_unit then
67 hr_api.cannot_find_prog_unit_error
68 (p_module_name => 'create_time_category_comp'
69 ,p_hook_type => 'BP'
70 );
71 end;
72 --
73 if g_debug then
74 hr_utility.set_location(l_proc, 30);
75 end if;
76 --
77 -- Process Logic
78 --
79 --
80 if g_debug then
81 hr_utility.set_location(l_proc, 40);
82 end if;
83 --
84 -- call row handler
85 --
86 hxc_tcc_ins.ins (
87 p_time_category_id => p_time_category_id
88 ,p_ref_time_category_id => p_ref_time_category_id
89 ,p_component_type_id => p_component_type_id
90 ,p_flex_value_set_id => p_flex_value_set_id
91 ,p_value_id => p_value_id
92 ,p_is_null => p_is_null
93 ,p_equal_to => p_equal_to
94 ,p_type => p_type
95 ,p_time_category_comp_id => l_time_category_comp_id
96 ,p_object_version_number => l_object_version_number
97 );
98 --
99 if g_debug then
100 hr_utility.set_location(l_proc, 50);
101 end if;
102 --
103 -- Call After Process User Hook
104 --
105 begin
106 hxc_time_category_comp_BK_1.create_time_category_comp_a
107 (p_time_category_comp_id => l_time_category_comp_id
108 ,p_object_version_number => l_object_version_number
109 ,p_time_category_id => p_time_category_id
110 ,p_ref_time_category_id => p_ref_time_category_id
111 ,p_component_type_id => p_component_type_id
112 ,p_flex_value_set_id => p_flex_value_set_id
113 ,p_value_id => p_value_id
114 ,p_is_null => p_is_null
115 ,p_equal_to => p_equal_to
116 ,p_type => p_type
117 );
118 exception
119 when hr_api.cannot_find_prog_unit then
120 hr_api.cannot_find_prog_unit_error
121 (p_module_name => 'create_time_category_comp'
122 ,p_hook_type => 'AP'
123 );
124 end;
125 --
126 if g_debug then
127 hr_utility.set_location(l_proc, 60);
128 end if;
129 --
130 -- When in validation only mode raise the Validate_Enabled exception
131 --
132 if p_validate then
133 raise hr_api.validate_enabled;
134 end if;
135 --
136 if g_debug then
137 hr_utility.set_location(' Leaving:'||l_proc, 70);
138 end if;
139 --
140 -- Set all output arguments
141 --
142 p_time_category_comp_id := l_time_category_comp_id;
143 p_object_version_number := l_object_version_number;
144 --
145 exception
146 --
147 when hr_api.validate_enabled then
148 --
149 -- As the Validate_Enabled exception has been raised
150 -- we must rollback to the savepoint
151 --
152 ROLLBACK TO create_time_category_comp;
153 --
154 -- Only set output warning arguments
155 -- (Any key or derived arguments must be set to null
156 -- when validation only mode is being used.)
157 --
158 p_time_category_comp_id := null;
159 p_object_version_number := null;
160 --
161 if g_debug then
162 hr_utility.set_location(' Leaving:'||l_proc, 80);
163 end if;
164 --
165 when others then
166 --
167 -- A validation or unexpected error has occured
168 --
169 if g_debug then
170 hr_utility.trace('In exeception');
171 end if;
172 ROLLBACK TO create_time_category_comp;
173 raise;
174 --
175 END create_time_category_comp;
176 --
177 -- ----------------------------------------------------------------------------
178 -- |------------------------< update_time_category_comp>-----------------------|
179 -- ----------------------------------------------------------------------------
180 --
181 procedure update_time_category_comp
182 (p_validate in boolean default false
183 ,p_time_category_comp_id in number
184 ,p_object_version_number in out nocopy number
185 ,p_time_category_id number
186 ,p_ref_time_category_id number
187 ,p_component_type_id number
188 ,p_flex_value_set_id number
189 ,p_value_id Varchar2
190 ,p_is_null in varchar2
191 ,p_equal_to in varchar2
192 ,p_type in varchar2
193 ) is
194 --
195 -- Declare cursors and local variables
196 --
197 l_proc varchar2(72);
198 l_object_version_number hxc_time_category_comps.object_version_number%TYPE := p_object_version_number;
199 --
200 begin
201 g_debug := hr_utility.debug_enabled;
202
203 if g_debug then
204 l_proc := g_package||' update_time_category_comp';
205 hr_utility.set_location('Entering:'|| l_proc, 10);
206 end if;
207 --
208 -- Issue a savepoint if operating in validation only mode
209 --
210 savepoint update_time_category_comp;
211 --
212 if g_debug then
213 hr_utility.set_location(l_proc, 20);
214 end if;
215 --
216 -- Call Before Process User Hook
217 --
218 begin
219 hxc_time_category_comp_BK_2.update_time_category_comp_b
220 (p_time_category_comp_id => p_time_category_comp_id
221 ,p_object_version_number => p_object_version_number
222 ,p_time_category_id => p_time_category_id
223 ,p_ref_time_category_id => p_ref_time_category_id
224 ,p_component_type_id => p_component_type_id
225 ,p_flex_value_set_id => p_flex_value_set_id
226 ,p_value_id => p_value_id
227 ,p_is_null => p_is_null
228 ,p_equal_to => p_equal_to
229 ,p_type => p_type
230 );
231 exception
232 when hr_api.cannot_find_prog_unit then
233 hr_api.cannot_find_prog_unit_error
234 (p_module_name => 'update_time_category_comp'
235 ,p_hook_type => 'BP'
236 );
237 end;
238 --
239 if g_debug then
240 hr_utility.set_location(l_proc, 30);
241 end if;
242 --
243 -- Process Logic
244 --
245 -- call row handler
246 --
247 hxc_tcc_upd.upd (
248 p_time_category_id => p_time_category_id
249 ,p_ref_time_category_id => p_ref_time_category_id
250 ,p_component_type_id => p_component_type_id
251 ,p_flex_value_set_id => p_flex_value_set_id
252 ,p_value_id => p_value_id
253 ,p_is_null => p_is_null
254 ,p_equal_to => p_equal_to
255 ,p_type => p_type
256 ,p_time_category_comp_id => p_time_category_comp_id
257 ,p_object_version_number => l_object_version_number
258 );
259 --
260 --
261 if g_debug then
262 hr_utility.set_location(l_proc, 40);
263 end if;
264 --
265 -- Call After Process User Hook
266 --
267 begin
268 hxc_time_category_comp_BK_2.update_time_category_comp_a
269 (p_time_category_comp_id => p_time_category_comp_id
270 ,p_object_version_number => l_object_version_number
271 ,p_time_category_id => p_time_category_id
272 ,p_ref_time_category_id => p_ref_time_category_id
273 ,p_component_type_id => p_component_type_id
274 ,p_flex_value_set_id => p_flex_value_set_id
275 ,p_value_id => p_value_id
276 ,p_is_null => p_is_null
277 ,p_equal_to => p_equal_to
278 ,p_type => p_type
279 );
280 exception
281 when hr_api.cannot_find_prog_unit then
282 hr_api.cannot_find_prog_unit_error
283 (p_module_name => 'update_time_category_comp'
284 ,p_hook_type => 'AP'
285 );
286 end;
287 --
288 if g_debug then
289 hr_utility.set_location(l_proc, 50);
290 end if;
291 --
292 -- When in validation only mode raise the Validate_Enabled exception
293 --
294 if p_validate then
295 raise hr_api.validate_enabled;
296 end if;
297 --
298 if g_debug then
299 hr_utility.set_location(' Leaving:'||l_proc, 60);
300 end if;
301 --
302 -- Set all output arguments
303 --
304 p_object_version_number := l_object_version_number;
305 --
306 exception
307 --
308 when hr_api.validate_enabled then
309 --
310 -- As the Validate_Enabled exception has been raised
311 -- we must rollback to the savepoint
312 --
313 ROLLBACK TO update_time_category_comp;
314 --
315 -- Only set output warning arguments
316 -- (Any key or derived arguments must be set to null
317 -- when validation only mode is being used.)
318 --
319 p_object_version_number := null;
320 --
321 if g_debug then
322 hr_utility.set_location(' Leaving:'||l_proc, 60);
323 end if;
324 --
325 when others then
326 --
327 -- A validation or unexpected error has occured
328 --
329 if g_debug then
330 hr_utility.trace('In exeception');
331 end if;
332 ROLLBACK TO update_time_category_comp;
333 raise;
334 --
335 END update_time_category_comp;
336 --
337 -- ----------------------------------------------------------------------------
338 -- |------------------------< delete_time_category_comp >----------------------|
339 -- ----------------------------------------------------------------------------
340 --
341 procedure delete_time_category_comp
342 (p_validate in boolean default false
343 ,p_time_category_comp_id in number
344 ,p_object_version_number in number
345 ) is
346 --
347 -- Declare cursors and local variables
348 --
349 l_proc varchar2(72);
350 --
351 begin
352 g_debug := hr_utility.debug_enabled;
353 --
354 if g_debug then
355 l_proc := g_package||'delete_time_category_comp';
356 hr_utility.set_location('Entering:'|| l_proc, 10);
357 end if;
358 --
359 -- Issue a savepoint if operating in validation only mode
360 --
361 savepoint delete_time_category_comp;
362 --
363 if g_debug then
364 hr_utility.set_location(l_proc, 20);
365 end if;
366 --
367 -- Call Before Process User Hook
368 --
369 begin
370 --
371 hxc_time_category_comp_BK_3.delete_time_category_comp_b
372 (p_time_category_comp_id => p_time_category_comp_id
373 ,p_object_version_number => p_object_version_number
374 );
375 exception
376 when hr_api.cannot_find_prog_unit then
377 hr_api.cannot_find_prog_unit_error
378 (p_module_name => 'delete_time_category_comp_b'
379 ,p_hook_type => 'BP'
380 );
381 end;
382 --
383 if g_debug then
384 hr_utility.set_location(l_proc, 30);
385 end if;
386 --
387 -- Process Logic
388 --
389 hxc_tcc_del.del
390 (
391 p_time_category_comp_id => p_time_category_comp_id
392 ,p_object_version_number => p_object_version_number
393 );
394 --
395 if g_debug then
396 hr_utility.set_location(l_proc, 40);
397 end if;
398 --
399 -- Call After Process User Hook
400 --
401 begin
402 --
403 hxc_time_category_comp_BK_3.delete_time_category_comp_a
404 (p_time_category_comp_id => p_time_category_comp_id
405 ,p_object_version_number => p_object_version_number
406 );
407 exception
408 when hr_api.cannot_find_prog_unit then
409 hr_api.cannot_find_prog_unit_error
410 (p_module_name => 'delete_time_category_comp_a'
411 ,p_hook_type => 'AP'
412 );
413 end;
414 --
415 -- When in validation only mode raise the Validate_Enabled exception
416 --
417 if p_validate then
418 raise hr_api.validate_enabled;
419 end if;
420 --
421 if g_debug then
422 hr_utility.set_location(' Leaving:'||l_proc, 50);
423 end if;
424 --
425 exception
426 --
427 when hr_api.validate_enabled then
428 --
429 -- As the Validate_Enabled exception has been raised
430 -- we must rollback to the savepoint
431 --
432 ROLLBACK TO delete_time_category_comp;
433 --
434 when others then
435 --
436 -- A validation or unexpected error has occured
437 --
438 ROLLBACK TO delete_time_category_comp;
439 raise;
440 --
441 end delete_time_category_comp;
442 --
443 END hxc_time_category_comp_api;