rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\CIDSTDIT.HPB 1.2 1998/12/30 14:53:38 loldham Exp $ rem Rem Copyright (c) 1994 by Oracle Corporation Rem NAME Rem cidstdit.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 Datastore Data Item Usage created on 12-FEB-94 REM *************************************************************************** CREATE OR REPLACE PACKAGE BODY cihdstdit IS -- Generic pre-process routines PROCEDURE assign_insert_defaults(pl in out NOCOPY ciodatastore_data_item_usage.data); -- Type-specific post-process routines PROCEDURE check_delete(id rm.reference); str_type constant varchar2(6) := 'DSTDIT'; part_type constant varchar2(6) := 'DST'; use_type constant varchar2(6) := 'DIT'; --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id rm.reference, pl in out NOCOPY ciodatastore_data_item_usage.data) IS BEGIN -- Perform INSERT-specific processing if operation = 'INS' then -- Check for existence of datastore and data_item elements if ciiutl.el_exists(pl.v.datastore_reference,part_type) = false then ciierr.fatal(3500,'DATASTORE DATA ITEM USAGE','datastore', pl.v.datastore_reference); end if; if ciiutl.el_exists(pl.v.data_item_reference,use_type) = false then ciierr.fatal(3500,'DATASTORE DATA ITEM USAGE','data_item', pl.v.data_item_reference); end if ; else if ciiutl.el_exists(id,str_type) = false then ciierr.fatal(3504,ciiutl.nls_type_name('DATASTORE_DATA_ITEM_USAGE'),id); end if; end if; -- Access control checks -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_pac(pl.v.datastore_reference,part_type,'UPD'); -- if operation = 'INS' then -- ciiacc.check_pac(pl.v.data_item_reference,'DIT','SEL'); -- end if; -- Validate user-defined properties if cieval.is_extended then cieval.check_association(id,pl.v.types,(operation='UPD') ,pl.v.datastore_reference ,pl.v.data_item_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; -- Check that datastore_data_item_usage with this datastore and -- data_item 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 assign_insert_defaults(pl); end if; -- Assign denormalized and derived property values -- assign_derived_values(pl); END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id rm.reference) IS datastore_reference rm.reference; BEGIN -- Access rights for a Datastore_Data_Item_Usage derive from the referenced -- Datastore's rights -- Access rights checking performed by triggers in config 4.0.9 /* select max(ci.datastore_reference) into pre_process.datastore_reference from ci_datastore_data_item_usages ci where ci.id = pre_process.id; if operation = 'DEL' and datastore_reference is not null then ciiacc.check_pac(datastore_reference,part_type,'UPD'); else ciiacc.check_pac(datastore_reference,part_type,operation); end if; */ null; END; --===================== POST-PROCESS (INS,UPD,SEL) ==========================-- PROCEDURE post_process(operation varchar2,id rm.reference, pl ciodatastore_data_item_usage.data) IS BEGIN null; END; --========================= POST PROCESS (DEL) ==============================-- PROCEDURE post_process(operation varchar2,id rm.reference) IS BEGIN if operation = 'DEL' then -- Delete the Datastore_Data_Item_Usage and all it's related sub-bits ciiutl.delete_element(id,str_type); end if; END; --========================= ASSIGN INSERT DEFAULTS ==========================-- PROCEDURE assign_insert_defaults(pl in out NOCOPY ciodatastore_data_item_usage.data) IS BEGIN -- Assign miscellaneous initial default values pl.v.element_type_name := str_type; pl.i.element_type_name := true; END; /* --========================= CHECK FATAL CONSTRAINTS =========================-- PROCEDURE check_fatal_constraints(pl in out NOCOPY ciodatastore_data_item_usage.data) IS BEGIN null; END; --========================== ASSIGN DERIVED VALUES ==========================-- PROCEDURE assign_derived_values(pl in out NOCOPY ciodatastore_data_item_usage.data) IS BEGIN null; END; */ --============================= CHECK DELETE ================================-- PROCEDURE check_delete(id rm.reference) IS dummy varchar2(1); BEGIN -- Check if non-cascading associations and references exist null; END; --================================== END ====================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END; /