DBA Data[Home] [Help]

PACKAGE BODY: APPS.HZ_RELATIONSHIP_TYPE_V2PUB_JW

Source


1 package body hz_relationship_type_v2pub_jw as
2   /* $Header: ARH2RTJB.pls 120.4 2005/06/18 04:29:11 jhuang noship $ */
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   function rosetta_g_miss_num_map(n number) return number as
7     a number := fnd_api.g_miss_num;
8     b number := 0-1962.0724;
9   begin
10     if n=a then return b; end if;
11     if n=b then return a; end if;
12     return n;
13   end;
14 
15   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
16   function rosetta_g_miss_date_in_map(d date) return date as
17   begin
18     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
19     return d;
20   end;
21 
22   procedure create_relationship_type_1(p_init_msg_list  VARCHAR2
23     , x_relationship_type_id out nocopy  NUMBER
24     , x_return_status out nocopy  VARCHAR2
25     , x_msg_count out nocopy  NUMBER
26     , x_msg_data out nocopy  VARCHAR2
27     , p1_a0  NUMBER := null
28     , p1_a1  VARCHAR2 := null
29     , p1_a2  VARCHAR2 := null
30     , p1_a3  VARCHAR2 := null
31     , p1_a4  VARCHAR2 := null
32     , p1_a5  VARCHAR2 := null
33     , p1_a6  VARCHAR2 := null
34     , p1_a7  VARCHAR2 := null
35     , p1_a8  VARCHAR2 := null
36     , p1_a9  VARCHAR2 := null
37     , p1_a10  VARCHAR2 := null
38     , p1_a11  VARCHAR2 := null
39     , p1_a12  VARCHAR2 := null
40     , p1_a13  NUMBER := null
41     , p1_a14  VARCHAR2 := null
42     , p1_a15  VARCHAR2 := null
43     , p1_a16  VARCHAR2 := null
44     , p1_a17  VARCHAR2 := null
45   )
46   as
47     ddp_relationship_type_rec hz_relationship_type_v2pub.relationship_type_rec_type;
48     ddindx binary_integer; indx binary_integer;
49   begin
50 
51     -- copy data to the local IN or IN-OUT args, if any
52 
53     ddp_relationship_type_rec.relationship_type_id := rosetta_g_miss_num_map(p1_a0);
54     ddp_relationship_type_rec.relationship_type := p1_a1;
55     ddp_relationship_type_rec.forward_rel_code := p1_a2;
56     ddp_relationship_type_rec.backward_rel_code := p1_a3;
57     ddp_relationship_type_rec.direction_code := p1_a4;
58     ddp_relationship_type_rec.hierarchical_flag := p1_a5;
59     ddp_relationship_type_rec.create_party_flag := p1_a6;
60     ddp_relationship_type_rec.allow_relate_to_self_flag := p1_a7;
61     ddp_relationship_type_rec.allow_circular_relationships := p1_a8;
62     ddp_relationship_type_rec.subject_type := p1_a9;
63     ddp_relationship_type_rec.object_type := p1_a10;
64     ddp_relationship_type_rec.status := p1_a11;
65     ddp_relationship_type_rec.created_by_module := p1_a12;
66     ddp_relationship_type_rec.application_id := rosetta_g_miss_num_map(p1_a13);
67     ddp_relationship_type_rec.multiple_parent_allowed := p1_a14;
68     ddp_relationship_type_rec.incl_unrelated_entities := p1_a15;
69     ddp_relationship_type_rec.forward_role := p1_a16;
70     ddp_relationship_type_rec.backward_role := p1_a17;
71 
72 
73 
74 
75 
76     -- here's the delegated call to the old PL/SQL routine
77     hz_relationship_type_v2pub.create_relationship_type(p_init_msg_list,
78       ddp_relationship_type_rec,
79       x_relationship_type_id,
80       x_return_status,
81       x_msg_count,
82       x_msg_data);
83 
84     -- copy data back from the local OUT or IN-OUT args, if any
85 
86 
87 
88 
89 
90   end;
91 
92   procedure update_relationship_type_2(p_init_msg_list  VARCHAR2
93     , p_object_version_number in out nocopy  NUMBER
94     , x_return_status out nocopy  VARCHAR2
95     , x_msg_count out nocopy  NUMBER
96     , x_msg_data out nocopy  VARCHAR2
97     , p1_a0  NUMBER := null
98     , p1_a1  VARCHAR2 := null
99     , p1_a2  VARCHAR2 := null
100     , p1_a3  VARCHAR2 := null
101     , p1_a4  VARCHAR2 := null
102     , p1_a5  VARCHAR2 := null
103     , p1_a6  VARCHAR2 := null
104     , p1_a7  VARCHAR2 := null
105     , p1_a8  VARCHAR2 := null
106     , p1_a9  VARCHAR2 := null
107     , p1_a10  VARCHAR2 := null
108     , p1_a11  VARCHAR2 := null
109     , p1_a12  VARCHAR2 := null
110     , p1_a13  NUMBER := null
111     , p1_a14  VARCHAR2 := null
112     , p1_a15  VARCHAR2 := null
113     , p1_a16  VARCHAR2 := null
114     , p1_a17  VARCHAR2 := null
115   )
116   as
117     ddp_relationship_type_rec hz_relationship_type_v2pub.relationship_type_rec_type;
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     ddp_relationship_type_rec.relationship_type_id := rosetta_g_miss_num_map(p1_a0);
124     ddp_relationship_type_rec.relationship_type := p1_a1;
125     ddp_relationship_type_rec.forward_rel_code := p1_a2;
126     ddp_relationship_type_rec.backward_rel_code := p1_a3;
127     ddp_relationship_type_rec.direction_code := p1_a4;
128     ddp_relationship_type_rec.hierarchical_flag := p1_a5;
129     ddp_relationship_type_rec.create_party_flag := p1_a6;
130     ddp_relationship_type_rec.allow_relate_to_self_flag := p1_a7;
131     ddp_relationship_type_rec.allow_circular_relationships := p1_a8;
132     ddp_relationship_type_rec.subject_type := p1_a9;
133     ddp_relationship_type_rec.object_type := p1_a10;
134     ddp_relationship_type_rec.status := p1_a11;
135     ddp_relationship_type_rec.created_by_module := p1_a12;
136     ddp_relationship_type_rec.application_id := rosetta_g_miss_num_map(p1_a13);
137     ddp_relationship_type_rec.multiple_parent_allowed := p1_a14;
138     ddp_relationship_type_rec.incl_unrelated_entities := p1_a15;
139     ddp_relationship_type_rec.forward_role := p1_a16;
140     ddp_relationship_type_rec.backward_role := p1_a17;
141 
142 
143 
144 
145 
146     -- here's the delegated call to the old PL/SQL routine
147     hz_relationship_type_v2pub.update_relationship_type(p_init_msg_list,
148       ddp_relationship_type_rec,
149       p_object_version_number,
150       x_return_status,
151       x_msg_count,
152       x_msg_data);
153 
154     -- copy data back from the local OUT or IN-OUT args, if any
155 
156 
157 
158 
159 
160   end;
161 
162 end hz_relationship_type_v2pub_jw;