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