1 package body ams_cpyutility_pvt_w as
2 /* $Header: amswcpub.pls 115.5 2003/08/26 20:39:45 asaha noship $ */
3 procedure rosetta_table_copy_in_p0(t out nocopy ams_cpyutility_pvt.copy_attributes_table_type, a0 JTF_VARCHAR2_TABLE_100) as
4 ddindx binary_integer; indx binary_integer;
5 begin
6 if a0 is not null and a0.count > 0 then
7 if a0.count > 0 then
8 indx := a0.first;
9 ddindx := 1;
10 while true loop
11 t(ddindx) := a0(indx);
12 ddindx := ddindx+1;
13 if a0.last =indx
14 then exit;
15 end if;
16 indx := a0.next(indx);
17 end loop;
18 end if;
19 end if;
20 end rosetta_table_copy_in_p0;
21 procedure rosetta_table_copy_out_p0(t ams_cpyutility_pvt.copy_attributes_table_type, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
22 ddindx binary_integer; indx binary_integer;
23 begin
24 if t is null or t.count = 0 then
25 a0 := JTF_VARCHAR2_TABLE_100();
26 else
27 a0 := JTF_VARCHAR2_TABLE_100();
28 if t.count > 0 then
29 a0.extend(t.count);
30 ddindx := t.first;
31 indx := 1;
32 while true loop
33 a0(indx) := t(ddindx);
34 indx := indx+1;
35 if t.last =ddindx
36 then exit;
37 end if;
38 ddindx := t.next(ddindx);
39 end loop;
40 end if;
41 end if;
42 end rosetta_table_copy_out_p0;
43
44 procedure rosetta_table_copy_in_p2(t out nocopy ams_cpyutility_pvt.copy_columns_table_type, a0 JTF_VARCHAR2_TABLE_100
45 , a1 JTF_VARCHAR2_TABLE_4000
46 ) as
47 ddindx binary_integer; indx binary_integer;
48 begin
49 if a0 is not null and a0.count > 0 then
50 if a0.count > 0 then
51 indx := a0.first;
52 ddindx := 1;
53 while true loop
54 t(ddindx).column_name := a0(indx);
55 t(ddindx).column_value := a1(indx);
56 ddindx := ddindx+1;
57 if a0.last =indx
58 then exit;
59 end if;
60 indx := a0.next(indx);
61 end loop;
62 end if;
63 end if;
64 end rosetta_table_copy_in_p2;
65 procedure rosetta_table_copy_out_p2(t ams_cpyutility_pvt.copy_columns_table_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
66 , a1 out nocopy JTF_VARCHAR2_TABLE_4000
67 ) as
68 ddindx binary_integer; indx binary_integer;
69 begin
70 if t is null or t.count = 0 then
71 a0 := JTF_VARCHAR2_TABLE_100();
72 a1 := JTF_VARCHAR2_TABLE_4000();
73 else
74 a0 := JTF_VARCHAR2_TABLE_100();
75 a1 := JTF_VARCHAR2_TABLE_4000();
76 if t.count > 0 then
77 a0.extend(t.count);
78 a1.extend(t.count);
79 ddindx := t.first;
80 indx := 1;
81 while true loop
82 a0(indx) := t(ddindx).column_name;
83 a1(indx) := t(ddindx).column_value;
84 indx := indx+1;
85 if t.last =ddindx
86 then exit;
87 end if;
88 ddindx := t.next(ddindx);
89 end loop;
90 end if;
91 end if;
92 end rosetta_table_copy_out_p2;
93
94 procedure rosetta_table_copy_in_p3(t out nocopy ams_cpyutility_pvt.log_mesg_type_table, a0 JTF_VARCHAR2_TABLE_100) as
95 ddindx binary_integer; indx binary_integer;
96 begin
97 if a0 is not null and a0.count > 0 then
98 if a0.count > 0 then
99 indx := a0.first;
100 ddindx := 1;
101 while true loop
102 t(ddindx) := a0(indx);
103 ddindx := ddindx+1;
104 if a0.last =indx
105 then exit;
106 end if;
107 indx := a0.next(indx);
108 end loop;
109 end if;
110 end if;
111 end rosetta_table_copy_in_p3;
112 procedure rosetta_table_copy_out_p3(t ams_cpyutility_pvt.log_mesg_type_table, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
113 ddindx binary_integer; indx binary_integer;
114 begin
115 if t is null or t.count = 0 then
116 a0 := JTF_VARCHAR2_TABLE_100();
117 else
118 a0 := JTF_VARCHAR2_TABLE_100();
119 if t.count > 0 then
120 a0.extend(t.count);
121 ddindx := t.first;
122 indx := 1;
123 while true loop
124 a0(indx) := t(ddindx);
125 indx := indx+1;
126 if t.last =ddindx
127 then exit;
128 end if;
129 ddindx := t.next(ddindx);
130 end loop;
131 end if;
132 end if;
133 end rosetta_table_copy_out_p3;
134
135 procedure rosetta_table_copy_in_p4(t out nocopy ams_cpyutility_pvt.log_mesg_txt_table, a0 JTF_VARCHAR2_TABLE_4000) as
136 ddindx binary_integer; indx binary_integer;
137 begin
138 if a0 is not null and a0.count > 0 then
139 if a0.count > 0 then
140 indx := a0.first;
141 ddindx := 1;
142 while true loop
143 t(ddindx) := a0(indx);
144 ddindx := ddindx+1;
145 if a0.last =indx
146 then exit;
147 end if;
148 indx := a0.next(indx);
149 end loop;
150 end if;
151 end if;
152 end rosetta_table_copy_in_p4;
153 procedure rosetta_table_copy_out_p4(t ams_cpyutility_pvt.log_mesg_txt_table, a0 out nocopy JTF_VARCHAR2_TABLE_4000) as
154 ddindx binary_integer; indx binary_integer;
155 begin
156 if t is null or t.count = 0 then
157 a0 := JTF_VARCHAR2_TABLE_4000();
158 else
159 a0 := JTF_VARCHAR2_TABLE_4000();
160 if t.count > 0 then
161 a0.extend(t.count);
162 ddindx := t.first;
163 indx := 1;
164 while true loop
165 a0(indx) := t(ddindx);
166 indx := indx+1;
167 if t.last =ddindx
168 then exit;
169 end if;
170 ddindx := t.next(ddindx);
171 end loop;
172 end if;
173 end if;
174 end rosetta_table_copy_out_p4;
175
176 procedure rosetta_table_copy_in_p5(t out nocopy ams_cpyutility_pvt.log_act_used_by_table, a0 JTF_VARCHAR2_TABLE_100) as
177 ddindx binary_integer; indx binary_integer;
178 begin
179 if a0 is not null and a0.count > 0 then
180 if a0.count > 0 then
181 indx := a0.first;
182 ddindx := 1;
183 while true loop
184 t(ddindx) := a0(indx);
185 ddindx := ddindx+1;
186 if a0.last =indx
187 then exit;
188 end if;
189 indx := a0.next(indx);
190 end loop;
191 end if;
192 end if;
193 end rosetta_table_copy_in_p5;
194 procedure rosetta_table_copy_out_p5(t ams_cpyutility_pvt.log_act_used_by_table, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
195 ddindx binary_integer; indx binary_integer;
196 begin
197 if t is null or t.count = 0 then
198 a0 := JTF_VARCHAR2_TABLE_100();
199 else
200 a0 := JTF_VARCHAR2_TABLE_100();
201 if t.count > 0 then
202 a0.extend(t.count);
203 ddindx := t.first;
204 indx := 1;
205 while true loop
206 a0(indx) := t(ddindx);
207 indx := indx+1;
208 if t.last =ddindx
209 then exit;
210 end if;
211 ddindx := t.next(ddindx);
212 end loop;
213 end if;
214 end if;
215 end rosetta_table_copy_out_p5;
216
217 procedure rosetta_table_copy_in_p6(t out nocopy ams_cpyutility_pvt.log_act_used_id_table, a0 JTF_NUMBER_TABLE) as
218 ddindx binary_integer; indx binary_integer;
219 begin
220 if a0 is not null and a0.count > 0 then
221 if a0.count > 0 then
222 indx := a0.first;
223 ddindx := 1;
224 while true loop
225 t(ddindx) := a0(indx);
226 ddindx := ddindx+1;
227 if a0.last =indx
228 then exit;
229 end if;
230 indx := a0.next(indx);
231 end loop;
232 end if;
233 end if;
234 end rosetta_table_copy_in_p6;
235 procedure rosetta_table_copy_out_p6(t ams_cpyutility_pvt.log_act_used_id_table, a0 out nocopy JTF_NUMBER_TABLE) as
236 ddindx binary_integer; indx binary_integer;
237 begin
238 if t is null or t.count = 0 then
239 a0 := JTF_NUMBER_TABLE();
240 else
241 a0 := JTF_NUMBER_TABLE();
242 if t.count > 0 then
243 a0.extend(t.count);
244 ddindx := t.first;
245 indx := 1;
246 while true loop
247 a0(indx) := t(ddindx);
248 indx := indx+1;
249 if t.last =ddindx
250 then exit;
251 end if;
252 ddindx := t.next(ddindx);
253 end loop;
254 end if;
255 end if;
256 end rosetta_table_copy_out_p6;
257
258 procedure get_column_value(p_column_name VARCHAR2
259 , p1_a0 JTF_VARCHAR2_TABLE_100
260 , p1_a1 JTF_VARCHAR2_TABLE_4000
261 , x_column_value out nocopy VARCHAR2
262 )
263
264 as
265 ddp_columns_table ams_cpyutility_pvt.copy_columns_table_type;
266 ddindx binary_integer; indx binary_integer;
267 begin
268
269 -- copy data to the local IN or IN-OUT args, if any
270
271 ams_cpyutility_pvt_w.rosetta_table_copy_in_p2(ddp_columns_table, p1_a0
272 , p1_a1
273 );
274
275
276 -- here's the delegated call to the old PL/SQL routine
277 ams_cpyutility_pvt.get_column_value(p_column_name,
278 ddp_columns_table,
279 x_column_value);
280
281 -- copy data back from the local variables to OUT or IN-OUT args, if any
282
283
284 end;
285
286 function is_copy_attribute(p_attribute VARCHAR2
287 , p_attributes_table JTF_VARCHAR2_TABLE_100
288 ) return varchar2
289
290 as
291 ddp_attributes_table ams_cpyutility_pvt.copy_attributes_table_type;
292 ddindx binary_integer; indx binary_integer;
293 ddrosetta_retval varchar2(4000);
294 begin
295
296 -- copy data to the local IN or IN-OUT args, if any
297
298 ams_cpyutility_pvt_w.rosetta_table_copy_in_p0(ddp_attributes_table, p_attributes_table);
299
300 -- here's the delegated call to the old PL/SQL routine
301 ddrosetta_retval := ams_cpyutility_pvt.is_copy_attribute(p_attribute,
302 ddp_attributes_table);
303
304 -- copy data back from the local variables to OUT or IN-OUT args, if any
305
306
307 return ddrosetta_retval;
308 end;
309
310 end ams_cpyutility_pvt_w;