1 Package hr_itp_shd as
2 /* $Header: hritprhi.pkh 120.0 2005/05/31 01:00:40 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (item_property_id number(15)
10 ,object_version_number number(9)
11 ,form_item_id number(15)
12 ,template_item_id number(15)
13 ,template_item_context_id number(15)
14 ,alignment number(10)
15 ,bevel number(10)
16 ,case_restriction number(10)
17 ,enabled number(10)
18 ,format_mask varchar2(80)
19 ,height number(12,2)
20 ,information_formula_id number(15)
21 ,information_parameter_item_id1 number(15)
22 ,information_parameter_item_id2 number(15)
23 ,information_parameter_item_id3 number(15)
24 ,information_parameter_item_id4 number(15)
25 ,information_parameter_item_id5 number(15)
26 ,insert_allowed number(10)
27 ,prompt_alignment_offset number(12,2)
28 ,prompt_display_style number(10)
29 ,prompt_edge number(10)
30 ,prompt_edge_alignment number(10)
31 ,prompt_edge_offset number(12,2)
32 ,prompt_text_alignment number(10)
33 ,query_allowed number(10)
34 ,required number(10)
35 ,update_allowed number(10)
36 ,validation_formula_id number(15)
37 ,validation_parameter_item_id1 number(15)
38 ,validation_parameter_item_id2 number(15)
39 ,validation_parameter_item_id3 number(15)
40 ,validation_parameter_item_id4 number(15)
41 ,validation_parameter_item_id5 number(15)
42 ,visible number(10)
43 ,width number(12,2)
44 ,x_position number(12,2)
45 ,y_position number(12,2)
46 ,information_category varchar2(150)
47 ,information1 varchar2(150)
48 ,information2 varchar2(150)
49 ,information3 varchar2(150)
50 ,information4 varchar2(150)
51 ,information5 varchar2(150)
52 ,information6 varchar2(150)
53 ,information7 varchar2(150)
54 ,information8 varchar2(150)
55 ,information9 varchar2(150)
56 ,information10 varchar2(150)
57 ,information11 varchar2(150)
58 ,information12 varchar2(150)
59 ,information13 varchar2(150)
60 ,information14 varchar2(150)
61 ,information15 varchar2(150)
62 ,information16 varchar2(150)
63 ,information17 varchar2(150)
64 ,information18 varchar2(150)
65 ,information19 varchar2(150)
66 ,information20 varchar2(150)
67 ,information21 varchar2(150)
68 ,information22 varchar2(150)
69 ,information23 varchar2(150)
70 ,information24 varchar2(150)
71 ,information25 varchar2(150)
72 ,information26 varchar2(150)
73 ,information27 varchar2(150)
74 ,information28 varchar2(150)
75 ,information29 varchar2(150)
76 ,information30 varchar2(150)
77 ,next_navigation_item_id number(15)
78 ,previous_navigation_item_id number(15)
79 );
80 --
81 -- ----------------------------------------------------------------------------
82 -- | Global Definitions - Internal Development Use Only |
83 -- ----------------------------------------------------------------------------
84 --
85 g_old_rec g_rec_type; -- Global record definition
86 --
87 -- ----------------------------------------------------------------------------
88 -- |---------------------------< constraint_error >---------------------------|
89 -- ----------------------------------------------------------------------------
90 -- {Start Of Comments}
91 --
92 -- Description:
93 -- This procedure is called when a constraint has been violated (i.e.
94 -- The exception hr_api.check_integrity_violated,
95 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
96 -- hr_api.unique_integrity_violated has been raised).
97 -- The exceptions can only be raised as follows:
98 -- 1) A check constraint can only be violated during an INSERT or UPDATE
99 -- dml operation.
100 -- 2) A parent integrity constraint can only be violated during an
101 -- INSERT or UPDATE dml operation.
102 -- 3) A child integrity constraint can only be violated during an
103 -- DELETE dml operation.
104 -- 4) A unique integrity constraint can only be violated during INSERT or
105 -- UPDATE dml operation.
106 --
107 -- Prerequisites:
108 -- 1) Either hr_api.check_integrity_violated,
109 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
110 -- hr_api.unique_integrity_violated has been raised with the subsequent
111 -- stripping of the constraint name from the generated error message
112 -- text.
113 -- 2) Standalone validation test which corresponds with a constraint error.
114 --
115 -- In Parameter:
116 -- p_constraint_name is in upper format and is just the constraint name
117 -- (e.g. not prefixed by brackets, schema owner etc).
118 --
119 -- Post Success:
120 -- Development dependant.
121 --
122 -- Post Failure:
123 -- Developement dependant.
124 --
125 -- Developer Implementation Notes:
126 -- For each constraint being checked the hr system package failure message
127 -- has been generated as a template only. These system error messages should
128 -- be modified as required (i.e. change the system failure message to a user
129 -- friendly defined error message).
130 --
131 -- Access Status:
132 -- Internal Development Use Only.
133 --
134 -- {End Of Comments}
135 -- ----------------------------------------------------------------------------
136 Procedure constraint_error
137 (p_constraint_name in all_constraints.constraint_name%TYPE);
138 --
139 -- ----------------------------------------------------------------------------
140 -- |-----------------------------< api_updating >-----------------------------|
141 -- ----------------------------------------------------------------------------
142 -- {Start Of Comments}
143 --
144 -- Description:
145 -- This function is used to populate the g_old_rec record with the
146 -- current row from the database for the specified primary key
147 -- provided that the primary key exists and is valid and does not
148 -- already match the current g_old_rec. The function will always return
149 -- a TRUE value if the g_old_rec is populated with the current row.
150 -- A FALSE value will be returned if all of the primary key arguments
151 -- are null.
152 --
153 -- Prerequisites:
154 -- None.
155 --
156 -- In Parameters:
157 --
158 -- Post Success:
159 -- A value of TRUE will be returned indiciating that the g_old_rec
160 -- is current.
161 -- A value of FALSE will be returned if all of the primary key arguments
162 -- have a null value (this indicates that the row has not be inserted into
163 -- the Schema), and therefore could never have a corresponding row.
164 --
165 -- Post Failure:
166 -- A failure can only occur under two circumstances:
167 -- 1) The primary key is invalid (i.e. a row does not exist for the
168 -- specified primary key values).
169 -- 2) If an object_version_number exists but is NOT the same as the current
170 -- g_old_rec value.
171 --
172 -- Developer Implementation Notes:
173 -- None.
174 --
175 -- Access Status:
176 -- Internal Development Use Only.
177 --
178 -- {End Of Comments}
179 -- ----------------------------------------------------------------------------
180 Function api_updating
181 (p_item_property_id in number
182 ,p_object_version_number in number
183 ) Return Boolean;
184 --
185 -- ----------------------------------------------------------------------------
186 -- |---------------------------------< lck >----------------------------------|
187 -- ----------------------------------------------------------------------------
188 -- {Start of comments}
189 --
190 -- Description:
191 -- The Lck process has two main functions to perform. Firstly, the row to be
192 -- updated or deleted must be locked. The locking of the row will only be
193 -- successful if the row is not currently locked by another user.
194 -- Secondly, during the locking of the row, the row is selected into
195 -- the g_old_rec data structure which enables the current row values from the
196 -- server to be available to the api.
197 --
198 -- Prerequisites:
199 -- When attempting to call the lock the object version number (if defined)
200 -- is mandatory.
201 --
202 -- In Parameters:
203 -- The arguments to the Lck process are the primary key(s) which uniquely
204 -- identify the row and the object version number of row.
205 --
206 -- Post Success:
207 -- On successful completion of the Lck process the row to be updated or
208 -- deleted will be locked and selected into the global data structure
209 -- g_old_rec.
210 --
211 -- Post Failure:
212 -- The Lck process can fail for three reasons:
213 -- 1) When attempting to lock the row the row could already be locked by
214 -- another user. This will raise the HR_Api.Object_Locked exception.
215 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
216 -- This error is trapped and reported using the message name
217 -- 'HR_7220_INVALID_PRIMARY_KEY'.
218 -- 3) The row although existing in the HR Schema has a different object
219 -- version number than the object version number specified.
220 -- This error is trapped and reported using the message name
221 -- 'HR_7155_OBJECT_INVALID'.
222 --
223 -- Developer Implementation Notes:
224 -- For each primary key and the object version number arguments add a
225 -- call to hr_api.mandatory_arg_error procedure to ensure that these
226 -- argument values are not null.
227 --
228 -- Access Status:
229 -- Internal Development Use Only.
230 --
231 -- {End of comments}
232 -- ----------------------------------------------------------------------------
233 Procedure lck
234 (p_item_property_id in number
235 ,p_object_version_number in number
236 );
237 --
238 -- ----------------------------------------------------------------------------
239 -- |-----------------------------< convert_args >-----------------------------|
240 -- ----------------------------------------------------------------------------
241 -- {Start Of Comments}
242 --
243 -- Description:
244 -- This function is used to turn attribute parameters into the record
245 -- structure parameter g_rec_type.
246 --
247 -- Prerequisites:
248 -- This is a private function and can only be called from the ins or upd
249 -- attribute processes.
250 --
251 -- In Parameters:
252 --
253 -- Post Success:
254 -- A returning record structure will be returned.
255 --
256 -- Post Failure:
257 -- No direct error handling is required within this function. Any possible
258 -- errors within this function will be a PL/SQL value error due to conversion
259 -- of datatypes or data lengths.
260 --
261 -- Developer Implementation Notes:
262 -- None.
263 --
264 -- Access Status:
265 -- Internal Row Handler Use Only.
266 --
267 -- {End Of Comments}
268 -- ----------------------------------------------------------------------------
269 Function convert_args
270 (p_item_property_id in number
271 ,p_object_version_number in number
272 ,p_form_item_id in number
273 ,p_template_item_id in number
274 ,p_template_item_context_id in number
275 ,p_alignment in number
276 ,p_bevel in number
277 ,p_case_restriction in number
278 ,p_enabled in number
279 ,p_format_mask in varchar2
280 ,p_height in number
281 ,p_information_formula_id in number
282 ,p_information_param_item_id1 in number
283 ,p_information_param_item_id2 in number
284 ,p_information_param_item_id3 in number
285 ,p_information_param_item_id4 in number
286 ,p_information_param_item_id5 in number
287 ,p_insert_allowed in number
288 ,p_prompt_alignment_offset in number
289 ,p_prompt_display_style in number
290 ,p_prompt_edge in number
291 ,p_prompt_edge_alignment in number
292 ,p_prompt_edge_offset in number
293 ,p_prompt_text_alignment in number
294 ,p_query_allowed in number
295 ,p_required in number
296 ,p_update_allowed in number
297 ,p_validation_formula_id in number
298 ,p_validation_param_item_id1 in number
299 ,p_validation_param_item_id2 in number
300 ,p_validation_param_item_id3 in number
301 ,p_validation_param_item_id4 in number
302 ,p_validation_param_item_id5 in number
303 ,p_visible in number
304 ,p_width in number
305 ,p_x_position in number
306 ,p_y_position in number
307 ,p_information_category in varchar2
308 ,p_information1 in varchar2
309 ,p_information2 in varchar2
310 ,p_information3 in varchar2
311 ,p_information4 in varchar2
312 ,p_information5 in varchar2
313 ,p_information6 in varchar2
314 ,p_information7 in varchar2
315 ,p_information8 in varchar2
316 ,p_information9 in varchar2
317 ,p_information10 in varchar2
318 ,p_information11 in varchar2
319 ,p_information12 in varchar2
320 ,p_information13 in varchar2
321 ,p_information14 in varchar2
322 ,p_information15 in varchar2
323 ,p_information16 in varchar2
324 ,p_information17 in varchar2
325 ,p_information18 in varchar2
326 ,p_information19 in varchar2
327 ,p_information20 in varchar2
328 ,p_information21 in varchar2
329 ,p_information22 in varchar2
330 ,p_information23 in varchar2
331 ,p_information24 in varchar2
332 ,p_information25 in varchar2
333 ,p_information26 in varchar2
334 ,p_information27 in varchar2
335 ,p_information28 in varchar2
336 ,p_information29 in varchar2
337 ,p_information30 in varchar2
338 ,p_next_navigation_item_id in number
339 ,p_previous_navigation_item_id in number
340 )
341 Return g_rec_type;
342 --
343 end hr_itp_shd;