6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' hxc_mpc_bus.'; -- Global package name
9:
10: g_debug boolean := hr_utility.debug_enabled;
11: --
12: -- ----------------------------------------------------------------------------
13: -- |-----------------------< chk_non_updateable_args >------------------------|
14: -- ----------------------------------------------------------------------------
117: --
118: l_error varchar2(5) := NULL;
119: --
120: BEGIN
121: g_debug := hr_utility.debug_enabled;
122:
123: if g_debug then
124: l_proc := g_package||'chk_name';
125: hr_utility.set_location('Entering:'||l_proc, 5);
121: g_debug := hr_utility.debug_enabled;
122:
123: if g_debug then
124: l_proc := g_package||'chk_name';
125: hr_utility.set_location('Entering:'||l_proc, 5);
126: end if;
127: --
128: -- check that the mapping component name has been entered
129: --
129: --
130: IF p_name IS NULL
131: THEN
132: --
133: hr_utility.set_message(809, 'HXC_0021_MPC_MAPPING_NAME_MAND');
134: hr_utility.raise_error;
135: --
136: END IF;
137: if g_debug then
130: IF p_name IS NULL
131: THEN
132: --
133: hr_utility.set_message(809, 'HXC_0021_MPC_MAPPING_NAME_MAND');
134: hr_utility.raise_error;
135: --
136: END IF;
137: if g_debug then
138: hr_utility.set_location('Processing:'||l_proc, 10);
134: hr_utility.raise_error;
135: --
136: END IF;
137: if g_debug then
138: hr_utility.set_location('Processing:'||l_proc, 10);
139: end if;
140: --
141: -- check that mapping component name is unique
142: --
146: --
147: IF l_error IS NOT NULL
148: THEN
149: --
150: hr_utility.set_message(809, 'HXC_0022_MPC_DUP_MAPPING_NAME');
151: hr_utility.raise_error;
152: --
153: END IF;
154: --
147: IF l_error IS NOT NULL
148: THEN
149: --
150: hr_utility.set_message(809, 'HXC_0022_MPC_DUP_MAPPING_NAME');
151: hr_utility.raise_error;
152: --
153: END IF;
154: --
155: if g_debug then
152: --
153: END IF;
154: --
155: if g_debug then
156: hr_utility.set_location('Leaving:'||l_proc, 20);
157: end if;
158: --
159: END chk_name;
160: --
201: --
202: l_error varchar2(5) := NULL;
203: --
204: BEGIN
205: g_debug := hr_utility.debug_enabled;
206:
207: if g_debug then
208: l_proc := g_package||'chk_bld_blk_info_type_id';
209: hr_utility.set_location('Entering:'||l_proc, 5);
205: g_debug := hr_utility.debug_enabled;
206:
207: if g_debug then
208: l_proc := g_package||'chk_bld_blk_info_type_id';
209: hr_utility.set_location('Entering:'||l_proc, 5);
210: end if;
211:
212: -- if the bld_blk_category is null and the segment is ATTRIBUTE_CATEGORY
213: -- then no validation needed
221: --
222: IF p_bld_blk_info_type_id IS NULL
223: THEN
224: --
225: hr_utility.set_message(809, 'HXC_0023_MPC_BLD_BLK_CAT_MAND');
226: hr_utility.raise_error;
227: --
228: END IF;
229: if g_debug then
222: IF p_bld_blk_info_type_id IS NULL
223: THEN
224: --
225: hr_utility.set_message(809, 'HXC_0023_MPC_BLD_BLK_CAT_MAND');
226: hr_utility.raise_error;
227: --
228: END IF;
229: if g_debug then
230: hr_utility.set_location('Processing:'||l_proc, 10);
226: hr_utility.raise_error;
227: --
228: END IF;
229: if g_debug then
230: hr_utility.set_location('Processing:'||l_proc, 10);
231: end if;
232: --
233: -- check that building block category is valid
234: --
238: --
239: IF l_error IS NOT NULL
240: THEN
241: --
242: hr_utility.set_message(809, 'HXC_0024_MPC_BLD_BLK_CAT_INVLD');
243: hr_utility.raise_error;
244: --
245: END IF;
246:
239: IF l_error IS NOT NULL
240: THEN
241: --
242: hr_utility.set_message(809, 'HXC_0024_MPC_BLD_BLK_CAT_INVLD');
243: hr_utility.raise_error;
244: --
245: END IF;
246:
247: END IF;
246:
247: END IF;
248: --
249: if g_debug then
250: hr_utility.set_location('Leaving:'||l_proc, 20);
251: end if;
252: --
253: END chk_bld_blk_info_type_id;
254: --
297:
298: l_error varchar2(5) := NULL;
299: --
300: BEGIN
301: g_debug := hr_utility.debug_enabled;
302:
303: if g_debug then
304: l_proc := g_package||'chk_segment';
305: hr_utility.set_location('Entering:'||l_proc, 5);
301: g_debug := hr_utility.debug_enabled;
302:
303: if g_debug then
304: l_proc := g_package||'chk_segment';
305: hr_utility.set_location('Entering:'||l_proc, 5);
306: end if;
307: --
308: -- check that the segment has been entered
309: --
309: --
310: IF p_segment IS NULL
311: THEN
312: --
313: hr_utility.set_message(809, 'HXC_0025_MPC_SEGMENT_MAND');
314: hr_utility.raise_error;
315: --
316: END IF;
317: if g_debug then
310: IF p_segment IS NULL
311: THEN
312: --
313: hr_utility.set_message(809, 'HXC_0025_MPC_SEGMENT_MAND');
314: hr_utility.raise_error;
315: --
316: END IF;
317: if g_debug then
318: hr_utility.set_location('Processing:'||l_proc, 10);
314: hr_utility.raise_error;
315: --
316: END IF;
317: if g_debug then
318: hr_utility.set_location('Processing:'||l_proc, 10);
319: end if;
320:
321: IF ( p_segment <> 'ATTRIBUTE_CATEGORY' )
322: THEN
329: --
330: IF l_error IS NULL
331: THEN
332: --
333: hr_utility.set_message(809, 'HXC_0026_MPC_TYPE_INVALID');
334: hr_utility.raise_error;
335: --
336: END IF;
337: END IF;
330: IF l_error IS NULL
331: THEN
332: --
333: hr_utility.set_message(809, 'HXC_0026_MPC_TYPE_INVALID');
334: hr_utility.raise_error;
335: --
336: END IF;
337: END IF;
338: --
336: END IF;
337: END IF;
338: --
339: if g_debug then
340: hr_utility.set_location('Leaving:'||l_proc, 20);
341: end if;
342: --
343: END chk_segment;
344: --
392:
393: l_error varchar2(5) := NULL;
394: --
395: BEGIN
396: g_debug := hr_utility.debug_enabled;
397:
398: if g_debug then
399: l_proc := g_package||'chk_composite_key';
400: hr_utility.set_location('Entering:'||l_proc, 5);
396: g_debug := hr_utility.debug_enabled;
397:
398: if g_debug then
399: l_proc := g_package||'chk_composite_key';
400: hr_utility.set_location('Entering:'||l_proc, 5);
401: end if;
402: --
403:
404: -- check that segment is valid
409: --
410: IF l_error IS NOT NULL
411: THEN
412: --
413: hr_utility.set_message(809, 'HXC_0020_MPC_DUP_COMP_KEY');
414: hr_utility.raise_error;
415: --
416: END IF;
417: --
410: IF l_error IS NOT NULL
411: THEN
412: --
413: hr_utility.set_message(809, 'HXC_0020_MPC_DUP_COMP_KEY');
414: hr_utility.raise_error;
415: --
416: END IF;
417: --
418: if g_debug then
415: --
416: END IF;
417: --
418: if g_debug then
419: hr_utility.set_location('Leaving:'||l_proc, 20);
420: end if;
421: --
422: END chk_composite_key;
423: --
452: l_proc varchar2(72);
453:
454: --
455: BEGIN
456: g_debug := hr_utility.debug_enabled;
457:
458: if g_debug then
459: l_proc := g_package||'chk_field_name';
460: hr_utility.set_location('Entering:'||l_proc, 5);
456: g_debug := hr_utility.debug_enabled;
457:
458: if g_debug then
459: l_proc := g_package||'chk_field_name';
460: hr_utility.set_location('Entering:'||l_proc, 5);
461: end if;
462: --
463: -- check that the field name has been entered
464: --
464: --
465: IF p_field_name IS NULL
466: THEN
467: --
468: hr_utility.set_message(809, 'HXC_0027_MPC_FIELD_MAND');
469: hr_utility.raise_error;
470: --
471: END IF;
472: if g_debug then
465: IF p_field_name IS NULL
466: THEN
467: --
468: hr_utility.set_message(809, 'HXC_0027_MPC_FIELD_MAND');
469: hr_utility.raise_error;
470: --
471: END IF;
472: if g_debug then
473: hr_utility.set_location('Processing:'||l_proc, 10);
469: hr_utility.raise_error;
470: --
471: END IF;
472: if g_debug then
473: hr_utility.set_location('Processing:'||l_proc, 10);
474: end if;
475: --
476: -- check that the field name is not reserved
477: --
477: --
478: IF ( UPPER(p_field_name) IN ( 'RESOURCE_TYPE', 'RESOURCE_ID', 'COMMENT_TEXT', 'COMMENT' ) )
479: THEN
480: --
481: hr_utility.set_message(809, 'HXC_0019_MPC_SYSTEM_FIELD_NAME');
482: hr_utility.raise_error;
483: --
484: END IF;
485: --
478: IF ( UPPER(p_field_name) IN ( 'RESOURCE_TYPE', 'RESOURCE_ID', 'COMMENT_TEXT', 'COMMENT' ) )
479: THEN
480: --
481: hr_utility.set_message(809, 'HXC_0019_MPC_SYSTEM_FIELD_NAME');
482: hr_utility.raise_error;
483: --
484: END IF;
485: --
486: if g_debug then
483: --
484: END IF;
485: --
486: if g_debug then
487: hr_utility.set_location('Leaving:'||l_proc, 20);
488: end if;
489: --
490: END chk_field_name;
491: --
531: --
532: l_error varchar2(5) := NULL;
533: --
534: BEGIN
535: g_debug := hr_utility.debug_enabled;
536:
537: if g_debug then
538: l_proc := g_package||'chk_delete';
539: hr_utility.set_location('Entering:'||l_proc, 5);
535: g_debug := hr_utility.debug_enabled;
536:
537: if g_debug then
538: l_proc := g_package||'chk_delete';
539: hr_utility.set_location('Entering:'||l_proc, 5);
540: end if;
541: --
542: -- check that mapping component is not being used
543: --
545: FETCH csr_chk_mcu INTO l_error;
546: CLOSE csr_chk_mcu;
547: --
548: if g_debug then
549: hr_utility.set_location('Leaving:'||l_proc, 10);
550: end if;
551: --
552: IF l_error IS NOT NULL
553: THEN
551: --
552: IF l_error IS NOT NULL
553: THEN
554: --
555: hr_utility.set_message(809, 'HXC_0018_MPC_COMPONENT_USED');
556: hr_utility.raise_error;
557: --
558: END IF;
559: --
552: IF l_error IS NOT NULL
553: THEN
554: --
555: hr_utility.set_message(809, 'HXC_0018_MPC_COMPONENT_USED');
556: hr_utility.raise_error;
557: --
558: END IF;
559: --
560: if g_debug then
557: --
558: END IF;
559: --
560: if g_debug then
561: hr_utility.set_location('Leaving:'||l_proc, 20);
562: end if;
563: --
564: END chk_delete;
565: --
572: --
573: l_proc varchar2(72);
574: --
575: Begin
576: g_debug := hr_utility.debug_enabled;
577:
578: if g_debug then
579: l_proc := g_package||'insert_validate';
580: hr_utility.set_location('Entering:'||l_proc, 5);
576: g_debug := hr_utility.debug_enabled;
577:
578: if g_debug then
579: l_proc := g_package||'insert_validate';
580: hr_utility.set_location('Entering:'||l_proc, 5);
581: end if;
582: --
583: -- No business group context. HR_STANDARD_LOOKUPS used for validation.
584: -- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS.
588: chk_name ( p_name => p_rec.name,
589: p_mapping_component_id => p_rec.mapping_component_id );
590: --
591: if g_debug then
592: hr_utility.set_location('Processing:'||l_proc, 10);
593: end if;
594: --
595: chk_bld_blk_info_type_id ( p_bld_blk_info_type_id
596: => p_rec.bld_blk_info_type_id
596: => p_rec.bld_blk_info_type_id
597: , p_segment => p_rec.segment );
598: --
599: if g_debug then
600: hr_utility.set_location('Processing:'||l_proc, 20);
601: end if;
602: --
603: chk_segment ( p_bld_blk_info_type_id => p_rec.bld_blk_info_type_id
604: , p_segment => p_rec.segment );
603: chk_segment ( p_bld_blk_info_type_id => p_rec.bld_blk_info_type_id
604: , p_segment => p_rec.segment );
605: --
606: if g_debug then
607: hr_utility.set_location('Processing:'||l_proc, 30);
608: end if;
609: --
610: chk_field_name ( p_field_name => p_rec.field_name );
611: --
614: , p_bld_blk_info_type_id => p_rec.bld_blk_info_type_id
615: , p_segment => p_rec.segment );
616: --
617: if g_debug then
618: hr_utility.set_location('Processing:'||l_proc, 40);
619: --
620: hr_utility.set_location('Leaving:'||l_proc, 50);
621: end if;
622: End insert_validate;
616: --
617: if g_debug then
618: hr_utility.set_location('Processing:'||l_proc, 40);
619: --
620: hr_utility.set_location('Leaving:'||l_proc, 50);
621: end if;
622: End insert_validate;
623: --
624: -- ----------------------------------------------------------------------------
630: --
631: l_proc varchar2(72);
632: --
633: Begin
634: g_debug := hr_utility.debug_enabled;
635:
636: if g_debug then
637: l_proc := g_package||'update_validate';
638: hr_utility.set_location('Entering:'||l_proc, 5);
634: g_debug := hr_utility.debug_enabled;
635:
636: if g_debug then
637: l_proc := g_package||'update_validate';
638: hr_utility.set_location('Entering:'||l_proc, 5);
639: end if;
640: --
641: -- No business group context. HR_STANDARD_LOOKUPS used for validation.
642: -- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS.
649: chk_name ( p_name => p_rec.name,
650: p_mapping_component_id => p_rec.mapping_component_id );
651: --
652: if g_debug then
653: hr_utility.set_location('Processing:'||l_proc, 10);
654: end if;
655: --
656: chk_bld_blk_info_type_id ( p_bld_blk_info_type_id
657: => p_rec.bld_blk_info_type_id
657: => p_rec.bld_blk_info_type_id
658: , p_segment => p_rec.segment );
659: --
660: if g_debug then
661: hr_utility.set_location('Processing:'||l_proc, 20);
662: end if;
663: --
664: chk_segment ( p_bld_blk_info_type_id => p_rec.bld_blk_info_type_id
665: , p_segment => p_rec.segment );
664: chk_segment ( p_bld_blk_info_type_id => p_rec.bld_blk_info_type_id
665: , p_segment => p_rec.segment );
666: --
667: if g_debug then
668: hr_utility.set_location('Processing:'||l_proc, 30);
669: end if;
670: --
671: chk_field_name ( p_field_name => p_rec.field_name );
672: --
675: , p_bld_blk_info_type_id => p_rec.bld_blk_info_type_id
676: , p_segment => p_rec.segment );
677: --
678: if g_debug then
679: hr_utility.set_location('Processing:'||l_proc, 40);
680: end if;
681: --
682: chk_non_updateable_args
683: (p_rec => p_rec
683: (p_rec => p_rec
684: );
685: --
686: if g_debug then
687: hr_utility.set_location(' Leaving:'||l_proc, 50);
688: end if;
689: End update_validate;
690: --
691: -- ----------------------------------------------------------------------------
697: --
698: l_proc varchar2(72);
699: --
700: Begin
701: g_debug := hr_utility.debug_enabled;
702:
703: if g_debug then
704: l_proc := g_package||'delete_validate';
705: hr_utility.set_location('Entering:'||l_proc, 5);
701: g_debug := hr_utility.debug_enabled;
702:
703: if g_debug then
704: l_proc := g_package||'delete_validate';
705: hr_utility.set_location('Entering:'||l_proc, 5);
706: end if;
707: --
708: -- Call all supporting business operations
709: --
709: --
710: chk_delete (p_mapping_component_id => p_rec.mapping_component_id );
711: --
712: if g_debug then
713: hr_utility.set_location(' Leaving:'||l_proc, 10);
714: end if;
715: End delete_validate;
716: --
717: end hxc_mpc_bus;