rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\cioot.hpb 1.3 1998/10/09 12:30:42 jkchow Exp $ rem Rem Copyright (c) 1997 by Oracle Corporation Rem NAME Rem cioot.hpb - Rem DESCRIPTION Rem Rem RETURNS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem cvanes 06/19/97 - Creation REM *************************************************************************** REM Hand-carved package body for ORACLE OBJECT TYPE created on 19-MAY-97 REM *************************************************************************** CREATE OR REPLACE PACKAGE BODY cihoot IS pac_type constant varchar2(6) := 'ORT'; --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id number, pl in out NOCOPY ciooracle_object_type.data) IS BEGIN -- Validate user-defined properties if cieval.is_extended then cieval.check_element(id,pl.v.types,(operation='UPD') ,pl.v.user_defined_property_0,pl.i.user_defined_property_0 ,pl.v.user_defined_property_1,pl.i.user_defined_property_1 ,pl.v.user_defined_property_2,pl.i.user_defined_property_2 ,pl.v.user_defined_property_3,pl.i.user_defined_property_3 ,pl.v.user_defined_property_4,pl.i.user_defined_property_4 ,pl.v.user_defined_property_5,pl.i.user_defined_property_5 ,pl.v.user_defined_property_6,pl.i.user_defined_property_6 ,pl.v.user_defined_property_7,pl.i.user_defined_property_7 ,pl.v.user_defined_property_8,pl.i.user_defined_property_8 ,pl.v.user_defined_property_9,pl.i.user_defined_property_9 ,pl.v.user_defined_property_10,pl.i.user_defined_property_10 ,pl.v.user_defined_property_11,pl.i.user_defined_property_11 ,pl.v.user_defined_property_12,pl.i.user_defined_property_12 ,pl.v.user_defined_property_13,pl.i.user_defined_property_13 ,pl.v.user_defined_property_14,pl.i.user_defined_property_14 ,pl.v.user_defined_property_15,pl.i.user_defined_property_15 ,pl.v.user_defined_property_16,pl.i.user_defined_property_16 ,pl.v.user_defined_property_17,pl.i.user_defined_property_17 ,pl.v.user_defined_property_18,pl.i.user_defined_property_18 ,pl.v.user_defined_property_19,pl.i.user_defined_property_19 ); end if; -- Initialize unassigned properties with default values on INSERT if operation = 'INS' then pl.v.element_type_name := pac_type; pl.i.element_type_name := true; pl.v.ort_type := 'OOT'; pl.i.ort_type := true; end if; END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id number) IS del_plm integer; BEGIN null; END; --===================== POST-PROCESS (INS,UPD,SEL) ==========================-- PROCEDURE post_process(operation varchar2,id number, pl ciooracle_object_type.data) IS plm_pl cioplsql_module.data; plm_name varchar2(30); -- Candidate name for PLM BEGIN if operation = 'INS' then ciiutl.create_appxxx(pac_type,pl.v.id,pl.v.name); if cdapi.load_mode or ciiexp.global_copy_mode then return; end if; -- Create a TYPE BODY PLSQL_MODULE plm_pl.v.plsql_module_type := 'TYPE BODY'; plm_pl.i.plsql_module_type := true; plm_pl.v.oracle_object_type_reference := pl.v.id; plm_pl.i.oracle_object_type_reference := true; -- Prelimnary string shrunk due to 622299 CvE 27Feb98 plm_pl.v.purpose := 'Generated from OOT ' || pl.v.name; plm_pl.i.purpose := true; -- Take first 3 'ordinary' chars of OOT name concatenated with the last 14 numbers -- of the OOT ID which gives the first 17 chars of the PLM name plm_name := substrb(translate(pl.v.name,'_"','_'),1,3); -- PLM short_name is length 20, so this gives us 100 to choose from to add -- a suffix to make name unique in Repository - might break on extract/load plm_pl.v.short_name := plm_name || mod(pl.v.id, 100000000000000); plm_pl.i.short_name := true; cioplsql_module.ins(null, plm_pl); -- B926899 changed name uniqueness for performance ciiutl.name_mangle(plm_pl.v.id, pl.v.types); end if; if pl.i.name then -- check name is a valid ORACLE name if cihtbl.is_name_valid(pl.v.name) then ciierr.fatal(1003,ciiutl.identify(pl.v.id, pl.v.types),pl.v.name); end if; end if; -- B519103 CvE 21Feb98 if operation = 'UPD' and pl.i.name then cioapp_con_interface.traverse('CIHAPPCONU1',id,'APPORT'); end if; END; --========================= POST PROCESS (DEL) ==============================-- PROCEDURE post_process(operation varchar2,id number) IS BEGIN null; END; --============================= CHECK DELETE ================================-- -- Bug 867570 asks for all blocking checks to be removed -- --================================== END ====================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END; /