rem rem $Header: L:\\\\model\\repman40\\api\\RCS\\cisty.ipb 1.2 1998/12/14 20:47:22 cvanes Exp $ rem Rem Copyright (c) 1994 by Oracle Corporation Rem NAME Rem cisty.ipb - Rem DESCRIPTION Rem Rem RETURNS Rem Rem NOTES Rem Rem MODIFIED (MM/DD/YY) Rem aheath 07/11/94 - Creation REM ****************************************************************** REM Hand-carved package body 'ciisty' generated on 09-JUL-94 REM ****************************************************************** CREATE OR REPLACE PACKAGE BODY ciisty IS -- Return the type of the supertype of the specified element type. -- ref is only looked at for MUNs which can change from being SAC to PAC function supertype(type_of varchar2, ref number default null) return varchar2 is cursor c1 (short_name varchar2) is select rmt.short_name from rm_element_types rmt where rmt.short_name in ('SHR', 'SE', 'SAC', 'OSE', 'NSHR', 'MM', 'EL', 'APPXXX', 'CEL') connect by prior rmt.supertypes = rmt.id start with short_name = c1.short_name; mco_type varchar2(10); stype varchar2(10); begin if type_of in ('MUN', 'MCO', 'LOV') then select max(mun.module_unit_subtype) into mco_type from sdd_mun mun where mun.irid = supertype.ref; if substr(mco_type,1,1) = 'S' then -- It's specific (SPV or SMC) return('SAC'); else return('SHR'); end if; elsif type_of in ('RMC', 'RLV') then return('SHR'); elsif type_of in ('SMC', 'SLV', 'SUB') then return('SAC'); else -- We use this method to make sure we only get the first row returned -- on the tree walk. open c1(supertype.type_of); fetch c1 into stype; close c1; return(stype); end if; end supertype; --=================================== END ===================================-- -- -- Package instantiation block -- BEGIN is_installed := true; END ciisty; /