prompt Package Header: jr_dependency create or replace package jr_dependency is type rid_rec is record (irid number , ivid number , parent_ivid number ); type rid_list is table of rid_rec; -- A flattened Uses *or* Used by handle. End in handle is supplier -- if a uses handle, client if a used_by handle. type handle_rec is record ( dependency_irid number , end_type_id number , end_irid number , end_ivid number , end_parent_ivid number , name_irid number , name_ivid number , name_domain_irid number , name_type_id number , accessible varchar2(1) , principal_name varchar2(1) ); type handle_list is table of handle_rec; ----------------------------------------------------- -- loadSuppliers load all suppliers for the given client object. -- Populates the global uses lists. -- param: i_workarea a WorkArea to look in for suppliers. -- param: i_client_type_id the type id of a client object -- to look for suppliers to. -- param: i_client_irid the irid of a client object to -- look for suppliers to. -- param: i_client_ivid the ivid of a client object to -- look for clients to. -- param i_of_type_id logical type id to restrict type of supplier to, if -- null then no restriction -- param i_of_gnd_id global name domain id to restrict type of supplier to, -- if null then no restriction. -- param i_incl_in_workarea deprectaed and ignored. In workarea is always -- included. -- param i_incl_out_of_workarea looks outside workarea for suppliers. -- param i_incl_out_of_repos includes names which are used but have no suppliers -- param: i_extra_workarea a second workarea to look for suppliers in. ----------------------------------------------------- procedure load_suppliers(i_workarea in number ,i_client_type_id in number ,i_client_irid in number ,i_client_ivid in number ,i_of_type_id in number default -1 ,i_of_gnd_id in number default -1 ,i_incl_in_workarea in varchar2 default 'Y' ,i_incl_out_of_workarea in varchar2 default 'Y' ,i_incl_out_of_repos in varchar2 default 'Y' ,i_extra_workarea in number default -1 ); ----------------------------------------------------- -- load_clients load all clients for the given supplier object. -- Populates the global uses lists. -- param: i_workarea a WorkArea to look in for clients. -- param: i_supplier_type_id the type id of a supplier object -- to look for clients of. -- param: i_supplier_irid the irid of a supplier object to -- look for clients of. -- param: i_supplier_ivid the ivid of a supplier object to -- look for clients of. -- param: i_incl_in_workarea deprecated and ignored: in workarea clients -- always included. -- param: i_incl_out_of_workarea deprecated and ignored: out of workarea -- clients never included. -- param: i_extra_workarea an extra workarea to look for clients in. ----------------------------------------------------- procedure load_clients(i_workarea in number ,i_supplier_type_id in number ,i_supplier_irid in number ,i_supplier_ivid in number ,i_of_type_id in number default -1 ,i_incl_in_workarea in varchar2 default 'Y' ,i_incl_out_of_workarea in varchar2 default 'Y' ,i_extra_workarea in number default -1 ); ------------------------------------------------- --- Allow calls from SQL -- WNDS: writes no database state -- WNPS: writes no package state ------------------------------------------------- ------------------------------------------------- -- Support function for dependency analysis report -- -- This function accepts parameters identifying a set of objects to analyse -- the dependencies of and populates the table sdd_dpnd_dar_result -- accordingly. ------------------------------------------------- -------------------------------------------------------------------------- -- jr_dar_produce_dependency_data -- Uses the passed parameters to fetch dependency information, and then to -- format it in a more reports-friendly way into the intermediate results -- table. -- -- This is the primary interface function. If anything in this package would -- go into a package spec, it would be this. -- -- param: i_workarea work area to look in. Required. -- param: i_container path of container to look in. Optional. -- param: i_recurse whether to recurse from specified root container. -- Required if i_container supplied. -- param: i_type_id type of objects to be analysed. Optional, null -- meaning everything. -- param: i_name name of objects to look for. Optional, null meaning -- everything. Wildcards permitted. -------------------------------------------------------------------------- procedure jr_dar_produce_dependency_data(i_workarea in number ,i_container in varchar2 default null ,i_type_id in number default null ,i_recurse in boolean default false ,i_name in varchar2 default null ); end; /