-- jr_reg_ver -- Helper package to support versioning of registered objects prompt Package Header : jr_reg_ver create or replace package jr_reg_ver is ---------------------------------------------------------------------------------------- -- populate_parent_info -- -- Some objects are secondary objects but have no owning foreign key to their owner(s). -- This is true for objects like rm_text_lines which can be for any element type. When -- rows are inserted into rm_text_lines, the caller must specify the element type short -- name for which text is begin created. -- eg. creating text for an entity, the short_name will be defined as 'ENT'. -- A before insert trigger on rm_text_lines will call this method with the value of the -- join column to the element (txt_ref in this example). -- This procedure returns the correct pac_ref and parent_ivid for the element for which -- text is being created. ---------------------------------------------------------------------------------------- procedure populate_parent_info ( ofk_column in number , short_name in varchar2 , pac_ref out number , parent_ivid out number ); procedure populate_parent_info ( ofk_column in number , type_irid in number , pac_ref out number , parent_ivid out number ); ---------------------------------------------------------------------------------------- -- populate_parent_info_by_ivid -- -- CW 28-Mar-2000 -- Fix bug 1247864 support copy of elements from one version of an object to another -- version of the same object. Cannot use the method above as this use irid and queries -- using the version resolved views and hence cannot query parent info for objects -- which are not in the current workarea. -- Need to query the base table by ivid instead ---------------------------------------------------------------------------------------- procedure populate_parent_info_by_ivid ( owner_ivid in number , type_irid in number , pac_ref out number , parent_ivid out number ); -- Exception returned by populate_parent_info if Table implementing the Type cannot be found table_not_found_for_type exception; ---------------------------------------------------------------------------------------- -- vercopy_dependent_objects -- -- This method is called from all primary object version functions. It copies all those -- objects for which no owning foreign key exists. -- It will currently copy the following element types (tables) -- -- Type Table -- --------------------------- -------------------- -- user_preference sdd_upr -- preference_set_usage sdd_pru -- element_rule_usages sdd_eru -- tagged_value sdd_tagval -- extended_structure_element sdd_ues -- text rm_text_lines -- application_logic ck_application_logic ---------------------------------------------------------------------------------------- procedure vercopy_dependent_objects ( old_parent_ivid number , new_parent_ivid number ); ---------------------------------------------------------------------------------------- -- cpycopy_text -- -- This method copies text for any object ---------------------------------------------------------------------------------------- procedure cpycopy_text ( old_txt_ref number , old_parent_ivid number , new_txt_ref number , new_pac_ref number , new_parent_ivid number ); ---------------------------------------------------------------------------------------- -- cpycopy_dependent_objects -- -- This method is called from all primary object copy functions. It copies all those -- objects for which no owning foreign key exists. -- It will currently copy the same element types as for vercopy above ---------------------------------------------------------------------------------------- procedure cpycopy_dependent_objects ( old_irid number , old_parent_ivid number , new_irid number , new_pac_ref number , new_parent_ivid number , copy_text boolean default true ); ---------------------------------------------------------------------------------------- -- delete_dependencies -- Fix bug 907528 - Delete any dependecies (client/supplier) -- for speicific object version (pac or sac) ---------------------------------------------------------------------------------------- procedure delete_dependencies ( object_irid number , object_ivid number); ---------------------------------------------------------------------------------------- -- delete_dependent_objects -- -- Fix bug 881549, delete secondary objects with no ofk -- Call this method to delete prefs, text etc (see list above of what will be deleted) -- for any pac/sac object ---------------------------------------------------------------------------------------- procedure delete_dependent_objects ( object_irid number , parent_ivid number , table_name varchar2 default null ); ---------------------------------------------------------------------------------------- -- vercopy_dependencies -- Fix bug 993715, copy dependencies when an object is versioned ---------------------------------------------------------------------------------------- procedure vercopy_dependencies ( object_irid number , object_ivid number , new_object_ivid number , new_parent_ivid number default null , vercopy_deps_policy boolean default true ); ---------------------------------------------------------------------------------------- -- cpycopy_dependencies -- Fix bug 993715, copy dependencies when an object is copied ---------------------------------------------------------------------------------------- procedure cpycopy_dependencies ( object_irid number , object_ivid number , new_object_irid number , new_object_ivid number , new_parent_ivid number default null , cpycopy_deps_policy boolean default true ); end jr_reg_ver; /