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