rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\ciubi.hpb 1.2 1998/12/14 17:15:28 cvanes Exp $ rem Rem Copyright (c) 1996 by Oracle Corporation Rem NAME Rem ciubi.hpb - Rem DESCRIPTION Rem Rem RETURNS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem cvanes 07/10/96 - Creation REM *************************************************************************** REM Hand-carved package body for UNBOUND ITEM created on 10-JAN-96 REM *************************************************************************** CREATE OR REPLACE PACKAGE BODY cihubi IS -- Generic post-process routines PROCEDURE check_delete(id number); sac_type constant varchar2(6) := 'ITE'; --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id number, pl in out NOCOPY ciounbound_item.data) IS access_type varchar2(3); BEGIN -- Calculate the PAC reference which determines access control rights -- UBI may be within a SQS or an MUN -- Access rights checking performed by triggers in config 4.0.9 -- if pl.v.sql_query_set_reference IS NOT NULL then -- ciiacc.check_access_rights(pl.v.sql_query_set_reference,'SQS','UPD','SAC'); -- else -- Access control checks, need to use module ref for SMC and SLV -- select DECODE(mun.module_unit_subtype, -- 'RLV', 'SHR', -- 'RMC', 'SHR', -- 'SAC') -- into access_type -- from sdd_mun mun -- where mun.irid = pl.v.module_unit_reference; -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_access_rights(pl.v.module_unit_reference,'MUN','UPD',access_type); -- end if; -- 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 := sac_type; pl.i.element_type_name := true; pl.v.item_type := 'UBI'; pl.i.item_type := true; if pl.v.sql_query_set_reference is null then pl.v.item_for := 'MUN'; else pl.v.item_for := 'SQS'; end if; pl.i.item_for := true; if pl.i.usage_sequence = false then if pl.i.module_unit_reference then select nvl(max(usage_sequence),0) + 100 into pl.v.usage_sequence from ci_items ite where ite.module_unit_reference = pl.v.module_unit_reference; else select nvl(max(usage_sequence),0) + 100 into pl.v.usage_sequence from ci_items ite where ite.sql_query_set_reference = pl.v.sql_query_set_reference; end if; pl.i.usage_sequence := true; end if; end if; END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id number) IS BEGIN -- Access rights for unbound item derive from the module -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_access_rights(id,sac_type,operation,'SAC'); -- if operation is 'DELETE', make sure no non-cascading references exist if operation = 'DEL' then check_delete(id); end if; END; --===================== POST-PROCESS (INS,UPD,SEL) ==========================-- PROCEDURE post_process(operation varchar2,id number, pl ciounbound_item.data) IS BEGIN if operation = 'INS' or (operation = 'UPD' and pl.i.name = true) then -- Need to do a UID check on constarints rmman.log_change('CIHUBIU1',pl.v.id); end if; END; --========================= POST PROCESS (DEL) ==============================-- PROCEDURE post_process(operation varchar2,id number) IS BEGIN if operation = 'DEL' then -- Delete the unbound item and all it's related sub-bits ciiutl.delete_element(id,sac_type); end if; END; --============================= CHECK DELETE ================================-- PROCEDURE check_delete(id number) IS dummy number; error_count number := 0; BEGIN null; END; --================================== END ====================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END; /