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