DBA Data[Home] [Help]

PACKAGE BODY: APPS.IEM_E_CLASSIFICATION_PUB_W

Source


1 package body iem_e_classification_pub_w as
2   /* $Header: IEMVCLSB.pls 115.1 2000/02/18 14:48:45 pkm ship     $ */
3   /*
4   rosetta_g_mistake_date date := to_date('01/01/+4713', 'MM/DD/SYYYY');
5   rosetta_g_miss_date date := to_date('01/01/-4712', 'MM/DD/SYYYY');
6 
7   function rosetta_g_miss_num_map(n number) return number as
8     a number := fnd_api.g_miss_num;
9     b number := 0-1962.0724;
10   begin
11     if n=a then return b; end if;
12     if n=b then return a; end if;
13     return n;
14   end;
15 
16   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
17   function rosetta_g_miss_date_in_map(d date) return date as
18   begin
19     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
20     return d;
21   end;
22 
23   procedure rosetta_table_copy_in_p2(t out iem_e_classification_pub.emclass_tbl_type, a0 JTF_NUMBER_TABLE
24     , a1 JTF_VARCHAR2_TABLE_100
25     , a2 JTF_VARCHAR2_TABLE_100
26     ) as
27     ddindx binary_integer; indx binary_integer;
28   begin
29   if a0 is not null and a0.count > 0 then
30       if a0.count > 0 then
31         indx := a0.first;
32         ddindx := 1;
33         while true loop
34           t(ddindx).classification_id := rosetta_g_miss_num_map(a0(indx));
35           t(ddindx).classification := a1(indx);
36           t(ddindx).score := a2(indx);
37           ddindx := ddindx+1;
38           if a0.last =indx
39             then exit;
40           end if;
41           indx := a0.next(indx);
42         end loop;
43       end if;
44    end if;
45   end rosetta_table_copy_in_p2;
46   procedure rosetta_table_copy_out_p2(t iem_e_classification_pub.emclass_tbl_type, a0 out JTF_NUMBER_TABLE
47     , a1 out JTF_VARCHAR2_TABLE_100
48     , a2 out JTF_VARCHAR2_TABLE_100
49     ) as
50     ddindx binary_integer; indx binary_integer;
51   begin
52   if t is null or t.count = 0 then
53     a0 := JTF_NUMBER_TABLE();
54     a1 := JTF_VARCHAR2_TABLE_100();
55     a2 := JTF_VARCHAR2_TABLE_100();
56   else
57       a0 := JTF_NUMBER_TABLE();
58       a1 := JTF_VARCHAR2_TABLE_100();
59       a2 := JTF_VARCHAR2_TABLE_100();
60       if t.count > 0 then
61         a0.extend(t.count);
62         a1.extend(t.count);
63         a2.extend(t.count);
64         ddindx := t.first;
65         indx := 1;
66         while true loop
67           a0(indx) := rosetta_g_miss_num_map(t(ddindx).classification_id);
68           a1(indx) := t(ddindx).classification;
69           a2(indx) := t(ddindx).score;
70           indx := indx+1;
71           if t.last =ddindx
72             then exit;
73           end if;
74           ddindx := t.next(ddindx);
75         end loop;
76       end if;
77    end if;
78   end rosetta_table_copy_out_p2;
79 
80   procedure getclassification(p_api_version_number  NUMBER
81     , p_init_msg_list  VARCHAR2
82     , p_commit  VARCHAR2
83     , p_email_account_id  NUMBER
84     , p_message_id  NUMBER
85     , p5_a0 out JTF_NUMBER_TABLE
86     , p5_a1 out JTF_VARCHAR2_TABLE_100
87     , p5_a2 out JTF_VARCHAR2_TABLE_100
88   )
89   as
90     ddx_email_classn_tbl iem_e_classification_pub.emclass_tbl_type;
91     ddindx binary_integer; indx binary_integer;
92   begin
93 
94     -- copy data to the local IN or IN-OUT args, if any
95 
96 
97 
98 
99 
100 
101     -- here's the delegated call to the old PL/SQL routine
102     iem_e_classification_pub.getclassification(p_api_version_number,
103       p_init_msg_list,
104       p_commit,
105       p_email_account_id,
106       p_message_id,
107       ddx_email_classn_tbl);
108 
109     -- copy data back from the local OUT or IN-OUT args, if any
110 
111 
112 
113 
114 
115     iem_e_classification_pub_w.rosetta_table_copy_out_p2(ddx_email_classn_tbl, p5_a0
116       , p5_a1
117       , p5_a2
118       );
119   end;
120 */
121 end iem_e_classification_pub_w;