DBA Data[Home] [Help]

PACKAGE BODY: APPS.ECX_DTD_UTILS

Source


1 package body ecx_dtd_utils as
2 -- $Header: ECXDTDB.pls 120.2 2005/06/30 11:15:15 appldev ship $
3 
4 procedure ins
5 	(
6 	i_root_element	in	varchar2,
7 	i_filename	in	varchar2,
8 	i_location	in	varchar2 ,
9 	i_payload		in	clob,
10 	i_retcode		OUT	NOCOPY number,
11 	i_retmsg		OUT	NOCOPY varchar2
12 	)
13 is
14 begin
15 			delete 	from ecx_dtds
16 			where 	root_element = i_root_element
17 			and	( version = i_location or i_location is null )
18 			and	filename = i_filename;
19 
20 			insert into ecx_dtds
21 				(
22 				dtd_id,
23 				root_element,
24 				filename,
25 				version,
26 				payload
27 				)
28 			values
29 				(
30 				ecx_dtd_s.nextval,
31 				i_root_element,
32 				i_filename,
33 				i_location,
34 				i_payload
35 				);
36 i_retcode :=0;
37 i_retmsg :=' DTD Successfully loaded';
38 exception
39 when others then
40 	i_retcode :=2;
41 	i_retmsg := SQLERRM||'   DTD cannot be loaded';
42 end ins;
43 
44 procedure del
45 	(
46 	i_root_element	in	varchar2,
47 	i_filename	in	varchar2,
48 	i_location	in	varchar2,
49 	i_retcode		OUT	NOCOPY number,
50 	i_retmsg		OUT	NOCOPY varchar2
51 	)
52 is
53 begin
54 			delete 	from ecx_dtds
55 			where 	root_element = i_root_element
56 			and	filename = i_filename
57 			and	( version = i_location or i_location is null );
58 
59 i_retcode :=0;
60 i_retmsg :=' DTD Successfully Deleted';
61 exception
62 when others then
63 	i_retcode :=2;
64 	i_retmsg := SQLERRM ||'   DTD cannot be deleted';
65 end del;
66 
67 end ecx_dtd_utils;