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