rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\cicco.hpb 1.3 1998/11/13 15:39:29 cvanes Exp $ rem Rem Copyright (c) 1994 by Oracle Corporation Rem NAME Rem cicco.hpb - Rem DESCRIPTION Rem Rem RETURNS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem aheath 07/08/94 - Creation REM *************************************************************************** REM Hand-carved package body for CHECK CONSTRAINT created on 06-SEP-94 REM *************************************************************************** CREATE OR REPLACE PACKAGE BODY cihcco IS -- Type-specific post-process routines PROCEDURE check_delete(id rm.reference); sac_type constant varchar2(6) := 'OCO'; pac_type constant varchar2(6) := 'TAB'; --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id rm.reference, pl in out NOCOPY ciocheck_constraint.data) IS BEGIN -- Access rights for check constraint derive from the table -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_access_rights(pl.v.table_reference,pac_type, -- 'UPD','SHR'); -- 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.constraint_type := 'CHECK'; pl.i.constraint_type := true; --#BEGIN end if; if pl.i.exception_table then -- replace spaces with underscores pl.v.exception_table := translate(pl.v.exception_table,' ','_'); end if; if pl.i.name then -- replace spaces with underscores cihtbl.remove_spaces(pl.v.name); --B631806 end if; --#END END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id rm.reference) IS BEGIN -- Access rights for check constraint derive from the table -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_access_rights(id,sac_type,operation,'SAC'); null; END; --===================== POST-PROCESS (INS,UPD,SEL) ==========================-- PROCEDURE post_process(operation varchar2,id rm.reference, pl ciocheck_constraint.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('CIHCCOU1',pl.v.id); 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; if operation = 'INS' then cihpco.create_cnus(pl.v.id, pl.v.table_reference); end if; END; --========================= POST PROCESS (DEL) ==============================-- PROCEDURE post_process(operation varchar2,id rm.reference) IS BEGIN if operation = 'DEL' then -- Delete the constraint and all it's related sub-bits ciiutl.delete_element(id,sac_type); end if; END; --============================= CHECK DELETE ================================-- PROCEDURE check_delete(id rm.reference) IS BEGIN null; END; --================================== END ====================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END; /