rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\CIBRL.HPB 1.2 1998/12/30 14:50:23 loldham Exp $ rem Rem Copyright (c) 1996 by Oracle Corporation Rem NAME Rem cibrl.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 BASE RELATION LOCATION created on 02-MAY-96 REM *************************************************************************** CREATE OR REPLACE PACKAGE BODY cihbrl IS -- Generic post-process routines PROCEDURE check_delete(id number); str_type constant varchar2(6) := 'BRL'; part_type varchar2(6) ; use_type constant varchar2(6) := 'VWTAB'; part_reference number; --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id number, pl in out NOCOPY ciobase_relation_location.data) IS BEGIN part_reference := nvl(pl.v.VIEW_IMPLEMENTATION_REFERENCE, pl.v.SNAPSHOT_REFERENCE); if pl.v.VIEW_IMPLEMENTATION_REFERENCE is NULL then part_type := 'SNI'; else part_type := 'VWI'; end if; -- Perform INSERT-specific processing if operation = 'INS' then -- Check for existence of database and replication group -- elements if ciiutl.el_exists(part_reference,part_type) = false then ciierr.fatal(3500,'BASE RELATION LOCATION', ciiutl.nls_type_name_s(part_type), part_reference); end if; if ciiutl.el_exists(pl.v.relation_selection_reference,use_type) = false then ciierr.fatal(3500,'BASE RELATION LOCATION', ciiutl.nls_type_name_s(use_type), pl.v.relation_selection_reference); end if ; end if; -- Validate user-defined properties if cieval.is_extended then cieval.check_association(id,pl.v.types,(operation='UPD') ,part_reference ,pl.v.relation_selection_reference ,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; -- Access rights for brl derive from the relation_selection_reference -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_access_rights(part_reference, part_type,'UPD','SAC'); -- if operation = 'INS' then -- ciiacc.check_access_rights(pl.v.relation_selection_reference, -- use_type,'SEL','MM'); -- end if; -- Check that the brl with this relation_selection_reference and -- view/snapshot implementation doesn't already exist on insert -- CHECK REPLACED BY DEFERRED CONSTRAINT AT 4.0.6 if operation = 'INS' then -- Initialize unassigned properties with default values on INSERT pl.v.element_type_name := str_type; pl.i.element_type_name := true; if pl.i.snapshot_reference then pl.v.base_relation_location_for := 'SNI'; else pl.v.base_relation_location_for := 'VWI'; end if; pl.i.base_relation_location_for := true; end if; END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id number) IS BEGIN -- Access rights for brl derive from the view/snapshot implementation -- Access rights checking performed by triggers in config 4.0.9 -- if operation = 'DEL' then -- ciiacc.check_access_rights(id,str_type,'UPD','MM'); -- else -- ciiacc.check_access_rights(id,str_type,operation,'MM'); -- end if; -- 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 ciobase_relation_location.data) IS BEGIN null; END; --========================= POST PROCESS (DEL) ==============================-- PROCEDURE post_process(operation varchar2,id number) IS BEGIN null; 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; /