[Home] [Help]
PACKAGE BODY: APPS.IRC_IPD_SHD
Source
1 Package Body irc_ipd_shd as
2 /* $Header: iripdrhi.pkb 120.0 2005/07/26 15:09:42 mbocutt noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' irc_ipd_shd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |---------------------------< constraint_error >---------------------------|
12 -- ----------------------------------------------------------------------------
13 Procedure constraint_error
14 (p_constraint_name in all_constraints.constraint_name%TYPE
15 ) Is
16 --
17 l_proc varchar2(72) := g_package||'constraint_error';
18 --
19 Begin
20 --
21 If (p_constraint_name = 'IRC_PENDING_DATA_PK') Then
22 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
23 fnd_message.set_token('PROCEDURE', l_proc);
24 fnd_message.set_token('STEP','5');
25 fnd_message.raise_error;
26 ElsIf (p_constraint_name = 'IRC_PENDING_DATA_UK') Then
27 fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
28 fnd_message.set_token('PROCEDURE', l_proc);
29 fnd_message.set_token('STEP','10');
30 fnd_message.raise_error;
31 Else
32 fnd_message.set_name('PAY', 'HR_7877_API_INVALID_CONSTRAINT');
33 fnd_message.set_token('PROCEDURE', l_proc);
34 fnd_message.set_token('CONSTRAINT_NAME', p_constraint_name);
35 fnd_message.raise_error;
36 End If;
37 --
38 End constraint_error;
39 --
40 -- ----------------------------------------------------------------------------
41 -- |-----------------------------< api_updating >-----------------------------|
42 -- ----------------------------------------------------------------------------
43 Function api_updating
44 (p_pending_data_id in number
45 )
46 Return Boolean Is
47 --
48 --
49 -- Cursor selects the 'current' row from the HR Schema
50 --
51 Cursor C_Sel1 is
52 select
53 pending_data_id
54 ,email_address
55 ,vacancy_id
56 ,last_name
57 ,first_name
58 ,user_password
59 ,resume_file_name
60 ,resume_description
61 ,resume_mime_type
62 ,source_type
63 ,job_post_source_name
64 ,posting_content_id
65 ,person_id
66 ,processed
67 ,sex
68 ,date_of_birth
69 ,per_information_category
70 ,per_information1
71 ,per_information2
72 ,per_information3
73 ,per_information4
74 ,per_information5
75 ,per_information6
76 ,per_information7
77 ,per_information8
78 ,per_information9
79 ,per_information10
80 ,per_information11
81 ,per_information12
82 ,per_information13
83 ,per_information14
84 ,per_information15
85 ,per_information16
86 ,per_information17
87 ,per_information18
88 ,per_information19
89 ,per_information20
90 ,per_information21
91 ,per_information22
92 ,per_information23
93 ,per_information24
94 ,per_information25
95 ,per_information26
96 ,per_information27
97 ,per_information28
98 ,per_information29
99 ,per_information30
100 ,error_message
101 ,creation_date
102 ,last_update_date
103 ,allow_access
104 ,user_guid
105 ,visitor_resp_key
106 ,visitor_resp_appl_id
107 ,security_group_key
108 from irc_pending_data
109 where pending_data_id = p_pending_data_id;
110 --
111 l_fct_ret boolean;
112 --
113 Begin
114 --
115 If (p_pending_data_id is null
116 ) Then
117 --
118 -- One of the primary key arguments is null therefore we must
119 -- set the returning function value to false
120 --
121 l_fct_ret := false;
122 Else
123 If (p_pending_data_id
124 = irc_ipd_shd.g_old_rec.pending_data_id
125 ) Then
126 --
127 -- The g_old_rec is current therefore we must
128 -- set the returning function to true
129 --
130 l_fct_ret := true;
131 Else
132 --
133 -- Select the current row into g_old_rec
134 --
135 Open C_Sel1;
136 Fetch C_Sel1 Into irc_ipd_shd.g_old_rec;
137 If C_Sel1%notfound Then
138 Close C_Sel1;
139 --
140 -- The primary key is invalid therefore we must error
141 --
142 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
143 fnd_message.raise_error;
144 End If;
145 Close C_Sel1;
146 --
147 l_fct_ret := true;
148 End If;
149 End If;
150 Return (l_fct_ret);
151 --
152 End api_updating;
153 --
154 -- ----------------------------------------------------------------------------
155 -- |---------------------------------< lck >----------------------------------|
156 -- ----------------------------------------------------------------------------
157 Procedure lck
158 (p_pending_data_id in number
159 ) is
160 --
161 -- Cursor selects the 'current' row from the HR Schema
162 --
163 Cursor C_Sel1 is
164 select
165 pending_data_id
166 ,email_address
167 ,vacancy_id
168 ,last_name
169 ,first_name
170 ,user_password
171 ,resume_file_name
172 ,resume_description
173 ,resume_mime_type
174 ,source_type
175 ,job_post_source_name
176 ,posting_content_id
177 ,person_id
178 ,processed
179 ,sex
180 ,date_of_birth
181 ,per_information_category
182 ,per_information1
183 ,per_information2
184 ,per_information3
185 ,per_information4
186 ,per_information5
187 ,per_information6
188 ,per_information7
189 ,per_information8
190 ,per_information9
191 ,per_information10
192 ,per_information11
193 ,per_information12
194 ,per_information13
195 ,per_information14
196 ,per_information15
197 ,per_information16
198 ,per_information17
199 ,per_information18
200 ,per_information19
201 ,per_information20
202 ,per_information21
203 ,per_information22
204 ,per_information23
205 ,per_information24
206 ,per_information25
207 ,per_information26
208 ,per_information27
209 ,per_information28
210 ,per_information29
211 ,per_information30
212 ,error_message
213 ,creation_date
214 ,last_update_date
215 ,allow_access
216 ,user_guid
217 ,visitor_resp_key
218 ,visitor_resp_appl_id
219 ,security_group_key
220 from irc_pending_data
221 where pending_data_id = p_pending_data_id
222 for update nowait;
223 --
224 l_proc varchar2(72) := g_package||'lck';
225 --
226 Begin
227 hr_utility.set_location('Entering:'||l_proc, 5);
228 --
229 hr_api.mandatory_arg_error
230 (p_api_name => l_proc
231 ,p_argument => 'PENDING_DATA_ID'
232 ,p_argument_value => p_pending_data_id
233 );
234 --
235 Open C_Sel1;
236 Fetch C_Sel1 Into irc_ipd_shd.g_old_rec;
237 If C_Sel1%notfound then
238 Close C_Sel1;
239 --
240 -- The primary key is invalid therefore we must error
241 --
242 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
243 fnd_message.raise_error;
244 End If;
245 Close C_Sel1;
246 --
247 --
248 hr_utility.set_location(' Leaving:'||l_proc, 10);
249 --
250 -- We need to trap the ORA LOCK exception
251 --
252 Exception
253 When HR_Api.Object_Locked then
254 --
255 -- The object is locked therefore we need to supply a meaningful
256 -- error message.
257 --
258 fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');
259 fnd_message.set_token('TABLE_NAME', 'irc_pending_data');
260 fnd_message.raise_error;
261 End lck;
262 --
263 -- ----------------------------------------------------------------------------
264 -- |-----------------------------< convert_args >-----------------------------|
265 -- ----------------------------------------------------------------------------
266 Function convert_args
267 (p_pending_data_id in number
268 ,p_email_address in varchar2
269 ,p_vacancy_id in number
270 ,p_last_name in varchar2
271 ,p_first_name in varchar2
272 ,p_user_password in varchar2
273 ,p_resume_file_name in varchar2
274 ,p_resume_description in varchar2
275 ,p_resume_mime_type in varchar2
276 ,p_source_type in varchar2
277 ,p_job_post_source_name in varchar2
278 ,p_posting_content_id in number
279 ,p_person_id in number
280 ,p_processed in varchar2
281 ,p_sex in varchar2
282 ,p_date_of_birth in date
283 ,p_per_information_category in varchar2
284 ,p_per_information1 in varchar2
285 ,p_per_information2 in varchar2
286 ,p_per_information3 in varchar2
287 ,p_per_information4 in varchar2
288 ,p_per_information5 in varchar2
289 ,p_per_information6 in varchar2
290 ,p_per_information7 in varchar2
291 ,p_per_information8 in varchar2
292 ,p_per_information9 in varchar2
293 ,p_per_information10 in varchar2
294 ,p_per_information11 in varchar2
295 ,p_per_information12 in varchar2
296 ,p_per_information13 in varchar2
297 ,p_per_information14 in varchar2
298 ,p_per_information15 in varchar2
299 ,p_per_information16 in varchar2
300 ,p_per_information17 in varchar2
301 ,p_per_information18 in varchar2
302 ,p_per_information19 in varchar2
303 ,p_per_information20 in varchar2
304 ,p_per_information21 in varchar2
305 ,p_per_information22 in varchar2
306 ,p_per_information23 in varchar2
307 ,p_per_information24 in varchar2
308 ,p_per_information25 in varchar2
309 ,p_per_information26 in varchar2
310 ,p_per_information27 in varchar2
311 ,p_per_information28 in varchar2
312 ,p_per_information29 in varchar2
313 ,p_per_information30 in varchar2
314 ,p_error_message in varchar2
315 ,p_creation_date in date
316 ,p_last_update_date in date
317 ,p_allow_access in varchar2
318 ,p_user_guid in raw
319 ,p_visitor_resp_key in varchar2
320 ,p_visitor_resp_appl_id in number
321 ,p_security_group_key in varchar2
322 )
323 Return g_rec_type is
324 --
325 l_rec g_rec_type;
326 --
327 Begin
328 --
329 -- Convert arguments into local l_rec structure.
330 --
331 l_rec.pending_data_id := p_pending_data_id;
332 l_rec.email_address := p_email_address;
333 l_rec.vacancy_id := p_vacancy_id;
334 l_rec.last_name := p_last_name;
335 l_rec.first_name := p_first_name;
336 l_rec.user_password := p_user_password;
337 l_rec.resume_file_name := p_resume_file_name;
338 l_rec.resume_description := p_resume_description;
339 l_rec.resume_mime_type := p_resume_mime_type;
340 l_rec.source_type := p_source_type;
341 l_rec.job_post_source_name := p_job_post_source_name;
342 l_rec.posting_content_id := p_posting_content_id;
343 l_rec.person_id := p_person_id;
344 l_rec.processed := p_processed;
345 l_rec.sex := p_sex;
346 l_rec.date_of_birth := p_date_of_birth;
347 l_rec.per_information_category := p_per_information_category;
348 l_rec.per_information1 := p_per_information1;
349 l_rec.per_information2 := p_per_information2;
350 l_rec.per_information3 := p_per_information3;
351 l_rec.per_information4 := p_per_information4;
352 l_rec.per_information5 := p_per_information5;
353 l_rec.per_information6 := p_per_information6;
354 l_rec.per_information7 := p_per_information7;
355 l_rec.per_information8 := p_per_information8;
356 l_rec.per_information9 := p_per_information9;
357 l_rec.per_information10 := p_per_information10;
358 l_rec.per_information11 := p_per_information11;
359 l_rec.per_information12 := p_per_information12;
360 l_rec.per_information13 := p_per_information13;
361 l_rec.per_information14 := p_per_information14;
362 l_rec.per_information15 := p_per_information15;
363 l_rec.per_information16 := p_per_information16;
364 l_rec.per_information17 := p_per_information17;
365 l_rec.per_information18 := p_per_information18;
366 l_rec.per_information19 := p_per_information19;
367 l_rec.per_information20 := p_per_information20;
368 l_rec.per_information21 := p_per_information21;
369 l_rec.per_information22 := p_per_information22;
370 l_rec.per_information23 := p_per_information23;
371 l_rec.per_information24 := p_per_information24;
372 l_rec.per_information25 := p_per_information25;
373 l_rec.per_information26 := p_per_information26;
374 l_rec.per_information27 := p_per_information27;
375 l_rec.per_information28 := p_per_information28;
376 l_rec.per_information29 := p_per_information29;
377 l_rec.per_information30 := p_per_information30;
378 l_rec.error_message := p_error_message;
379 l_rec.creation_date := p_creation_date;
380 l_rec.last_update_date := p_last_update_date;
381 l_rec.allow_access := p_allow_access;
382 l_rec.user_guid := p_user_guid;
383 l_rec.visitor_resp_key := p_visitor_resp_key;
384 l_rec.visitor_resp_appl_id := p_visitor_resp_appl_id;
385 l_rec.security_group_key := p_security_group_key;
386 --
387 -- Return the plsql record structure.
388 --
389 Return(l_rec);
390 --
391 End convert_args;
392 --
393 end irc_ipd_shd;