[Home] [Help]
PACKAGE BODY: APPS.IEM_SERVER_PUB_W
Source
1 package body iem_server_pub_w as
2 /* $Header: IEMVSVRB.pls 120.0 2005/06/02 13:50:41 appldev noship $ */
3 rosetta_g_mistake_date date := to_date('01/01/+4713', 'MM/DD/SYYYY');
4 rosetta_g_miss_date date := to_date('01/01/-4712', 'MM/DD/SYYYY');
5
6 -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
7 function rosetta_g_miss_date_in_map(d date) return date as
8 begin
9 if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
10 return d;
11 end;
12
13 procedure rosetta_table_copy_in_p1(t out nocopy iem_server_pub.emailsvr_tbl_type, a0 JTF_VARCHAR2_TABLE_100
14 , a1 JTF_NUMBER_TABLE
15 , a2 JTF_VARCHAR2_TABLE_100
16 ) as
17 ddindx binary_integer; indx binary_integer;
18 begin
19 if a0 is not null and a0.count > 0 then
20 if a0.count > 0 then
21 indx := a0.first;
22 ddindx := 1;
23 while true loop
24 t(ddindx).server_name := a0(indx);
25 t(ddindx).port := a1(indx);
26 t(ddindx).active := a2(indx);
27 ddindx := ddindx+1;
28 if a0.last =indx
29 then exit;
30 end if;
31 indx := a0.next(indx);
32 end loop;
33 end if;
34 end if;
35 end rosetta_table_copy_in_p1;
36 procedure rosetta_table_copy_out_p1(t iem_server_pub.emailsvr_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
37 , a1 out nocopy JTF_NUMBER_TABLE
38 , a2 out nocopy JTF_VARCHAR2_TABLE_100
39 ) as
40 ddindx binary_integer; indx binary_integer;
41 begin
42 if t is null or t.count = 0 then
43 a0 := JTF_VARCHAR2_TABLE_100();
44 a1 := JTF_NUMBER_TABLE();
45 a2 := JTF_VARCHAR2_TABLE_100();
46 else
47 a0 := JTF_VARCHAR2_TABLE_100();
48 a1 := JTF_NUMBER_TABLE();
49 a2 := JTF_VARCHAR2_TABLE_100();
50 if t.count > 0 then
51 a0.extend(t.count);
52 a1.extend(t.count);
53 a2.extend(t.count);
54 ddindx := t.first;
55 indx := 1;
56 while true loop
57 a0(indx) := t(ddindx).server_name;
58 a1(indx) := t(ddindx).port;
59 a2(indx) := t(ddindx).active;
60 indx := indx+1;
61 if t.last =ddindx
62 then exit;
63 end if;
64 ddindx := t.next(ddindx);
65 end loop;
66 end if;
67 end if;
68 end rosetta_table_copy_out_p1;
69
70 procedure get_emailserver_list(p_api_version_number NUMBER
71 , p_init_msg_list VARCHAR2
72 , p_commit VARCHAR2
73 , p_server_id NUMBER
74 , p_server_type VARCHAR2
75 , x_return_status out nocopy VARCHAR2
76 , x_msg_count out nocopy NUMBER
77 , x_msg_data out nocopy VARCHAR2
78 , p8_a0 out nocopy JTF_VARCHAR2_TABLE_100
79 , p8_a1 out nocopy JTF_NUMBER_TABLE
80 , p8_a2 out nocopy JTF_VARCHAR2_TABLE_100
81 )
82
83 as
84 ddx_email_svr_tbl iem_server_pub.emailsvr_tbl_type;
85 ddindx binary_integer; indx binary_integer;
86 begin
87
88 -- copy data to the local IN or IN-OUT args, if any
89
90
91
92
93
94
95
96
97
98 -- here's the delegated call to the old PL/SQL routine
99 iem_server_pub.get_emailserver_list(p_api_version_number,
100 p_init_msg_list,
101 p_commit,
102 p_server_id,
103 p_server_type,
104 x_return_status,
105 x_msg_count,
106 x_msg_data,
107 ddx_email_svr_tbl);
108
109 -- copy data back from the local variables to OUT or IN-OUT args, if any
110
111
112
113
114
115
116
117
118 iem_server_pub_w.rosetta_table_copy_out_p1(ddx_email_svr_tbl, p8_a0
119 , p8_a1
120 , p8_a2
121 );
122 end;
123
124 end iem_server_pub_w;