DBA Data[Home] [Help]

PACKAGE: APPS.HXC_HPH_SHD

Source


1 Package hxc_hph_shd as
2 /* $Header: hxchphrhi.pkh 120.0 2005/05/29 05:37:21 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (pref_hierarchy_id               number(15)
10   ,type                            varchar2(30)
11   ,name                            varchar2(80)
12   ,business_group_id		   number(15)
13   ,legislation_code		   varchar2(30)
14   ,parent_pref_hierarchy_id        number(15)
15   ,edit_allowed                    varchar2(9)
16   ,displayed                       varchar2(9)
17   ,pref_definition_id              number(15)
18   ,attribute_category              varchar2(30)
19   ,attribute1                      varchar2(150)
20   ,attribute2                      varchar2(150)
21   ,attribute3                      varchar2(150)
22   ,attribute4                      varchar2(150)
23   ,attribute5                      varchar2(150)
24   ,attribute6                      varchar2(150)
25   ,attribute7                      varchar2(150)
26   ,attribute8                      varchar2(150)
27   ,attribute9                      varchar2(150)
28   ,attribute10                     varchar2(150)
29   ,attribute11                     varchar2(150)
30   ,attribute12                     varchar2(150)
31   ,attribute13                     varchar2(150)
32   ,attribute14                     varchar2(150)
33   ,attribute15                     varchar2(150)
34   ,attribute16                     varchar2(150)
35   ,attribute17                     varchar2(150)
36   ,attribute18                     varchar2(150)
37   ,attribute19                     varchar2(150)
38   ,attribute20                     varchar2(150)
39   ,attribute21                     varchar2(150)
40   ,attribute22                     varchar2(150)
41   ,attribute23                     varchar2(150)
42   ,attribute24                     varchar2(150)
43   ,attribute25                     varchar2(150)
44   ,attribute26                     varchar2(150)
45   ,attribute27                     varchar2(150)
46   ,attribute28                     varchar2(150)
47   ,attribute29                     varchar2(150)
48   ,attribute30                     varchar2(150)
49   ,object_version_number           number(9)
50   ,orig_pref_hierarchy_id          number(15)
51   ,orig_parent_hierarchy_id        number(15)
52   ,top_level_parent_id             number(15)  --Performance Fix
53   ,code                            varchar2(30)
54   );
55 
56   Type alias_type_rec is Record
57         (id number(15));
58   Type alias_type_id_table is
59         table of alias_type_rec index
60 	by binary_integer;
61   Type alias_mapping_rec is record
62         (mapping_id number);
63   Type alias_mapping_table is
64         table of alias_mapping_rec index
65 	by binary_integer;
66   Type alias_mapping_names is record
67         (mapping_comp_name varchar2(80));
68   Type alias_mapping_name_table is
69         table of alias_mapping_names index
70 	by binary_integer;
71 --
72 -- ----------------------------------------------------------------------------
73 -- |           Global Definitions - Internal Development Use Only             |
74 -- ----------------------------------------------------------------------------
75 --
76 g_old_rec  g_rec_type;                            -- Global record definition
77 --
78 -- ----------------------------------------------------------------------------
79 -- |---------------------------< constraint_error >---------------------------|
80 -- ----------------------------------------------------------------------------
81 -- {Start Of Comments}
82 --
83 -- Description:
84 --   This procedure is called when a constraint has been violated (i.e.
85 --   The exception hr_api.check_integrity_violated,
86 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
87 --   hr_api.unique_integrity_violated has been raised).
88 --   The exceptions can only be raised as follows:
89 --   1) A check constraint can only be violated during an INSERT or UPDATE
90 --      dml operation.
91 --   2) A parent integrity constraint can only be violated during an
92 --      INSERT or UPDATE dml operation.
93 --   3) A child integrity constraint can only be violated during an
94 --      DELETE dml operation.
95 --   4) A unique integrity constraint can only be violated during INSERT or
96 --      UPDATE dml operation.
97 --
98 -- Prerequisites:
99 --   1) Either hr_api.check_integrity_violated,
100 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
101 --      hr_api.unique_integrity_violated has been raised with the subsequent
102 --      stripping of the constraint name from the generated error message
103 --      text.
104 --   2) Standalone validation test which corresponds with a constraint error.
105 --
106 -- In Parameter:
107 --   p_constraint_name is in upper format and is just the constraint name
108 --   (e.g. not prefixed by brackets, schema owner etc).
109 --
110 -- Post Success:
111 --   Development dependant.
112 --
113 -- Post Failure:
114 --   Developement dependant.
115 --
116 -- Developer Implementation Notes:
117 --   For each constraint being checked the hr system package failure message
118 --   has been generated as a template only. These system error messages should
119 --   be modified as required (i.e. change the system failure message to a user
120 --   friendly defined error message).
121 --
122 -- Access Status:
123 --   Internal Development Use Only.
124 --
125 -- {End Of Comments}
126 -- ----------------------------------------------------------------------------
127 Procedure constraint_error
128   (p_constraint_name in all_constraints.constraint_name%TYPE);
129 --
130 -- ----------------------------------------------------------------------------
131 -- |-----------------------------< api_updating >-----------------------------|
132 -- ----------------------------------------------------------------------------
133 --  {Start Of Comments}
134 --
135 -- Description:
136 --   This function is used to populate the g_old_rec record with the
137 --   current row from the database for the specified primary key
138 --   provided that the primary key exists and is valid and does not
139 --   already match the current g_old_rec. The function will always return
140 --   a TRUE value if the g_old_rec is populated with the current row.
141 --   A FALSE value will be returned if all of the primary key arguments
142 --   are null.
143 --
144 -- Prerequisites:
145 --   None.
146 --
147 -- In Parameters:
148 --
149 -- Post Success:
150 --   A value of TRUE will be returned indiciating that the g_old_rec
151 --   is current.
152 --   A value of FALSE will be returned if all of the primary key arguments
153 --   have a null value (this indicates that the row has not be inserted into
154 --   the Schema), and therefore could never have a corresponding row.
155 --
156 -- Post Failure:
157 --   A failure can only occur under two circumstances:
158 --   1) The primary key is invalid (i.e. a row does not exist for the
159 --      specified primary key values).
160 --   2) If an object_version_number exists but is NOT the same as the current
161 --      g_old_rec value.
162 --
163 -- Developer Implementation Notes:
164 --   None.
165 --
166 -- Access Status:
167 --   Internal Development Use Only.
168 --
169 -- {End Of Comments}
170 -- ----------------------------------------------------------------------------
171 Function api_updating
172   (p_pref_hierarchy_id                    in     number
173   ,p_object_version_number                in     number
174   )      Return Boolean;
175 
176 -- ----------------------------------------------------------------------------
177 -- |---------------------------------< lck >----------------------------------|
178 -- ----------------------------------------------------------------------------
179 -- {Start of comments}
180 --
181 -- Description:
182 --   The Lck process has two main functions to perform. Firstly, the row to be
183 --   updated or deleted must be locked. The locking of the row will only be
184 --   successful if the row is not currently locked by another user.
185 --   Secondly, during the locking of the row, the row is selected into
186 --   the g_old_rec data structure which enables the current row values from the
187 --   server to be available to the api.
188 --
189 -- Prerequisites:
190 --   When attempting to call the lock the object version number (if defined)
191 --   is mandatory.
192 --
193 -- In Parameters:
194 --   The arguments to the Lck process are the primary key(s) which uniquely
195 --   identify the row and the object version number of row.
196 --
197 -- Post Success:
198 --   On successful completion of the Lck process the row to be updated or
199 --   deleted will be locked and selected into the global data structure
200 --   g_old_rec.
201 --
202 -- Post Failure:
203 --   The Lck process can fail for three reasons:
204 --   1) When attempting to lock the row the row could already be locked by
205 --      another user. This will raise the HR_Api.Object_Locked exception.
206 --   2) The row which is required to be locked doesn't exist in the HR Schema.
207 --      This error is trapped and reported using the message name
208 --      'HR_7220_INVALID_PRIMARY_KEY'.
209 --   3) The row although existing in the HR Schema has a different object
210 --      version number than the object version number specified.
211 --      This error is trapped and reported using the message name
212 --      'HR_7155_OBJECT_INVALID'.
213 --
214 -- Developer Implementation Notes:
215 --   For each primary key and the object version number arguments add a
216 --   call to hr_api.mandatory_arg_error procedure to ensure that these
217 --   argument values are not null.
218 --
219 -- Access Status:
220 --   Internal Development Use Only.
221 --
222 -- {End of comments}
223 -- ----------------------------------------------------------------------------
224 Procedure lck
225   (p_pref_hierarchy_id                    in     number
226   ,p_object_version_number                in     number
227   );
228 --
229 -- ----------------------------------------------------------------------------
230 -- |-----------------------------< convert_args >-----------------------------|
231 -- ----------------------------------------------------------------------------
232 -- {Start Of Comments}
233 --
234 -- Description:
235 --   This function is used to turn attribute parameters into the record
236 --   structure parameter g_rec_type.
237 --
238 -- Prerequisites:
239 --   This is a private function and can only be called from the ins or upd
240 --   attribute processes.
241 --
242 -- In Parameters:
243 --
244 -- Post Success:
245 --   A returning record structure will be returned.
246 --
247 -- Post Failure:
248 --   No direct error handling is required within this function.  Any possible
249 --   errors within this function will be a PL/SQL value error due to conversion
250 --   of datatypes or data lengths.
251 --
252 -- Developer Implementation Notes:
253 --   None.
254 --
255 -- Access Status:
256 --   Internal Row Handler Use Only.
257 --
258 -- {End Of Comments}
259 -- ----------------------------------------------------------------------------
260 Function convert_args
261   (p_pref_hierarchy_id              in number
262   ,p_type                           in varchar2
263   ,p_name                           in varchar2
264   ,p_business_group_id		    in number
265   ,p_legislation_code		    in varchar2
266   ,p_parent_pref_hierarchy_id       in number
267   ,p_edit_allowed                   in varchar2
268   ,p_displayed                      in varchar2
269   ,p_pref_definition_id             in number
270   ,p_attribute_category             in varchar2
271   ,p_attribute1                     in varchar2
272   ,p_attribute2                     in varchar2
273   ,p_attribute3                     in varchar2
274   ,p_attribute4                     in varchar2
275   ,p_attribute5                     in varchar2
276   ,p_attribute6                     in varchar2
277   ,p_attribute7                     in varchar2
278   ,p_attribute8                     in varchar2
279   ,p_attribute9                     in varchar2
280   ,p_attribute10                    in varchar2
281   ,p_attribute11                    in varchar2
282   ,p_attribute12                    in varchar2
283   ,p_attribute13                    in varchar2
284   ,p_attribute14                    in varchar2
285   ,p_attribute15                    in varchar2
286   ,p_attribute16                    in varchar2
287   ,p_attribute17                    in varchar2
288   ,p_attribute18                    in varchar2
289   ,p_attribute19                    in varchar2
290   ,p_attribute20                    in varchar2
291   ,p_attribute21                    in varchar2
292   ,p_attribute22                    in varchar2
293   ,p_attribute23                    in varchar2
294   ,p_attribute24                    in varchar2
295   ,p_attribute25                    in varchar2
296   ,p_attribute26                    in varchar2
297   ,p_attribute27                    in varchar2
298   ,p_attribute28                    in varchar2
299   ,p_attribute29                    in varchar2
300   ,p_attribute30                    in varchar2
301   ,p_object_version_number          in number
302   ,p_orig_pref_hierarchy_id         in number
303   ,p_orig_parent_hierarchy_id       in number
304   ,p_top_level_parent_id            in number --Performance Fix
305   ,p_code                           in varchar2
306   )
307   Return g_rec_type;
308 --
309 end hxc_hph_shd;