DBA Data[Home] [Help]

PACKAGE BODY: APPS.IEM_EML_CLASSIFICATIONS_PVT_W

Source


1 package body iem_eml_classifications_pvt_w as
2   /* $Header: IEMVCLSB.pls 115.8 2003/08/06 20:54:50 ukari shipped $ */
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_eml_classifications_pvt.emclass_tbl_type, a0 JTF_NUMBER_TABLE
14     , a1 JTF_VARCHAR2_TABLE_100
15     , a2 JTF_NUMBER_TABLE
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).classification_id := a0(indx);
25           t(ddindx).classification := a1(indx);
26           t(ddindx).score := 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_eml_classifications_pvt.emclass_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
37     , a1 out nocopy JTF_VARCHAR2_TABLE_100
38     , a2 out nocopy JTF_NUMBER_TABLE
39     ) as
40     ddindx binary_integer; indx binary_integer;
41   begin
42   if t is null or t.count = 0 then
43     a0 := JTF_NUMBER_TABLE();
44     a1 := JTF_VARCHAR2_TABLE_100();
45     a2 := JTF_NUMBER_TABLE();
46   else
47       a0 := JTF_NUMBER_TABLE();
48       a1 := JTF_VARCHAR2_TABLE_100();
49       a2 := JTF_NUMBER_TABLE();
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).classification_id;
58           a1(indx) := t(ddindx).classification;
59           a2(indx) := t(ddindx).score;
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 create_item(p_api_version_number  NUMBER
71     , p_init_msg_list  VARCHAR2
72     , p_commit  VARCHAR2
73     , p_email_account_id  NUMBER
74     , p_classification_id  NUMBER
75     , p_score  NUMBER
76     , p_message_id  NUMBER
77     , p_created_by  NUMBER
78     , p_creation_date  date
79     , p_last_updated_by  NUMBER
80     , p_last_update_date  date
81     , p_last_update_login  NUMBER
82     , x_return_status out nocopy  VARCHAR2
83     , x_msg_count out nocopy  NUMBER
84     , x_msg_data out nocopy  VARCHAR2
85   )
86 
87   as
88     ddp_creation_date date;
89     ddp_last_update_date date;
90     ddindx binary_integer; indx binary_integer;
91   begin
92 
93     -- copy data to the local IN or IN-OUT args, if any
94 
95 
96 
97 
98 
99 
100 
101 
102     ddp_creation_date := rosetta_g_miss_date_in_map(p_creation_date);
103 
104 
105     ddp_last_update_date := rosetta_g_miss_date_in_map(p_last_update_date);
106 
107 
108 
109 
110 
111     -- here's the delegated call to the old PL/SQL routine
112     iem_eml_classifications_pvt.create_item(p_api_version_number,
113       p_init_msg_list,
114       p_commit,
115       p_email_account_id,
116       p_classification_id,
117       p_score,
118       p_message_id,
119       p_created_by,
120       ddp_creation_date,
121       p_last_updated_by,
122       ddp_last_update_date,
123       p_last_update_login,
124       x_return_status,
125       x_msg_count,
126       x_msg_data);
127 
128     -- copy data back from the local variables to OUT or IN-OUT args, if any
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143   end;
144 
145   procedure getclassification(p_api_version_number  NUMBER
146     , p_init_msg_list  VARCHAR2
147     , p_commit  VARCHAR2
148     , p_email_account_id  NUMBER
149     , p_message_id  NUMBER
150     , p5_a0 out nocopy JTF_NUMBER_TABLE
151     , p5_a1 out nocopy JTF_VARCHAR2_TABLE_100
152     , p5_a2 out nocopy JTF_NUMBER_TABLE
153     , x_return_status out nocopy  VARCHAR2
154     , x_msg_count out nocopy  NUMBER
155     , x_msg_data out nocopy  VARCHAR2
156   )
157 
158   as
159     ddx_email_classn_tbl iem_eml_classifications_pvt.emclass_tbl_type;
160     ddindx binary_integer; indx binary_integer;
161   begin
162 
163     -- copy data to the local IN or IN-OUT args, if any
164 
165 
166 
167 
168 
169 
170 
171 
172 
173     -- here's the delegated call to the old PL/SQL routine
174     iem_eml_classifications_pvt.getclassification(p_api_version_number,
175       p_init_msg_list,
176       p_commit,
177       p_email_account_id,
178       p_message_id,
179       ddx_email_classn_tbl,
180       x_return_status,
181       x_msg_count,
182       x_msg_data);
183 
184     -- copy data back from the local variables to OUT or IN-OUT args, if any
185 
186 
187 
188 
189 
190     iem_eml_classifications_pvt_w.rosetta_table_copy_out_p1(ddx_email_classn_tbl, p5_a0
191       , p5_a1
192       , p5_a2
193       );
194 
195 
196 
197   end;
198 
199   procedure getclassification(p_api_version_number  NUMBER
200     , p_init_msg_list  VARCHAR2
201     , p_commit  VARCHAR2
202     , p_email_account_id  NUMBER
203     , p_message_id  NUMBER
204     , x_category_id out nocopy  NUMBER
205     , p6_a0 out nocopy JTF_NUMBER_TABLE
206     , p6_a1 out nocopy JTF_VARCHAR2_TABLE_100
207     , p6_a2 out nocopy JTF_NUMBER_TABLE
208     , x_return_status out nocopy  VARCHAR2
209     , x_msg_count out nocopy  NUMBER
210     , x_msg_data out nocopy  VARCHAR2
211   )
212 
213   as
214     ddx_email_classn_tbl iem_eml_classifications_pvt.emclass_tbl_type;
215     ddindx binary_integer; indx binary_integer;
216   begin
217 
218     -- copy data to the local IN or IN-OUT args, if any
219 
220 
221 
222 
223 
224 
225 
226 
227 
228 
229     -- here's the delegated call to the old PL/SQL routine
230     iem_eml_classifications_pvt.getclassification(p_api_version_number,
231       p_init_msg_list,
232       p_commit,
233       p_email_account_id,
234       p_message_id,
235       x_category_id,
236       ddx_email_classn_tbl,
237       x_return_status,
238       x_msg_count,
239       x_msg_data);
240 
241     -- copy data back from the local variables to OUT or IN-OUT args, if any
242 
243 
244 
245 
246 
247 
248     iem_eml_classifications_pvt_w.rosetta_table_copy_out_p1(ddx_email_classn_tbl, p6_a0
249       , p6_a1
250       , p6_a2
251       );
252 
253 
254 
255   end;
256 
257   procedure create_item(p_api_version_number  NUMBER
258     , p_init_msg_list  VARCHAR2
259     , p_commit  VARCHAR2
260     , p_email_account_id  NUMBER
261     , p_classification_id  NUMBER
262     , p_score  NUMBER
263     , p_message_id  NUMBER
264     , p_class_string  VARCHAR2
265     , p_created_by  NUMBER
266     , p_creation_date  date
267     , p_last_updated_by  NUMBER
268     , p_last_update_date  date
269     , p_last_update_login  NUMBER
270     , x_return_status out nocopy  VARCHAR2
271     , x_msg_count out nocopy  NUMBER
272     , x_msg_data out nocopy  VARCHAR2
273   )
274 
275   as
276     ddp_creation_date date;
277     ddp_last_update_date date;
278     ddindx binary_integer; indx binary_integer;
279   begin
280 
281     -- copy data to the local IN or IN-OUT args, if any
282 
283 
284 
285 
286 
287 
288 
289 
290 
291     ddp_creation_date := rosetta_g_miss_date_in_map(p_creation_date);
292 
293 
294     ddp_last_update_date := rosetta_g_miss_date_in_map(p_last_update_date);
295 
296 
297 
298 
299 
300     -- here's the delegated call to the old PL/SQL routine
301     iem_eml_classifications_pvt.create_item(p_api_version_number,
302       p_init_msg_list,
303       p_commit,
304       p_email_account_id,
305       p_classification_id,
306       p_score,
307       p_message_id,
308       p_class_string,
309       p_created_by,
310       ddp_creation_date,
311       p_last_updated_by,
312       ddp_last_update_date,
313       p_last_update_login,
314       x_return_status,
315       x_msg_count,
316       x_msg_data);
317 
318     -- copy data back from the local variables to OUT or IN-OUT args, if any
319 
320 
321 
322 
323 
324 
325 
326 
327 
328 
329 
330 
331 
332 
333 
334   end;
335 
336 end iem_eml_classifications_pvt_w;