Rem NAME Rem cihentuie.pkb - Rem DESCRIPTION Rem Rem RETURNS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem jwetherb 10/20/94 - Auto-assign ATTRIBUTE_OR_RELATION Rem jwetherb 09/08/94 - substr -> substrb Rem aheath 07/08/94 - Creation Rem jwetherb 08/09/93 - Creation rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\cientuie.hpb 1.2 1998/10/09 11:35:21 jkchow Exp $ rem CREATE OR REPLACE PACKAGE BODY cihentuie IS -- Type-specific post-process routines str_type constant varchar2(6) := 'ENTUIE'; part_type constant varchar2(3) := 'UID'; --======================== PRE-PROCESS (INS,UPD) ============================-- PROCEDURE pre_process(operation varchar2,id rm.reference, pl in out NOCOPY ciounique_identifier_entry.data) IS use_type varchar2(6); use_ref number; use_column varchar2(30); BEGIN if pl.v.attribute_reference is not null then use_type := 'ATT'; use_ref := pl.v.attribute_reference; use_column := ciiutl.nls_property_name('UNIQUE_IDENTIFIER_ENTRY', 'ATTRIBUTE_REFERENCE'); else use_type := 'RELEND'; use_ref := pl.v.relationship_end_reference; use_column := ciiutl.nls_property_name('UNIQUE_IDENTIFIER_ENTRY', 'RELATIONSHIP_END_REFERENCE'); end if; if operation = 'INS' then -- Check for existence of uid and attribute or relationship end if ciiutl.el_exists(pl.v.unique_identifier_reference,part_type) = false then ciierr.fatal(3500,ciiutl.nls_type_name('UNIQUE_IDENTIFIER_ENTRY'), ciiutl.nls_property_name('UNIQUE_IDENTIFIER_ENTRY', 'UNIQUE_IDENTIFIER_REFERENCE'), pl.v.unique_identifier_reference); end if; if ciiutl.el_exists(use_ref,use_type) = false then ciierr.fatal(3500,ciiutl.nls_type_name('UNIQUE_IDENTIFIER_ENTRY'), use_column, use_ref); end if; else if ciiutl.el_exists(id,str_type) = false then ciierr.fatal(3504,ciiutl.nls_type_name('UNIQUE_IDENTIFIER_ENTRY'),id); end if; end if; -- Access rights for index entry derive from the -- ENTUIE's UID -- Access rights checking performed by triggers in config 4.0.9 -- ciiacc.check_access_rights(pl.v.unique_identifier_reference,part_type, -- 'UPD','SAC'); -- if operation = 'INS' then -- ciiacc.check_access_rights(use_ref, use_type,'SEL','SAC'); -- end if; -- Validate user-defined properties if cieval.is_extended then cieval.check_association(id,pl.v.types,(operation='UPD') ,pl.v.unique_identifier_reference ,use_ref ,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; 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; -- Maintain the arc descriminator and pl.v.attribute_or_relation := substr(use_type,1,1); -- 'A' or 'R' pl.i.attribute_or_relation := true; if pl.i.sequence_within_uid = false then -- Don't pass use_of, as seq must increment with every use of the uid pl.v.sequence_within_uid := ciiexp.default_str_seq(null, pl.v.unique_identifier_reference, str_type, NULL, 'UNIQUE_IDENTIFIER_REF'); pl.i.sequence_within_uid := true; end if; end if; END; --======================== PRE-PROCESS (DEL,SEL) ============================-- PROCEDURE pre_process(operation varchar2,id rm.reference) IS pac_reference rm.reference; BEGIN -- Access rights for entuie derive from the UID -- Access rights checking performed by triggers in config 4.0.9 /* if operation = 'DEL' then ciiacc.check_access_rights(id,'UID','UPD','SAC'); else ciiacc.check_access_rights(id,str_type,operation,'OSE'); end if; */ null; END; --===================== POST-PROCESS (INS,UPD,SEL) ==========================-- PROCEDURE post_process(operation varchar2,id rm.reference, pl in out NOCOPY ciounique_identifier_entry.data) IS BEGIN null; END; --========================= POST PROCESS (DEL) ==============================-- PROCEDURE post_process(operation varchar2,id rm.reference) IS BEGIN null; END; --================================== END ====================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END; /