[Home] [Help]
PACKAGE BODY: APPS.IRC_IPT_SHD
Source
1 Package Body irc_ipt_shd as
2 /* $Header: iriptrhi.pkb 120.0 2005/07/26 15:10:09 mbocutt noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' irc_ipt_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_POSTING_CONTENTS_TL_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 Else
27 fnd_message.set_name('PAY', 'HR_7877_API_INVALID_CONSTRAINT');
28 fnd_message.set_token('PROCEDURE', l_proc);
29 fnd_message.set_token('CONSTRAINT_NAME', p_constraint_name);
30 fnd_message.raise_error;
31 End If;
32 --
33 End constraint_error;
34 --
35 -- ----------------------------------------------------------------------------
36 -- |-----------------------------< api_updating >-----------------------------|
37 -- ----------------------------------------------------------------------------
38 Function api_updating
39 (p_posting_content_id in number
40 ,p_language in varchar2
41 ) Return Boolean Is
42 --
43 --
44 -- Cursor selects the 'current' row from the HR Schema
45 --
46 Cursor C_Sel1 is
47 select
48 posting_content_id
49 ,language
50 ,source_language
51 ,name
52 ,org_name
53 ,org_description
54 ,job_title
55 ,brief_description
56 ,detailed_description
57 ,job_requirements
58 ,additional_details
59 ,how_to_apply
60 ,benefit_info
61 ,image_url
62 ,image_url_alt
63 from irc_posting_contents_tl
64 where posting_content_id = p_posting_content_id
65 and language = p_language;
66 --
67 l_fct_ret boolean;
68 --
69 Begin
70 --
71 If (p_posting_content_id is null or
72 p_language is null
73 ) Then
74 --
75 -- One of the primary key arguments is null therefore we must
76 -- set the returning function value to false
77 --
78 l_fct_ret := false;
79 Else
80 If (p_posting_content_id
81 = irc_ipt_shd.g_old_rec.posting_content_id and
82 p_language
83 = irc_ipt_shd.g_old_rec.language
84 ) Then
85 --
86 -- The g_old_rec is current therefore we must
87 -- set the returning function to true
88 --
89 l_fct_ret := true;
90 Else
91 --
92 -- Select the current row into g_clob_old_rec
93 --
94 Open C_Sel1;
95 Fetch C_Sel1 Into irc_ipt_shd.g_clob_old_rec;
96 If C_Sel1%notfound Then
97 Close C_Sel1;
98 --
99 -- The primary key is invalid therefore we must error
100 --
101 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
102 fnd_message.raise_error;
103 End If;
104 Close C_Sel1;
105 -- Convert clob structure to varchar
106 g_old_rec.posting_content_id := g_clob_old_rec.posting_content_id;
107 g_old_rec.language := g_clob_old_rec.language;
108 g_old_rec.source_language := g_clob_old_rec.source_language;
109 g_old_rec.name := g_clob_old_rec.name;
110 g_old_rec.org_name := g_clob_old_rec.org_name;
111 g_old_rec.job_title := g_clob_old_rec.job_title;
112 --
113 g_old_rec.org_description
114 := dbms_lob.substr(g_clob_old_rec.org_description);
115 g_old_rec.brief_description
116 := dbms_lob.substr(g_clob_old_rec.brief_description);
117 g_old_rec.detailed_description
118 := dbms_lob.substr(g_clob_old_rec.detailed_description);
119 g_old_rec.job_requirements
120 := dbms_lob.substr(g_clob_old_rec.job_requirements);
121 g_old_rec.additional_details
122 := dbms_lob.substr(g_clob_old_rec.additional_details);
123 g_old_rec.how_to_apply
124 := dbms_lob.substr(g_clob_old_rec.how_to_apply);
125 g_old_rec.benefit_info
126 := dbms_lob.substr(g_clob_old_rec.benefit_info);
127 g_old_rec.image_url
128 := dbms_lob.substr(g_clob_old_rec.image_url);
129 g_old_rec.image_url_alt
130 := dbms_lob.substr(g_clob_old_rec.image_url_alt);
131 --
132 l_fct_ret := true;
133 End If;
134 End If;
135 Return (l_fct_ret);
136 --
137 End api_updating;
138 --
139 -- ----------------------------------------------------------------------------
140 -- |---------------------------------< lck >----------------------------------|
141 -- ----------------------------------------------------------------------------
142 Procedure lck
143 (p_posting_content_id in number
144 ,p_language in varchar2
145 ) is
146 --
147 -- Cursor selects the 'current' row from the HR Schema
148 --
149 Cursor C_Sel1 is
150 select
151 posting_content_id
152 ,language
153 ,source_language
154 ,name
155 ,org_name
156 ,org_description
157 ,job_title
158 ,brief_description
159 ,detailed_description
160 ,job_requirements
161 ,additional_details
162 ,how_to_apply
163 ,benefit_info
164 ,image_url
165 ,image_url_alt
166 from irc_posting_contents_tl
167 where posting_content_id = p_posting_content_id
168 and language = p_language
169 for update nowait;
170 --
171 l_proc varchar2(72) := g_package||'lck';
172 --
173 Begin
174 hr_utility.set_location('Entering:'||l_proc, 5);
175 --
176 hr_api.mandatory_arg_error
177 (p_api_name => l_proc
178 ,p_argument => 'POSTING_CONTENT_ID'
179 ,p_argument_value => p_posting_content_id
180 );
181 hr_utility.set_location(l_proc,6);
182 hr_api.mandatory_arg_error
183 (p_api_name => l_proc
184 ,p_argument => 'LANGUAGE'
185 ,p_argument_value => p_language
186 );
187 --
188 Open C_Sel1;
189 Fetch C_Sel1 Into irc_ipt_shd.g_clob_old_rec;
190 If C_Sel1%notfound then
191 Close C_Sel1;
192 --
193 -- The primary key is invalid therefore we must error
194 --
195 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
196 fnd_message.raise_error;
197 End If;
198 Close C_Sel1;
199 --
200 -- Convert clob structure to varchar
201 g_old_rec.posting_content_id := g_clob_old_rec.posting_content_id;
202 g_old_rec.language := g_clob_old_rec.language;
203 g_old_rec.source_language := g_clob_old_rec.source_language;
204 g_old_rec.name := g_clob_old_rec.name;
205 g_old_rec.org_name := g_clob_old_rec.org_name;
206 g_old_rec.job_title := g_clob_old_rec.job_title;
207 --
208 g_old_rec.org_description
209 := dbms_lob.substr(g_clob_old_rec.org_description);
210 g_old_rec.brief_description
211 := dbms_lob.substr(g_clob_old_rec.brief_description);
212 g_old_rec.detailed_description
213 := dbms_lob.substr(g_clob_old_rec.detailed_description);
214 g_old_rec.job_requirements
215 := dbms_lob.substr(g_clob_old_rec.job_requirements);
216 g_old_rec.additional_details
217 := dbms_lob.substr(g_clob_old_rec.additional_details);
218 g_old_rec.how_to_apply
219 := dbms_lob.substr(g_clob_old_rec.how_to_apply);
220 g_old_rec.benefit_info
221 := dbms_lob.substr(g_clob_old_rec.benefit_info);
222 g_old_rec.image_url
223 := dbms_lob.substr(g_clob_old_rec.image_url);
224 g_old_rec.image_url_alt
225 := dbms_lob.substr(g_clob_old_rec.image_url_alt);
226 --
227 --
228 hr_utility.set_location(' Leaving:'||l_proc, 10);
229 --
230 -- We need to trap the ORA LOCK exception
231 --
232 Exception
233 When HR_Api.Object_Locked then
234 --
235 -- The object is locked therefore we need to supply a meaningful
236 -- error message.
237 --
238 fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');
239 fnd_message.set_token('TABLE_NAME', 'irc_posting_contents_tl');
240 fnd_message.raise_error;
241 End lck;
242 --
243 -- ----------------------------------------------------------------------------
244 -- |----------------------------< add_language >------------------------------|
245 -- ----------------------------------------------------------------------------
246 procedure add_language
247 is
248 begin
249 delete from IRC_POSTING_CONTENTS_TL T
250 where not exists
251 (select NULL
252 from IRC_POSTING_CONTENTS B
253 where B.POSTING_CONTENT_ID = T.POSTING_CONTENT_ID
254 );
255 update IRC_POSTING_CONTENTS_TL T set (
256 NAME,
257 ORG_NAME,
258 ORG_DESCRIPTION,
259 JOB_TITLE,
260 BRIEF_DESCRIPTION,
261 DETAILED_DESCRIPTION,
262 JOB_REQUIREMENTS,
263 ADDITIONAL_DETAILS,
264 HOW_TO_APPLY,
265 BENEFIT_INFO,
266 IMAGE_URL,
267 IMAGE_URL_ALT
268 ) = (select
269 B.NAME,
270 B.ORG_NAME,
271 B.ORG_DESCRIPTION,
272 B.JOB_TITLE,
273 B.BRIEF_DESCRIPTION,
274 B.DETAILED_DESCRIPTION,
275 B.JOB_REQUIREMENTS,
276 B.ADDITIONAL_DETAILS,
277 B.HOW_TO_APPLY,
278 B.BENEFIT_INFO,
279 B.IMAGE_URL,
280 B.IMAGE_URL_ALT
281 from IRC_POSTING_CONTENTS_TL B
282 where B.POSTING_CONTENT_ID = T.POSTING_CONTENT_ID
283 and B.LANGUAGE = T.SOURCE_LANGUAGE)
284 where (
285 T.POSTING_CONTENT_ID,
286 T.LANGUAGE
287 ) in (select
288 SUBT.POSTING_CONTENT_ID,
289 SUBT.LANGUAGE
290 from IRC_POSTING_CONTENTS_TL SUBB, IRC_POSTING_CONTENTS_TL SUBT
291 where SUBB.POSTING_CONTENT_ID = SUBT.POSTING_CONTENT_ID
292 and SUBB.LANGUAGE = SUBT.SOURCE_LANGUAGE
293 and (SUBB.NAME <> SUBT.NAME
294 or SUBB.ORG_NAME <> SUBT.ORG_NAME
295 or (SUBB.ORG_NAME is null and SUBT.ORG_NAME is not null)
296 or (SUBB.ORG_NAME is not null and SUBT.ORG_NAME is null)
297 or dbms_lob.compare(SUBB.ORG_DESCRIPTION ,SUBT.ORG_DESCRIPTION) = 0
298 or (SUBB.ORG_DESCRIPTION is null and SUBT.ORG_DESCRIPTION is not null)
299 or (SUBB.ORG_DESCRIPTION is not null and SUBT.ORG_DESCRIPTION is null)
300 or SUBB.JOB_TITLE <> SUBT.JOB_TITLE
301 or (SUBB.JOB_TITLE is null and SUBT.JOB_TITLE is not null)
302 or (SUBB.JOB_TITLE is not null and SUBT.JOB_TITLE is null)
303 or dbms_lob.compare(SUBB.BRIEF_DESCRIPTION , SUBT.BRIEF_DESCRIPTION) = 0
304 or (SUBB.BRIEF_DESCRIPTION is null and SUBT.BRIEF_DESCRIPTION is not
305 null)
306 or (SUBB.BRIEF_DESCRIPTION is not null and SUBT.BRIEF_DESCRIPTION
307 is null)
308 or dbms_lob.compare(SUBB.DETAILED_DESCRIPTION
309 , SUBT.DETAILED_DESCRIPTION) = 0
310 or (SUBB.DETAILED_DESCRIPTION is null and SUBT.DETAILED_DESCRIPTION
311 is not null)
312 or (SUBB.DETAILED_DESCRIPTION is not null and SUBT.DETAILED_DESCRIPTION
313 is null)
314 or dbms_lob.compare(SUBB.JOB_REQUIREMENTS , SUBT.JOB_REQUIREMENTS) = 0
315 or (SUBB.JOB_REQUIREMENTS is null and SUBT.JOB_REQUIREMENTS
316 is not null)
317 or (SUBB.JOB_REQUIREMENTS is not null and SUBT.JOB_REQUIREMENTS
318 is null)
319 or dbms_lob.compare(SUBB.ADDITIONAL_DETAILS,SUBT.ADDITIONAL_DETAILS) = 0
320 or (SUBB.ADDITIONAL_DETAILS is null and SUBT.ADDITIONAL_DETAILS
321 is not null)
322 or (SUBB.ADDITIONAL_DETAILS is not null and SUBT.ADDITIONAL_DETAILS
323 is null)
324 or dbms_lob.compare(SUBB.HOW_TO_APPLY,SUBT.HOW_TO_APPLY) = 0
325 or (SUBB.HOW_TO_APPLY is null and SUBT.HOW_TO_APPLY
326 is not null)
327 or (SUBB.HOW_TO_APPLY is not null and SUBT.HOW_TO_APPLY is null)
328 or dbms_lob.compare(SUBB.BENEFIT_INFO,SUBT.BENEFIT_INFO) = 0
329 or (SUBB.BENEFIT_INFO is null and SUBT.BENEFIT_INFO is not null)
330 or (SUBB.BENEFIT_INFO is not null and SUBT.BENEFIT_INFO is null)
331 or dbms_lob.compare(SUBB.IMAGE_URL,SUBT.IMAGE_URL) = 0
332 or (SUBB.IMAGE_URL is null and SUBT.IMAGE_URL is not null)
333 or (SUBB.IMAGE_URL is not null and SUBT.IMAGE_URL is null)
334 or dbms_lob.compare(SUBB.IMAGE_URL_ALT , SUBT.IMAGE_URL_ALT) = 0
335 or (SUBB.IMAGE_URL_ALT is null and SUBT.IMAGE_URL_ALT is not null)
336 or (SUBB.IMAGE_URL_ALT is not null and SUBT.IMAGE_URL_ALT is null)
337 ));
338 insert into IRC_POSTING_CONTENTS_TL (
339 POSTING_CONTENT_ID,
340 SOURCE_LANGUAGE,
341 NAME,
342 ORG_NAME,
343 ORG_DESCRIPTION,
344 JOB_TITLE,
345 BRIEF_DESCRIPTION,
346 DETAILED_DESCRIPTION,
347 JOB_REQUIREMENTS,
348 ADDITIONAL_DETAILS,
349 HOW_TO_APPLY,
350 BENEFIT_INFO,
351 IMAGE_URL,
352 IMAGE_URL_ALT,
353 LANGUAGE
354 ) select
355 B.POSTING_CONTENT_ID,
356 B.SOURCE_LANGUAGE,
357 B.NAME,
358 B.ORG_NAME,
359 B.ORG_DESCRIPTION,
360 B.JOB_TITLE,
361 B.BRIEF_DESCRIPTION,
362 B.DETAILED_DESCRIPTION,
363 B.JOB_REQUIREMENTS,
364 B.ADDITIONAL_DETAILS,
365 B.HOW_TO_APPLY,
366 B.BENEFIT_INFO,
367 B.IMAGE_URL,
368 B.IMAGE_URL_ALT,
369 L.LANGUAGE_CODE
370 from IRC_POSTING_CONTENTS_TL B, FND_LANGUAGES L
371 where L.INSTALLED_FLAG in ('I', 'B')
372 and B.LANGUAGE = userenv('LANG')
373 and not exists
374 (select NULL
375 from IRC_POSTING_CONTENTS_TL T
376 where T.POSTING_CONTENT_ID = B.POSTING_CONTENT_ID
377 and T.LANGUAGE = L.LANGUAGE_CODE);
378 end add_language;
379 -- ----------------------------------------------------------------------------
380 -- |-----------------------------< convert_args >-----------------------------|
381 -- ----------------------------------------------------------------------------
382 Function convert_args
383 (p_posting_content_id in number
384 ,p_language in varchar2
385 ,p_source_language in varchar2
386 ,p_name in varchar2
387 ,p_org_name in varchar2
388 ,p_org_description in varchar2
389 ,p_job_title in varchar2
390 ,p_brief_description in varchar2
391 ,p_detailed_description in varchar2
392 ,p_job_requirements in varchar2
393 ,p_additional_details in varchar2
394 ,p_how_to_apply in varchar2
395 ,p_benefit_info in varchar2
396 ,p_image_url in varchar2
397 ,p_image_url_alt in varchar2
398 )
399 Return g_rec_type is
400 --
401 l_rec g_rec_type;
402 --
403 Begin
404 --
405 -- Convert arguments into local l_rec structure.
406 --
407 l_rec.posting_content_id := p_posting_content_id;
408 l_rec.language := p_language;
412 l_rec.org_description := p_org_description;
409 l_rec.source_language := p_source_language;
410 l_rec.name := p_name;
411 l_rec.org_name := p_org_name;
413 l_rec.job_title := p_job_title;
414 l_rec.brief_description := p_brief_description;
415 l_rec.detailed_description := p_detailed_description;
416 l_rec.job_requirements := p_job_requirements;
417 l_rec.additional_details := p_additional_details;
418 l_rec.how_to_apply := p_how_to_apply;
419 l_rec.benefit_info := p_benefit_info;
420 l_rec.image_url := p_image_url;
421 l_rec.image_url_alt := p_image_url_alt;
422 --
423 -- Return the plsql record structure.
424 --
425 Return(l_rec);
426 --
427 End convert_args;
428 -- ----------------------------------------------------------------------------
429 -- |------------------------------< clob_dml >--------------------------------|
430 -- ----------------------------------------------------------------------------
431 Procedure clob_dml
432 (p_rec in out nocopy irc_ipt_shd.g_rec_type
433 ,p_api_updating boolean
434 ) is
435 --
436 l_proc varchar2(72) := g_package||'clob_dml';
437 --
438 cursor get_rec is
439 select
440 org_description
441 ,brief_description
442 ,detailed_description
443 ,job_requirements
444 ,additional_details
445 ,how_to_apply
446 ,benefit_info
447 ,image_url
448 ,image_url_alt
449 from irc_posting_contents_tl
450 where posting_content_id = p_rec.posting_content_id
451 and language = p_rec.language;
452 --
453 l_org_description irc_posting_contents_tl.org_description%type;
454 l_brief_description irc_posting_contents_tl.brief_description%type;
455 l_detailed_description irc_posting_contents_tl.detailed_description%type;
456 l_job_requirements irc_posting_contents_tl.job_requirements%type;
457 l_additional_details irc_posting_contents_tl.additional_details%type;
458 l_how_to_apply irc_posting_contents_tl.how_to_apply%type;
459 l_benefit_info irc_posting_contents_tl.benefit_info%type;
460 l_image_url irc_posting_contents_tl.image_url%type;
461 l_image_url_alt irc_posting_contents_tl.image_url_alt%type;
462 --
463 l_api_updating boolean;
464 --
465 Begin
466 hr_utility.set_location('Entering:'||l_proc, 5);
467 --
468 open get_rec;
469 fetch get_rec into
470 l_org_description
471 ,l_brief_description
472 ,l_detailed_description
473 ,l_job_requirements
474 ,l_additional_details
475 ,l_how_to_apply
476 ,l_benefit_info
477 ,l_image_url
478 ,l_image_url_alt;
479 if get_rec%notfound then
480 close get_rec;
481 fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
482 fnd_message.raise_error;
483 end if;
484 close get_rec;
485 --
486 l_api_updating:=p_api_updating;
487 --
488 hr_utility.set_location(l_proc, 10);
489 --
490 if (g_org_description_upd
491 and l_api_updating
492 and dbms_lob.getlength(l_org_description)<=32767
493 and dbms_lob.instr(l_org_description,p_rec.org_description)<>1)
494 or (not l_api_updating
495 and p_rec.org_description is not null) then
496 dbms_lob.trim(l_org_description,0);
497 dbms_lob.write(l_org_description
498 ,length(p_rec.org_description)
499 ,1
500 ,p_rec.org_description);
501 end if;
502 --
503 hr_utility.set_location(l_proc, 20);
504 --
505 if (g_brief_description_upd
506 and l_api_updating
507 and dbms_lob.getlength(l_brief_description)<=32767
508 and dbms_lob.instr(l_brief_description,p_rec.brief_description)<>1)
509 or (not l_api_updating
510 and p_rec.brief_description is not null) then
511 dbms_lob.trim(l_brief_description,0);
512 dbms_lob.write(l_brief_description
513 ,length(p_rec.brief_description)
514 ,1
515 ,p_rec.brief_description);
516 end if;
517 --
518 hr_utility.set_location(l_proc, 30);
519 --
520 if (g_detailed_description_upd
521 and l_api_updating
522 and dbms_lob.getlength(l_detailed_description)<=32767
523 and dbms_lob.instr(l_detailed_description,p_rec.detailed_description)<>1)
524 or (not l_api_updating
525 and p_rec.detailed_description is not null) then
526 dbms_lob.trim(l_detailed_description,0);
527 dbms_lob.write(l_detailed_description
528 ,length(p_rec.detailed_description)
529 ,1
530 ,p_rec.detailed_description);
531 end if;
532 --
533 hr_utility.set_location(l_proc, 40);
534 --
535 if (g_job_requirements_upd
536 and l_api_updating
537 and dbms_lob.getlength(l_job_requirements)<=32767
538 and dbms_lob.instr(l_job_requirements,p_rec.job_requirements)<>1)
539 or (not l_api_updating
540 and p_rec.job_requirements is not null) then
541 dbms_lob.trim(l_job_requirements,0);
542 dbms_lob.write(l_job_requirements
546 end if;
543 ,length(p_rec.job_requirements)
544 ,1
545 ,p_rec.job_requirements);
547 --
548 hr_utility.set_location(l_proc, 50);
549 --
550 if (g_additional_details_upd
551 and l_api_updating
552 and dbms_lob.getlength(l_additional_details)<=32767
553 and dbms_lob.instr(l_additional_details,p_rec.additional_details)<>1)
554 or (not l_api_updating
555 and p_rec.additional_details is not null) then
556 dbms_lob.trim(l_additional_details,0);
557 dbms_lob.write(l_additional_details
558 ,length(p_rec.additional_details)
559 ,1
560 ,p_rec.additional_details);
561 end if;
562 --
563 hr_utility.set_location(l_proc, 60);
564 --
565 if (g_how_to_apply_upd
566 and l_api_updating
567 and dbms_lob.getlength(l_how_to_apply)<=32767
568 and dbms_lob.instr(l_how_to_apply,p_rec.how_to_apply)<>1)
569 or (not l_api_updating
570 and p_rec.how_to_apply is not null) then
571 dbms_lob.trim(l_how_to_apply,0);
572 dbms_lob.write(l_how_to_apply
573 ,length(p_rec.how_to_apply)
574 ,1
575 ,p_rec.how_to_apply);
576 end if;
577 --
578 hr_utility.set_location(l_proc, 70);
579 --
580 if (g_benefit_info_upd
581 and l_api_updating
582 and dbms_lob.getlength(l_benefit_info)<=32767
583 and dbms_lob.instr(l_benefit_info,p_rec.benefit_info)<>1)
584 or (not l_api_updating
585 and p_rec.benefit_info is not null) then
586 dbms_lob.trim(l_benefit_info,0);
587 dbms_lob.write(l_benefit_info
588 ,length(p_rec.benefit_info)
589 ,1
590 ,p_rec.benefit_info);
591 end if;
592 --
593 hr_utility.set_location(l_proc, 80);
594 --
595 if (g_image_url_upd
596 and l_api_updating
597 and dbms_lob.getlength(l_image_url)<=32767
598 and dbms_lob.instr(l_image_url,p_rec.image_url)<>1)
599 or (not l_api_updating
600 and p_rec.image_url is not null) then
601 dbms_lob.trim(l_image_url,0);
602 dbms_lob.write(l_image_url
603 ,length(p_rec.image_url)
604 ,1
605 ,p_rec.image_url);
606 end if;
607 --
608 hr_utility.set_location(l_proc, 90);
609 --
610 if (g_image_url_alt_upd
611 and l_api_updating
612 and dbms_lob.getlength(l_image_url_alt)<=32767
613 and dbms_lob.instr(l_image_url_alt,p_rec.image_url_alt)<>1)
614 or (not l_api_updating
615 and p_rec.image_url_alt is not null) then
616 dbms_lob.trim(l_image_url_alt,0);
617 dbms_lob.write(l_image_url_alt
618 ,length(p_rec.image_url_alt)
619 ,1
620 ,p_rec.image_url_alt);
621 end if;
622 --
623 hr_utility.set_location(' Leaving:'||l_proc, 100);
624 --
625 Exception
626 When hr_api.check_integrity_violated Then
627 -- A check constraint has been violated
628 --
629 irc_ipt_shd.constraint_error
630 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
631 When hr_api.parent_integrity_violated Then
632 -- Parent integrity has been violated
633 --
634 irc_ipt_shd.constraint_error
635 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
636 When hr_api.unique_integrity_violated Then
637 -- Unique integrity has been violated
638 --
639 irc_ipt_shd.constraint_error
640 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
641 When Others Then
642 --
643 Raise;
644 End clob_dml;
645 --
646 --
647 end irc_ipt_shd;