CREATE PACKAGE BODY "RELEASE_MANAGER"."PK_APP_UTILS" IS

/*
------------------------------
||  Last Modified:  S.Vukovic
||  Modified Date:  26/Apr/2005
||  Body Version:   1.0
------------------------------
*/


/*-------------------------------------------------------------------------------------------------------*/
PROCEDURE GET_CURRENT_PARAMETERS ( ProjId IN VARCHAR2, RtagId IN VARCHAR2, records OUT typeCur)   IS


BEGIN


	IF (NOT RtagId IS NULL) THEN
		-- Case with RTAG_ID present
		OPEN records FOR
		SELECT rt.PROJ_ID,
			   rt.RTAG_ID AS RTAG_ID
		  FROM RELEASE_TAGS rt
		 WHERE rt.RTAG_ID = TO_NUMBER(RtagId);

	ELSIF (NOT ProjId IS NULL) THEN
		-- Case with PROJ_ID present
		OPEN records FOR
		SELECT TO_NUMBER(ProjId) AS PROJ_ID,
			   -1 AS RTAG_ID
		  FROM DUAL;

	ELSE
		-- Case with none present
		OPEN records FOR
		SELECT -1 AS PROJ_ID,
			   -1 AS RTAG_ID
		  FROM DUAL;

	END IF;




   	--RETURN records;

END;
/*-------------------------------------------------------------------------------------------------------*/
END PK_APP_UTILS;
/
ALTER PACKAGE "RELEASE_MANAGER"."PK_APP_UTILS" 
  COMPILE BODY 
    PLSQL_OPTIMIZE_LEVEL=  2
    PLSQL_CODE_TYPE=  INTERPRETED
    PLSQL_DEBUG=  TRUE
 REUSE SETTINGS TIMESTAMP '2008-04-11 16:21:37'
/
