DBA Data[Home] [Help]

PACKAGE BODY: APPS.JTA_CAL_ATTENDEES_PVT_W

Source


1 package body jta_cal_attendees_pvt_w as
2   /* $Header: jtacatwb.pls 115.1 2002/12/07 01:28:21 rdespoto ship $ */
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 jta_cal_attendees_pvt.resource_tbl, a0 JTF_NUMBER_TABLE
14     , a1 JTF_VARCHAR2_TABLE_100
15     ) as
16     ddindx binary_integer; indx binary_integer;
17   begin
18   if a0 is not null and a0.count > 0 then
19       if a0.count > 0 then
20         indx := a0.first;
21         ddindx := 1;
22         while true loop
23           t(ddindx).resource_id := a0(indx);
24           t(ddindx).resource_type := a1(indx);
25           ddindx := ddindx+1;
26           if a0.last =indx
27             then exit;
28           end if;
29           indx := a0.next(indx);
30         end loop;
31       end if;
32    end if;
33   end rosetta_table_copy_in_p1;
34   procedure rosetta_table_copy_out_p1(t jta_cal_attendees_pvt.resource_tbl, a0 out nocopy JTF_NUMBER_TABLE
35     , a1 out nocopy JTF_VARCHAR2_TABLE_100
36     ) as
37     ddindx binary_integer; indx binary_integer;
38   begin
39   if t is null or t.count = 0 then
40     a0 := JTF_NUMBER_TABLE();
41     a1 := JTF_VARCHAR2_TABLE_100();
42   else
43       a0 := JTF_NUMBER_TABLE();
44       a1 := JTF_VARCHAR2_TABLE_100();
45       if t.count > 0 then
46         a0.extend(t.count);
47         a1.extend(t.count);
48         ddindx := t.first;
49         indx := 1;
50         while true loop
51           a0(indx) := t(ddindx).resource_id;
52           a1(indx) := t(ddindx).resource_type;
53           indx := indx+1;
54           if t.last =ddindx
55             then exit;
56           end if;
57           ddindx := t.next(ddindx);
58         end loop;
59       end if;
60    end if;
61   end rosetta_table_copy_out_p1;
62 
63   procedure rosetta_table_copy_in_p3(t out nocopy jta_cal_attendees_pvt.task_assign_tbl, a0 JTF_NUMBER_TABLE
64     ) as
65     ddindx binary_integer; indx binary_integer;
66   begin
67   if a0 is not null and a0.count > 0 then
68       if a0.count > 0 then
69         indx := a0.first;
70         ddindx := 1;
71         while true loop
72           t(ddindx).task_assignment_id := a0(indx);
73           ddindx := ddindx+1;
74           if a0.last =indx
75             then exit;
76           end if;
77           indx := a0.next(indx);
78         end loop;
79       end if;
80    end if;
81   end rosetta_table_copy_in_p3;
82   procedure rosetta_table_copy_out_p3(t jta_cal_attendees_pvt.task_assign_tbl, a0 out nocopy JTF_NUMBER_TABLE
83     ) as
84     ddindx binary_integer; indx binary_integer;
85   begin
86   if t is null or t.count = 0 then
87     a0 := JTF_NUMBER_TABLE();
88   else
89       a0 := JTF_NUMBER_TABLE();
90       if t.count > 0 then
91         a0.extend(t.count);
92         ddindx := t.first;
93         indx := 1;
94         while true loop
95           a0(indx) := t(ddindx).task_assignment_id;
96           indx := indx+1;
97           if t.last =ddindx
98             then exit;
99           end if;
100           ddindx := t.next(ddindx);
101         end loop;
102       end if;
103    end if;
104   end rosetta_table_copy_out_p3;
105 
106   procedure create_cal_assignment(p_task_id  NUMBER
107     , p1_a0 JTF_NUMBER_TABLE
108     , p1_a1 JTF_VARCHAR2_TABLE_100
109     , p_add_option  VARCHAR2
110     , p_invitor_res_id  NUMBER
111     , x_return_status out nocopy  VARCHAR2
112     , p5_a0 out nocopy JTF_NUMBER_TABLE
113   )
114 
115   as
116     ddp_resources jta_cal_attendees_pvt.resource_tbl;
117     ddx_task_assignment_ids jta_cal_attendees_pvt.task_assign_tbl;
118     ddindx binary_integer; indx binary_integer;
119   begin
120 
121     -- copy data to the local IN or IN-OUT args, if any
122 
123     jta_cal_attendees_pvt_w.rosetta_table_copy_in_p1(ddp_resources, p1_a0
124       , p1_a1
125       );
126 
127 
128 
129 
130 
131     -- here's the delegated call to the old PL/SQL routine
132     jta_cal_attendees_pvt.create_cal_assignment(p_task_id,
133       ddp_resources,
134       p_add_option,
135       p_invitor_res_id,
136       x_return_status,
137       ddx_task_assignment_ids);
138 
139     -- copy data back from the local variables to OUT or IN-OUT args, if any
140 
141 
142 
143 
144 
145     jta_cal_attendees_pvt_w.rosetta_table_copy_out_p3(ddx_task_assignment_ids, p5_a0
146       );
147   end;
148 
149   procedure delete_cal_assignment(p_object_version_number  NUMBER
150     , p1_a0 JTF_NUMBER_TABLE
151     , p_delete_option  VARCHAR2
152     , p_no_of_attendies  NUMBER
153     , x_return_status out nocopy  VARCHAR2
154   )
155 
156   as
157     ddp_task_assignments jta_cal_attendees_pvt.task_assign_tbl;
158     ddindx binary_integer; indx binary_integer;
159   begin
160 
161     -- copy data to the local IN or IN-OUT args, if any
162 
163     jta_cal_attendees_pvt_w.rosetta_table_copy_in_p3(ddp_task_assignments, p1_a0
164       );
165 
166 
167 
168 
169     -- here's the delegated call to the old PL/SQL routine
170     jta_cal_attendees_pvt.delete_cal_assignment(p_object_version_number,
171       ddp_task_assignments,
172       p_delete_option,
173       p_no_of_attendies,
174       x_return_status);
175 
176     -- copy data back from the local variables to OUT or IN-OUT args, if any
177 
178 
179 
180 
181   end;
182 
183 end jta_cal_attendees_pvt_w;