DBA Data[Home] [Help]

PACKAGE BODY: APPS.IEM_TAGPROCESS_PUB_W

Source


1 package body iem_tagprocess_pub_w as
2   /* $Header: IEMPTGWB.pls 115.2 2002/12/12 22:54:44 txliu 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_p2(t out nocopy iem_tagprocess_pub.keyvals_tbl_type, a0 JTF_VARCHAR2_TABLE_100
14     , a1 JTF_VARCHAR2_TABLE_300
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).key := a0(indx);
25           t(ddindx).value := a1(indx);
26           t(ddindx).datatype := 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_p2;
36   procedure rosetta_table_copy_out_p2(t iem_tagprocess_pub.keyvals_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
37     , a1 out nocopy JTF_VARCHAR2_TABLE_300
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_VARCHAR2_TABLE_300();
45     a2 := JTF_VARCHAR2_TABLE_100();
46   else
47       a0 := JTF_VARCHAR2_TABLE_100();
48       a1 := JTF_VARCHAR2_TABLE_300();
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).key;
58           a1(indx) := t(ddindx).value;
59           a2(indx) := t(ddindx).datatype;
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_p2;
69 
70   procedure getencryptid(p_api_version_number  NUMBER
71     , p_init_msg_list  VARCHAR2
72     , p_commit  VARCHAR2
73     , p_email_account_id  NUMBER
74     , p_agent_id  NUMBER
75     , p_interaction_id  NUMBER
76     , p6_a0 JTF_VARCHAR2_TABLE_100
77     , p6_a1 JTF_VARCHAR2_TABLE_300
78     , p6_a2 JTF_VARCHAR2_TABLE_100
79     , x_encrypted_id out nocopy  VARCHAR2
80     , x_msg_count out nocopy  NUMBER
81     , x_return_status out nocopy  VARCHAR2
82     , x_msg_data out nocopy  VARCHAR2
83   )
84 
85   as
86     ddp_biz_keyval_tab iem_tagprocess_pub.keyvals_tbl_type;
87     ddindx binary_integer; indx binary_integer;
88   begin
89 
90     -- copy data to the local IN or IN-OUT args, if any
91 
92 
93 
94 
95 
96 
97     iem_tagprocess_pub_w.rosetta_table_copy_in_p2(ddp_biz_keyval_tab, p6_a0
98       , p6_a1
99       , p6_a2
100       );
101 
102 
103 
104 
105 
106     -- here's the delegated call to the old PL/SQL routine
107     iem_tagprocess_pub.getencryptid(p_api_version_number,
108       p_init_msg_list,
109       p_commit,
110       p_email_account_id,
111       p_agent_id,
112       p_interaction_id,
113       ddp_biz_keyval_tab,
114       x_encrypted_id,
115       x_msg_count,
116       x_return_status,
117       x_msg_data);
118 
119     -- copy data back from the local variables to OUT or IN-OUT args, if any
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130   end;
131 
132   procedure gettagvalues(p_api_version_number  NUMBER
133     , p_init_msg_list  VARCHAR2
134     , p_commit  VARCHAR2
135     , p_encrypted_id  VARCHAR2
136     , p_message_id  NUMBER
137     , p5_a0 out nocopy JTF_VARCHAR2_TABLE_100
138     , p5_a1 out nocopy JTF_VARCHAR2_TABLE_300
139     , p5_a2 out nocopy JTF_VARCHAR2_TABLE_100
140     , x_msg_count out nocopy  NUMBER
141     , x_return_status out nocopy  VARCHAR2
142     , x_msg_data out nocopy  VARCHAR2
143   )
144 
145   as
146     ddx_key_value iem_tagprocess_pub.keyvals_tbl_type;
147     ddindx binary_integer; indx binary_integer;
148   begin
149 
150     -- copy data to the local IN or IN-OUT args, if any
151 
152 
153 
154 
155 
156 
157 
158 
159 
160     -- here's the delegated call to the old PL/SQL routine
161     iem_tagprocess_pub.gettagvalues(p_api_version_number,
162       p_init_msg_list,
163       p_commit,
164       p_encrypted_id,
165       p_message_id,
166       ddx_key_value,
167       x_msg_count,
168       x_return_status,
169       x_msg_data);
170 
171     -- copy data back from the local variables to OUT or IN-OUT args, if any
172 
173 
174 
175 
176 
177     iem_tagprocess_pub_w.rosetta_table_copy_out_p2(ddx_key_value, p5_a0
178       , p5_a1
179       , p5_a2
180       );
181 
182 
183 
184   end;
185 
186   procedure gettagvalues_on_msgid(p_api_version_number  NUMBER
187     , p_init_msg_list  VARCHAR2
188     , p_commit  VARCHAR2
189     , p_message_id  NUMBER
190     , p4_a0 out nocopy JTF_VARCHAR2_TABLE_100
191     , p4_a1 out nocopy JTF_VARCHAR2_TABLE_300
192     , p4_a2 out nocopy JTF_VARCHAR2_TABLE_100
193     , x_encrypted_id out nocopy  VARCHAR2
194     , x_msg_count out nocopy  NUMBER
195     , x_return_status out nocopy  VARCHAR2
196     , x_msg_data out nocopy  VARCHAR2
197   )
198 
199   as
200     ddx_key_value iem_tagprocess_pub.keyvals_tbl_type;
201     ddindx binary_integer; indx binary_integer;
202   begin
203 
204     -- copy data to the local IN or IN-OUT args, if any
205 
206 
207 
208 
209 
210 
211 
212 
213 
214     -- here's the delegated call to the old PL/SQL routine
215     iem_tagprocess_pub.gettagvalues_on_msgid(p_api_version_number,
216       p_init_msg_list,
217       p_commit,
218       p_message_id,
219       ddx_key_value,
220       x_encrypted_id,
221       x_msg_count,
222       x_return_status,
223       x_msg_data);
224 
225     -- copy data back from the local variables to OUT or IN-OUT args, if any
226 
227 
228 
229 
230     iem_tagprocess_pub_w.rosetta_table_copy_out_p2(ddx_key_value, p4_a0
231       , p4_a1
232       , p4_a2
233       );
234 
235 
236 
237 
238   end;
239 
240   procedure isvalidagent(p_agent_id  NUMBER
241     , p_email_acct_id  NUMBER
242     , ddrosetta_retval_bool OUT NOCOPY NUMBER
243   )
244 
245   as
246     ddindx binary_integer; indx binary_integer;
247     ddrosetta_retval boolean;
248   begin
249 
250     -- copy data to the local IN or IN-OUT args, if any
251 
252 
253     -- here's the delegated call to the old PL/SQL routine
254     ddrosetta_retval := iem_tagprocess_pub.isvalidagent(p_agent_id,
255       p_email_acct_id);
256 
257     -- copy data back from the local variables to OUT or IN-OUT args, if any
258     if ddrosetta_retval is null
259       then ddrosetta_retval_bool := null;
260     elsif ddrosetta_retval
261       then ddrosetta_retval_bool := 1;
262     else ddrosetta_retval_bool := 0;
263     end if;
264 
265   end;
266 
267 end iem_tagprocess_pub_w;