1 Package hr_scl_shd AUTHID CURRENT_USER as
2 /* $Header: hrsclrhi.pkh 115.4 2002/12/03 08:22:25 raranjan ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 soft_coding_keyflex_id number(15),
11 concatenated_segments varchar2(240),
12 request_id number(15),
13 program_application_id number(15),
14 program_id number(15),
15 program_update_date date,
16 id_flex_num number(15),
17 summary_flag varchar2(9), -- Increased length
18 enabled_flag varchar2(9), -- Increased length
19 start_date_active date,
20 end_date_active date,
21 segment1 varchar2(60),
22 segment2 varchar2(60),
23 segment3 varchar2(60),
24 segment4 varchar2(60),
25 segment5 varchar2(60),
26 segment6 varchar2(60),
27 segment7 varchar2(60),
28 segment8 varchar2(60),
29 segment9 varchar2(60),
30 segment10 varchar2(60),
31 segment11 varchar2(60),
32 segment12 varchar2(60),
33 segment13 varchar2(60),
34 segment14 varchar2(60),
35 segment15 varchar2(60),
36 segment16 varchar2(60),
37 segment17 varchar2(60),
38 segment18 varchar2(60),
39 segment19 varchar2(60),
40 segment20 varchar2(60),
41 segment21 varchar2(60),
42 segment22 varchar2(60),
43 segment23 varchar2(60),
44 segment24 varchar2(60),
45 segment25 varchar2(60),
46 segment26 varchar2(60),
47 segment27 varchar2(60),
48 segment28 varchar2(60),
49 segment29 varchar2(60),
50 segment30 varchar2(60)
51 );
52 --
53 -- ----------------------------------------------------------------------------
54 -- | Global Definitions - Internal Development Use Only |
55 -- ----------------------------------------------------------------------------
56 --
57 g_old_rec g_rec_type; -- Global record definition
58 g_api_dml boolean; -- Global api dml status
59 --
60 -- ----------------------------------------------------------------------------
61 -- |------------------------< segment_combination_check >---------------------|
62 -- ----------------------------------------------------------------------------
63 -- {Start Of Comments}
64 --
65 -- Description:
66 -- This procedure determines the combination state for the specified
67 -- soft coded combination segments. The returning
68 -- p_soft_coding_keyflex_id can have three states:
69 --
70 -- p_soft_coding_keyflex_id
71 -- state meaning
72 -- ===================== =======
73 -- -1 Segment combination does not exist
74 -- null The segment combination is null
75 -- id A segment combination has been found
76 --
77 -- Depending on the p_soft_coding_keyflex_id state the following out
78 -- parameters are either set or null.
79 --
80 -- p_soft_coding_keyflex_id out
81 -- state argument set
82 -- ===================== ======== ===
83 -- -1 p_id_flex_num Y
84 -- p_concatenated_segments N
85 --
86 -- null p_id_flex_num N
87 -- p_concatenated_segments N
88 --
89 -- id p_id_flex_num Y
90 -- p_concatenated_segments Y
91 --
92 -- Pre Conditions:
93 --
94 -- In Parameters:
95 -- segments1..30
96 -- p_business_group_id => is specified to enable the derivation of the
97 -- id_flex_num within this process
98 --
99 -- Post Success:
100 -- Depending on the p_soft_coding_keyflex_id state the corresponding out
101 -- arguments will be set.
102 --
103 -- Post Failure:
104 -- This procedure should never fail.
105 --
106 -- Developer Implementation Notes:
107 -- None.
108 --
109 -- Access Status:
110 -- Internal Development Use Only.
111 --
112 -- {End Of Comments}
113 -- ----------------------------------------------------------------------------
114 procedure segment_combination_check
115 (p_segment1 in varchar2 default null,
116 p_segment2 in varchar2 default null,
117 p_segment3 in varchar2 default null,
118 p_segment4 in varchar2 default null,
119 p_segment5 in varchar2 default null,
120 p_segment6 in varchar2 default null,
121 p_segment7 in varchar2 default null,
122 p_segment8 in varchar2 default null,
123 p_segment9 in varchar2 default null,
124 p_segment10 in varchar2 default null,
125 p_segment11 in varchar2 default null,
126 p_segment12 in varchar2 default null,
127 p_segment13 in varchar2 default null,
128 p_segment14 in varchar2 default null,
129 p_segment15 in varchar2 default null,
130 p_segment16 in varchar2 default null,
131 p_segment17 in varchar2 default null,
132 p_segment18 in varchar2 default null,
133 p_segment19 in varchar2 default null,
134 p_segment20 in varchar2 default null,
135 p_segment21 in varchar2 default null,
136 p_segment22 in varchar2 default null,
137 p_segment23 in varchar2 default null,
138 p_segment24 in varchar2 default null,
139 p_segment25 in varchar2 default null,
140 p_segment26 in varchar2 default null,
141 p_segment27 in varchar2 default null,
142 p_segment28 in varchar2 default null,
143 p_segment29 in varchar2 default null,
144 p_segment30 in varchar2 default null,
145 p_business_group_id in number,
146 p_soft_coding_keyflex_id out nocopy number,
147 p_concatenated_segments out nocopy varchar2,
148 p_id_flex_num out nocopy number);
149 --
150 -- ----------------------------------------------------------------------------
151 -- |------------------------< return_api_dml_status >-------------------------|
152 -- ----------------------------------------------------------------------------
153 -- {Start Of Comments}
154 --
155 -- Description:
156 -- This function will return the current g_api_dml private global
157 -- boolean status.
158 -- The g_api_dml status determines if at the time of the function
159 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
160 -- is being issued from within an api.
161 -- If the status is TRUE then a dml statement is being issued from
162 -- within this entity api.
163 -- This function is primarily to support database triggers which
164 -- need to maintain the object_version_number for non-supported
165 -- dml statements (i.e. dml statement issued outside of the api layer).
166 --
167 -- Pre Conditions:
168 -- None.
169 --
170 -- In Parameters:
171 -- None.
172 --
173 -- Post Success:
174 -- Processing continues.
175 -- If the function returns a TRUE value then, dml is being executed from
176 -- within this api.
177 --
178 -- Post Failure:
179 -- None.
180 --
181 -- Access Status:
182 -- Internal Table Handler Use Only.
183 --
184 -- {End Of Comments}
185 -- ----------------------------------------------------------------------------
186 Function return_api_dml_status Return Boolean;
187 --
188 -- ----------------------------------------------------------------------------
189 -- |---------------------------< constraint_error >---------------------------|
190 -- ----------------------------------------------------------------------------
191 -- {Start Of Comments}
192 --
193 -- Description:
194 -- This procedure is called when a constraint has been violated (i.e.
195 -- The exception hr_api.check_integrity_violated,
196 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
197 -- hr_api.unique_integrity_violated has been raised).
198 -- The exceptions can only be raised as follows:
199 -- 1) A check constraint can only be violated during an INSERT or UPDATE
200 -- dml operation.
201 -- 2) A parent integrity constraint can only be violated during an
202 -- INSERT or UPDATE dml operation.
203 -- 3) A child integrity constraint can only be violated during an
204 -- DELETE dml operation.
205 -- 4) A unique integrity constraint can only be violated during INSERT or
206 -- UPDATE dml operation.
207 --
208 -- Pre Conditions:
209 -- 1) Either hr_api.check_integrity_violated,
210 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
211 -- hr_api.unique_integrity_violated has been raised with the subsequent
212 -- stripping of the constraint name from the generated error message
213 -- text.
214 -- 2) Standalone validation test which corresponds with a constraint error.
215 --
216 -- In Parameter:
217 -- p_constraint_name is in upper format and is just the constraint name
218 -- (e.g. not prefixed by brackets, schema owner etc).
219 --
220 -- Post Success:
221 -- Development dependant.
222 --
223 -- Post Failure:
224 -- Developement dependant.
225 --
226 -- Developer Implementation Notes:
227 -- For each constraint being checked the hr system package failure message
228 -- has been generated as a template only. These system error messages should
229 -- be modified as required (i.e. change the system failure message to a user
230 -- friendly defined error message).
231 --
232 -- Access Status:
233 -- Internal Development Use Only.
234 --
235 -- {End Of Comments}
236 -- ----------------------------------------------------------------------------
237 Procedure constraint_error
238 (p_constraint_name in all_constraints.constraint_name%TYPE);
239 --
240 -- ----------------------------------------------------------------------------
241 -- |-----------------------------< api_updating >-----------------------------|
242 -- ----------------------------------------------------------------------------
243 -- {Start Of Comments}
244 --
245 -- Description:
246 -- This function is used to populate the g_old_rec record with the
247 -- current row from the database for the specified primary key
248 -- provided that the primary key exists and is valid and does not
249 -- already match the current g_old_rec. The function will always return
250 -- a TRUE value if the g_old_rec is populated with the current row.
251 -- A FALSE value will be returned if all of the primary key arguments
252 -- are null.
253 --
254 -- Pre Conditions:
255 -- None.
256 --
257 -- In Parameters:
258 --
259 -- Post Success:
260 -- A value of TRUE will be returned indiciating that the g_old_rec
261 -- is current.
262 -- A value of FALSE will be returned if all of the primary key arguments
263 -- have a null value (this indicates that the row has not be inserted into
264 -- the Schema), and therefore could never have a corresponding row.
265 --
266 -- Post Failure:
267 -- A failure can only occur under two circumstances:
268 -- 1) The primary key is invalid (i.e. a row does not exist for the
269 -- specified primary key values).
270 -- 2) If an object_version_number exists but is NOT the same as the current
271 -- g_old_rec value.
272 --
273 -- Developer Implementation Notes:
274 -- None.
275 --
276 -- Access Status:
277 -- Internal Development Use Only.
278 --
279 -- {End Of Comments}
280 -- ----------------------------------------------------------------------------
281 Function api_updating
282 (p_soft_coding_keyflex_id in number) Return Boolean;
283 --
284 -- ----------------------------------------------------------------------------
285 -- |-----------------------------< convert_args >-----------------------------|
286 -- ----------------------------------------------------------------------------
287 -- {Start Of Comments}
288 --
289 -- Description:
290 -- This function is used to turn attribute parameters into the record
291 -- structure parameter g_rec_type.
292 --
293 -- Pre Conditions:
294 -- This is a private function and can only be called from the ins or upd
295 -- attribute processes.
296 --
297 -- In Parameters:
298 --
299 -- Post Success:
300 -- A returning record structure will be returned.
301 --
302 -- Post Failure:
303 -- No direct error handling is required within this function. Any possible
304 -- errors within this function will be a PL/SQL value error due to conversion
305 -- of datatypes or data lengths.
306 --
307 -- Developer Implementation Notes:
308 -- None.
309 --
310 -- Access Status:
311 -- Internal Table Handler Use Only.
312 --
313 -- {End Of Comments}
314 -- ----------------------------------------------------------------------------
315 Function convert_args
316 (
317 p_soft_coding_keyflex_id in number,
318 p_concatenated_segments in varchar2,
319 p_request_id in number,
320 p_program_application_id in number,
321 p_program_id in number,
322 p_program_update_date in date,
323 p_id_flex_num in number,
324 p_summary_flag in varchar2,
325 p_enabled_flag in varchar2,
326 p_start_date_active in date,
327 p_end_date_active in date,
328 p_segment1 in varchar2,
329 p_segment2 in varchar2,
330 p_segment3 in varchar2,
331 p_segment4 in varchar2,
332 p_segment5 in varchar2,
333 p_segment6 in varchar2,
334 p_segment7 in varchar2,
335 p_segment8 in varchar2,
336 p_segment9 in varchar2,
337 p_segment10 in varchar2,
338 p_segment11 in varchar2,
339 p_segment12 in varchar2,
340 p_segment13 in varchar2,
341 p_segment14 in varchar2,
342 p_segment15 in varchar2,
343 p_segment16 in varchar2,
344 p_segment17 in varchar2,
345 p_segment18 in varchar2,
346 p_segment19 in varchar2,
347 p_segment20 in varchar2,
348 p_segment21 in varchar2,
349 p_segment22 in varchar2,
350 p_segment23 in varchar2,
351 p_segment24 in varchar2,
352 p_segment25 in varchar2,
353 p_segment26 in varchar2,
354 p_segment27 in varchar2,
355 p_segment28 in varchar2,
356 p_segment29 in varchar2,
357 p_segment30 in varchar2
358 )
359 Return g_rec_type;
360 --
361 end hr_scl_shd;