[Home] [Help]
PACKAGE BODY: APPS.PER_SOLUTION_CMPT_NAME_API
Source
1 Package Body per_solution_cmpt_name_api as
2 /* $Header: pescnapi.pkb 115.2 2003/01/04 00:35:41 ndorai noship $ */
3 --
4 -- Package Variables
5 --
6 g_package varchar2(33) := 'PER_SOLUTION_CMPT_NAME_API.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |---------------------< CREATE_SOLUTION_CMPT_NAME >------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 --
13 procedure create_solution_cmpt_name
14 (p_validate in boolean default false
15 ,p_solution_id in number
16 ,p_component_name in varchar2
17 ,p_solution_type_name in varchar2
18 ,p_name in varchar2 default null
19 ,p_template_file in varchar2
20 ,p_object_version_number out nocopy number
21 ) is
22 --
23 begin
24 create_solution_cmpt_name
25 (p_validate => p_validate
26 ,p_solution_id => p_solution_id
27 ,p_component_name => p_component_name
28 ,p_solution_type_name => p_solution_type_name
29 ,p_name => p_name
30 ,p_object_version_number => p_object_version_number
31 );
32 end create_solution_cmpt_name;
33 --
34 --
35 procedure create_solution_cmpt_name
36 (p_validate in boolean default false
37 ,p_solution_id in number
38 ,p_component_name in varchar2
39 ,p_solution_type_name in varchar2
40 ,p_name in varchar2 default null
41 ,p_object_version_number out nocopy number
42 ) is
43 --
44 -- Declare cursors and local variables
45 --
46 l_proc varchar2(72) := g_package||'CREATE_SOLUTION_CMPT_NAME';
47 l_effective_date date;
48 l_solution_id PER_SOLUTION_CMPT_NAMES.SOLUTION_ID%TYPE;
49 l_component_name PER_SOLUTION_CMPT_NAMES.COMPONENT_NAME%TYPE;
50 l_solution_type_name PER_SOLUTION_CMPT_NAMES.SOLUTION_TYPE_NAME%TYPE;
51 l_object_version_number PER_SOLUTION_CMPT_NAMES.OBJECT_VERSION_NUMBER%TYPE;
52 --
53 begin
54 hr_utility.set_location('Entering:'|| l_proc, 10);
55 --
56 savepoint CREATE_SOLUTION_CMPT_NAME;
57 --
58 -- Register user key values
59 --
60 per_scn_ins.set_base_key_value
61 (p_solution_id => p_solution_id
62 ,p_component_name => p_component_name
63 ,p_solution_type_name => p_solution_type_name
64 );
65 --
66 -- Truncate the time portion from all IN date parameters
67 --
68 -- Call Before Process User Hook
69 --
70 begin
71 PER_SOLUTION_CMPT_NAME_BK1.CREATE_SOLUTION_CMPT_NAME_b
72 (p_solution_id => p_solution_id
73 ,p_component_name => p_component_name
74 ,p_solution_type_name => p_solution_type_name
75 ,p_name => p_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_SOLUTION_CMPT_NAME_b'
81 ,p_hook_type => 'BP'
82 );
83 end;
84 --
85 --
86 per_scn_ins.ins
87 (p_solution_id => l_solution_id
88 ,p_component_name => l_component_name
89 ,p_solution_type_name => l_solution_type_name
90 ,p_name => p_name
91 ,p_object_version_number => l_object_version_number
92 );
93 --
94 -- Call After Process User Hook
95 --
96 begin
97 PER_SOLUTION_CMPT_NAME_BK1.CREATE_SOLUTION_CMPT_NAME_a
98 (p_solution_id => p_solution_id
99 ,p_component_name => p_component_name
100 ,p_solution_type_name => p_solution_type_name
101 ,p_name => p_name
102 ,p_object_version_number => p_object_version_number
103 );
104 exception
105 when hr_api.cannot_find_prog_unit then
106 hr_api.cannot_find_prog_unit_error
107 (p_module_name => 'CREATE_SOLUTION_CMPT_NAME_a'
108 ,p_hook_type => 'AP'
109 );
110 end;
111 --
112 -- When in validation only mode raise the Validate_Enabled exception
113 --
114 if p_validate then
115 raise hr_api.validate_enabled;
116 end if;
117 --
118 -- Set all output arguments
119 --
120 p_object_version_number := l_object_version_number;
121 --
122 hr_utility.set_location(' Leaving:'||l_proc, 70);
123 exception
124 when hr_api.validate_enabled then
125 --
126 -- As the Validate_Enabled exception has been raised
127 -- we must rollback to the savepoint
128 --
129 rollback to CREATE_SOLUTION_CMPT_NAME;
130 --
131 -- Only set output warning arguments
132 -- (Any key or derived arguments must be set to null
133 -- when validation only mode is being used.)
134 --
135 p_object_version_number := null;
136 --
137 hr_utility.set_location(' Leaving:'||l_proc, 80);
138 when others then
139 --
140 -- A validation or unexpected error has occured
141 --
142 rollback to CREATE_SOLUTION_CMPT_NAME;
143 hr_utility.set_location(' Leaving:'||l_proc, 90);
144 raise;
145 end CREATE_SOLUTION_CMPT_NAME;
146 --
147
148
149 -- ----------------------------------------------------------------------------
150 -- |--------------------< UPDATE_SOLUTION_CMPT_NAME >-------------------------|
151 -- ----------------------------------------------------------------------------
152 --
153 procedure update_solution_cmpt_name
154 (p_validate in boolean default false
155 ,p_solution_id in number
156 ,p_component_name in varchar2
157 ,p_solution_type_name in varchar2
158 ,p_name in varchar2 default hr_api.g_varchar2
159 ,p_template_file in varchar2
160 ,p_object_version_number in out nocopy number
161 ) is
162 --
163 -- Declare cursors and local variables
164 --
165 l_proc varchar2(72) := g_package||'UPDATE_SOLUTION_CMPT_NAME';
166 l_effective_date date;
167 l_object_version_number PER_SOLUTION_CMPT_NAMES.OBJECT_VERSION_NUMBER%TYPE;
168 --
169 begin
170 hr_utility.set_location('Entering:'|| l_proc, 10);
171 --
172 savepoint UPDATE_SOLUTION_CMPT_NAME;
173 --
174 -- Store initial value for OVN in out parameter.
175 --
176 l_object_version_number := p_object_version_number;
177 --
178 -- Truncate the time portion from all IN date parameters
179 --
180 -- Call Before Process User Hook
181 --
182 begin
183 PER_SOLUTION_CMPT_NAME_BK2.UPDATE_SOLUTION_CMPT_NAME_b
184 (p_object_version_number => p_object_version_number
185 ,p_solution_id => p_solution_id
186 ,p_component_name => p_component_name
187 ,p_solution_type_name => p_solution_type_name
188 ,p_name => p_name
189 );
190 exception
191 when hr_api.cannot_find_prog_unit then
192 hr_api.cannot_find_prog_unit_error
193 (p_module_name => 'UPDATE_SOLUTION_CMPT_NAME_b'
194 ,p_hook_type => 'BP'
195 );
196 end;
197 --
198 --
199 per_scn_upd.upd
200 (p_object_version_number => l_object_version_number
201 ,p_solution_id => p_solution_id
202 ,p_component_name => p_component_name
203 ,p_solution_type_name => p_solution_type_name
204 ,p_name => p_name
205 );
206 --
207 -- Call After Process User Hook
208 --
209 begin
210 PER_SOLUTION_CMPT_NAME_BK2.UPDATE_SOLUTION_CMPT_NAME_a
211 (p_object_version_number => p_object_version_number
212 ,p_solution_id => p_solution_id
213 ,p_component_name => p_component_name
214 ,p_solution_type_name => p_solution_type_name
215 ,p_name => p_name
216 );
217 exception
218 when hr_api.cannot_find_prog_unit then
219 hr_api.cannot_find_prog_unit_error
220 (p_module_name => 'UPDATE_SOLUTION_CMPT_NAME_a'
221 ,p_hook_type => 'AP'
222 );
223 end;
224 --
225 -- When in validation only mode raise the Validate_Enabled exception
226 --
227 if p_validate then
228 raise hr_api.validate_enabled;
229 end if;
230 --
231 --
232 -- Set all output arguments
233 --
234 p_object_version_number := l_object_version_number;
235 --
236 hr_utility.set_location(' Leaving:'||l_proc, 70);
237 exception
238 when hr_api.validate_enabled then
239 --
240 -- As the Validate_Enabled exception has been raised
241 -- we must rollback to the savepoint
242 --
243 rollback to UPDATE_SOLUTION_CMPT_NAME;
244 --
245 -- Only set output warning arguments
246 -- (Any key or derived arguments must be set to null
247 -- when validation only mode is being used.)
248 --
249 hr_utility.set_location(' Leaving:'||l_proc, 80);
250 when others then
251 --
252 -- A validation or unexpected error has occured
253 --
254 rollback to UPDATE_SOLUTION_CMPT_NAME;
255 hr_utility.set_location(' Leaving:'||l_proc, 90);
256 raise;
257 end UPDATE_SOLUTION_CMPT_NAME;
258
259
260 -- ----------------------------------------------------------------------------
261 -- |--------------------< DELETE_SOLUTION_CMPT_NAME >-------------------------|
262 -- ----------------------------------------------------------------------------
263 --
264 procedure delete_solution_cmpt_name
265 (p_validate in boolean default false
266 ,p_solution_id in number
267 ,p_component_name in varchar2
268 ,p_solution_type_name in varchar2
269 ,p_object_version_number in number
270 ) is
271 --
272 -- Declare cursors and local variables
273 --
274 l_proc varchar2(72) := g_package||'DELETE_SOLUTION_CMPT_NAME';
275 --
276 begin
277 hr_utility.set_location('Entering:'|| l_proc, 10);
278 --
279 savepoint DELETE_SOLUTION_CMPT_NAME;
280 --
281 -- Call Before Process User Hook
282 --
283 begin
284 PER_SOLUTION_CMPT_NAME_BK3.DELETE_SOLUTION_CMPT_NAME_b
285 (p_solution_id => p_solution_id
286 ,p_component_name => p_component_name
287 ,p_solution_type_name => p_solution_type_name
288 ,p_object_version_number => p_object_version_number
289 );
290 exception
291 when hr_api.cannot_find_prog_unit then
292 hr_api.cannot_find_prog_unit_error
293 (p_module_name => 'DELETE_SOLUTION_CMPT_NAME_b'
294 ,p_hook_type => 'BP'
295 );
296 end;
297 --
298 per_scn_del.del
299 (p_solution_id => p_solution_id
300 ,p_component_name => p_component_name
301 ,p_solution_type_name => p_solution_type_name
302 ,p_object_version_number => p_object_version_number
303 );
304 --
305 begin
306 PER_SOLUTION_CMPT_NAME_BK3.DELETE_SOLUTION_CMPT_NAME_a
307 (p_solution_id => p_solution_id
308 ,p_component_name => p_component_name
309 ,p_solution_type_name => p_solution_type_name
310 ,p_object_version_number => p_object_version_number
311 );
312 exception
313 when hr_api.cannot_find_prog_unit then
314 hr_api.cannot_find_prog_unit_error
315 (p_module_name => 'DELETE_SOLUTION_CMPT_NAME_a'
316 ,p_hook_type => 'AP'
317 );
318 end;
319 --
320 -- When in validation only mode raise the Validate_Enabled exception
321 --
322 if p_validate then
323 raise hr_api.validate_enabled;
324 end if;
325 --
326 hr_utility.set_location(' Leaving:'||l_proc, 70);
327 exception
328 when hr_api.validate_enabled then
329 --
330 -- As the Validate_Enabled exception has been raised
331 -- we must rollback to the savepoint
332 --
333 rollback to DELETE_SOLUTION_CMPT_NAME;
334 --
335 hr_utility.set_location(' Leaving:'||l_proc, 80);
336 when others then
337 --
338 rollback to DELETE_SOLUTION_CMPT_NAME;
339 --
340 hr_utility.set_location(' Leaving:'||l_proc, 90);
341 --
342 raise;
343 --
344 end DELETE_SOLUTION_CMPT_NAME;
345
346 --
347 end per_solution_cmpt_name_api;