rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\CICQACOL.HPB 1.2 1998/12/30 14:51:36 loldham Exp $ rem Rem Copyright (c) 1997 by Oracle Corporation Rem NAME Rem cicqacol.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 ATTRIBUTE QUALIFIER created on 19-MAY-97 REM *************************************************************************** CREATE OR REPLACE PACKAGE BODY cihcqacol IS -- Generic post-process routines PROCEDURE check_delete(id number); str_type constant varchar2(6) := 'CQACOL'; part_type constant varchar2(6) := 'CQA'; use_type constant varchar2(6) := 'COL'; --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id number, pl in out NOCOPY cioattribute_qualifier.data) IS BEGIN -- Perform INSERT-specific processing if operation = 'INS' then -- Check for existence of column qualified attribute and column -- elements if ciiutl.el_exists(pl.v.cqa_reference,part_type) = false then ciierr.fatal(3500,'ATTRIBUTE QUALIFIER','column_qualified_attribute', pl.v.cqa_reference); end if; if ciiutl.el_exists(pl.v.column_reference,use_type) = false then ciierr.fatal(3500,'ATTRIBUTE QUALIFIER','column', pl.v.column_reference); end if ; end if; -- Access rights for attribute qualifier derive from the -- column qualified attribute's table definition -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_access_rights(pl.v.cqa_reference,part_type, -- 'UPD','SAC'); -- Check that attribute qualifier with this column_qualified_attribute and -- column 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.sequence = false then pl.v.sequence := ciiexp.default_str_seq(pl.v.cqa_reference, pl.v.column_reference, str_type); pl.i.sequence := true; end if; end if; END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id number) IS BEGIN -- Access rights for attribute qualifier derive from the -- column qualified attribute's table definition -- 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 cioattribute_qualifier.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; /