DBA Data[Home] [Help]

PACKAGE BODY: APPS.IBY_FORMULA_PKG_WRAP

Source


1 PACKAGE BODY iby_formula_pkg_wrap AS
2 /*$Header: ibywforb.pls 115.10 2002/11/19 00:25:52 jleybovi ship $*/
3 
4 /*
5 ** Wrapper Package generated by rosette for iby_formula_pkg.
6 */
7 
8   /*
9   ** Name getPayeeFormulas
10   ** Purpose: Calls the actual getPayeeFormulas method in iby_formula_pkg.
11   **          This procedure is a wrapper generated by Rosette
12   **          to the actual procedure in iby_formula_pkg for Java
13   **          programs to be able to call it.
14   */
15   procedure getpayeeformulas(i_payeeid  varchar2,
16     o_riskformula_id out nocopy JTF_NUMBER_TABLE,
17     o_riskformula_name out nocopy JTF_VARCHAR2_TABLE_100,
18     o_riskformula_description out nocopy JTF_VARCHAR2_TABLE_300,
19     o_riskformula_flag out nocopy JTF_NUMBER_TABLE)
20 
21   is
22     ddo_riskformula iby_formula_pkg.formula_table;
23     ddindx binary_integer; indx binary_integer;
24   begin
25 
26     -- copy data to the local IN or IN-OUT args, if any
27 
28 
29     -- here's the delegated call to the old PL/SQL routine
30     iby_formula_pkg.getpayeeformulas(i_payeeid,
31       ddo_riskformula);
32 
33     -- copy data back from the local OUT or IN-OUT args, if any
34 
35     if ddo_riskformula is null or ddo_riskformula.count = 0 then
36       o_riskformula_id := JTF_NUMBER_TABLE();
37       o_riskformula_name := JTF_VARCHAR2_TABLE_100();
38       o_riskformula_description := JTF_VARCHAR2_TABLE_300();
39       o_riskformula_flag := JTF_NUMBER_TABLE();
40     else
41         o_riskformula_id := JTF_NUMBER_TABLE();
42         o_riskformula_name := JTF_VARCHAR2_TABLE_100();
43         o_riskformula_description := JTF_VARCHAR2_TABLE_300();
44         o_riskformula_flag := JTF_NUMBER_TABLE();
45     -- if ddo_riskformula is not null or ddo_riskformula.count > 0 then
46        if ddo_riskformula.count > 0 then
47           o_riskformula_id.extend(ddo_riskformula.count);
48           o_riskformula_name.extend(ddo_riskformula.count);
49           o_riskformula_description.extend(ddo_riskformula.count);
50           o_riskformula_flag.extend(ddo_riskformula.count);
51           ddindx := ddo_riskformula.first;
52           indx := 1;
53           while true loop
54             o_riskformula_id(indx) := ddo_riskformula(ddindx).id;
55             o_riskformula_name(indx) := ddo_riskformula(ddindx).name;
56             o_riskformula_description(indx) := ddo_riskformula(ddindx).description;
57             o_riskformula_flag(indx) := ddo_riskformula(ddindx).flag;
58             indx := indx+1;
59             if ddo_riskformula.last =ddindx
60               then exit;
61             end if;
62             ddindx := ddo_riskformula.next(ddindx);
63           end loop;
64         end if;
65      end if;
66   end getpayeeformulas;
67 
68   /*
69   ** Name createFormula
70   ** Purpose: Calls the actual createFormula method in iby_formula_pkg.
71   **          This procedure is a wrapper generated by Rosette
72   **          to the actual procedure in iby_formula_pkg for Java
73   **          programs to be able to call it.
74   */
75   procedure createformula(i_payeeid varchar2, i_name  varchar2,
76     i_description  varchar2,
77     i_flag integer,
78     i_count integer,
79     i_factors_name JTF_VARCHAR2_TABLE_100,
80     i_factors_weight JTF_NUMBER_TABLE,
81     o_id out nocopy number)
82 
83   is
84     ddi_factors iby_formula_pkg.factor_table;
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     if i_factors_name is not null and i_factors_name.count > 0 then
92         if i_factors_name.count > 0 then
93           indx := i_factors_name.first;
94           ddindx := 1;
95           while true loop
96             ddi_factors(ddindx).name := i_factors_name(indx);
97             ddi_factors(ddindx).weight := i_factors_weight(indx);
98             ddindx := ddindx+1;
99             if i_factors_name.last =indx
100               then exit;
101             end if;
102             indx := i_factors_name.next(indx);
103           end loop;
104         end if;
105      end if;
106 
107 
108     -- here's the delegated call to the old PL/SQL routine
109     iby_formula_pkg.createformula(i_payeeid, i_name,
110       i_description,
111       i_flag,
112       i_count,
113       ddi_factors,
114       o_id);
115 
116     -- copy data back from the local OUT or IN-OUT args, if any
117 
118   end createformula;
119 
120   /*
121   ** Name modifyFormula
122   ** Purpose: Calls the actual modifyFormula method in iby_formula_pkg.
123   **          This procedure is a wrapper generated by Rosette
124   **          to the actual procedure in iby_formula_pkg for Java
125   **          programs to be able to call it.
126   */
127   procedure modifyformula(i_id  number,
128     i_name  varchar2,
129     i_description  varchar2,
130     i_flag integer,
131     i_count integer,
132     i_factors_name JTF_VARCHAR2_TABLE_100,
133     i_factors_weight JTF_NUMBER_TABLE)
134 
135   is
136     ddi_factors iby_formula_pkg.factor_table;
137     ddindx binary_integer; indx binary_integer;
138   begin
139 
140     -- copy data to the local IN or IN-OUT args, if any
141 
142 
143 
144     if i_factors_name is not null and i_factors_name.count > 0 then
145         if i_factors_name.count > 0 then
146           indx := i_factors_name.first;
147           ddindx := 1;
148           while true loop
149             ddi_factors(ddindx).name := i_factors_name(indx);
150             ddi_factors(ddindx).weight := i_factors_weight(indx);
151             ddindx := ddindx+1;
152             if i_factors_name.last =indx
153               then exit;
154             end if;
155             indx := i_factors_name.next(indx);
156           end loop;
157         end if;
158      end if;
159 
160     -- here's the delegated call to the old PL/SQL routine
161     iby_formula_pkg.modifyformula(i_id,
162       i_name,
163       i_description,
164       i_flag,
165       i_count,
166       ddi_factors);
167 
168     -- copy data back from the local OUT or IN-OUT args, if any
169 
170   end modifyformula;
171 
172   /*
173   ** Name loadFormula
174   ** Purpose: Calls the actual loadFormula method in iby_formula_pkg.
175   **          This procedure is a wrapper generated by Rosette
176   **          to the actual procedure in iby_formula_pkg for Java
177   **          programs to be able to call it.
178   */
179   procedure loadformula(i_factorid  number,
180     o_name out nocopy varchar2,
181     o_description out nocopy varchar2,
182     o_flag out nocopy integer,
183     o_factors_name out nocopy JTF_VARCHAR2_TABLE_100,
184     o_factors_weight out nocopy JTF_NUMBER_TABLE)
185 
186   is
187     ddo_factors iby_formula_pkg.factor_table;
188     ddindx binary_integer; indx binary_integer;
189   begin
190 
191     -- copy data to the local IN or IN-OUT args, if any
192 
193 
194     -- here's the delegated call to the old PL/SQL routine
195     iby_formula_pkg.loadformula(i_factorid,
196       o_name, o_description, o_flag, ddo_factors);
197 
198     -- copy data back from the local OUT or IN-OUT args, if any
199 
200     if ddo_factors is null or ddo_factors.count = 0 then
201       o_factors_name := JTF_VARCHAR2_TABLE_100();
202       o_factors_weight := JTF_NUMBER_TABLE();
203     else
204         o_factors_name := JTF_VARCHAR2_TABLE_100();
205         o_factors_weight := JTF_NUMBER_TABLE();
206     -- if ddo_factors is not null or ddo_factors.count > 0 then
207         if ddo_factors.count > 0 then
208           o_factors_name.extend(ddo_factors.count);
209           o_factors_weight.extend(ddo_factors.count);
210           ddindx := ddo_factors.first;
211           indx := 1;
212           while true loop
213             o_factors_name(indx) := ddo_factors(ddindx).name;
214             o_factors_weight(indx) := ddo_factors(ddindx).weight;
215             indx := indx+1;
216             if ddo_factors.last =ddindx
217               then exit;
218             end if;
219             ddindx := ddo_factors.next(ddindx);
220           end loop;
221         end if;
222      end if;
223   end loadformula;
224 
225 end iby_formula_pkg_wrap;
226