REM *************************************************************************** REM Hand-carved package body for VIEW LINK END created on 23-FEB-99 REM *************************************************************************** CREATE OR REPLACE PACKAGE BODY cihvle IS -- Generic post-process routines PROCEDURE check_delete(id number); sac_type constant varchar2(6) := 'VLE'; pac_type constant varchar2(6) := 'VLI'; -- save view link id if view link end is deleted pview_link_id number; --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id number, pl in out NOCOPY cioview_link_end.data) IS BEGIN -- Access rights for view link end derive from the view link -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_access_rights(pl.v.view_link_reference,pac_type, -- 'UPD','SHR'); -- 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; end if; END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id number) IS BEGIN -- Access rights for view link end derive from the view link -- 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); select view_link_reference into pview_link_id from ci_view_link_ends vle where vle.id = pre_process.id; end if; END; --===================== POST-PROCESS (INS,UPD,SEL) ==========================-- PROCEDURE post_process(operation varchar2,id number, pl cioview_link_end.data) IS BEGIN null; END; --========================= POST PROCESS (DEL, LCK) ==============================-- PROCEDURE post_process(operation varchar2,id number) IS BEGIN -- need to delete the view link if one end is deleted -- this in turn will cascade delete the other view_link_end if operation = 'DEL' then cioview_link.del(pview_link_id); 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; /