DBA Data[Home] [Help]

PACKAGE: APPS.PER_PDS_SHD

Source


1 Package per_pds_shd AUTHID CURRENT_USER as
2 /* $Header: pepdsrhi.pkh 120.2 2011/11/17 09:33:49 sidsaxen ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   period_of_service_id              number(9),
11   business_group_id                 number(15),
12   termination_accepted_person_id    per_periods_of_service.termination_accepted_person_id%TYPE,
13   person_id                         per_periods_of_service.person_id%TYPE,
14   date_start                        date,
15   accepted_termination_date         date,
16   actual_termination_date           date,
17   comments                          clob,
18   final_process_date                date,
19   last_standard_process_date        date,
20   leaving_reason                    varchar2(30),
21   notified_termination_date         date,
22   projected_termination_date        date,
23   adjusted_svc_date                 date,
24   request_id                        number(15),
25   program_application_id            number(15),
26   program_id                        number(15),
27   program_update_date               date,
28   attribute_category                varchar2(30),
29   attribute1                        varchar2(150),
30   attribute2                        varchar2(150),
31   attribute3                        varchar2(150),
32   attribute4                        varchar2(150),
33   attribute5                        varchar2(150),
34   attribute6                        varchar2(150),
35   attribute7                        varchar2(150),
36   attribute8                        varchar2(150),
37   attribute9                        varchar2(150),
38   attribute10                       varchar2(150),
39   attribute11                       varchar2(150),
40   attribute12                       varchar2(150),
41   attribute13                       varchar2(150),
42   attribute14                       varchar2(150),
43   attribute15                       varchar2(150),
44   attribute16                       varchar2(150),
45   attribute17                       varchar2(150),
46   attribute18                       varchar2(150),
47   attribute19                       varchar2(150),
48   attribute20                       varchar2(150),
49   object_version_number             number(9) ,
50   prior_employment_ssp_weeks        number(15),
51   prior_employment_ssp_paid_to      date,
52   pds_information_category          varchar2(30),
53   pds_information1                  varchar2(150),
54   pds_information2                  varchar2(150),
55   pds_information3                  varchar2(150),
56   pds_information4                  varchar2(150),
57   pds_information5                  varchar2(150),
58   pds_information6                  varchar2(150),
59   pds_information7                  varchar2(150),
60   pds_information8                  varchar2(150),
61   pds_information9                  varchar2(150),
62   pds_information10                 varchar2(150),
63   pds_information11                 varchar2(150),
64   pds_information12                 varchar2(150),
65   pds_information13                 varchar2(150),
66   pds_information14                 varchar2(150),
67   pds_information15                 varchar2(150),
68   pds_information16                 varchar2(150),
69   pds_information17                 varchar2(150),
70   pds_information18                 varchar2(150),
71   pds_information19                 varchar2(150),
72   pds_information20                 varchar2(150),
73   pds_information21                 varchar2(150),
74   pds_information22                 varchar2(150),
75   pds_information23                 varchar2(150),
76   pds_information24                 varchar2(150),
77   pds_information25                 varchar2(150),
78   pds_information26                 varchar2(150),
79   pds_information27                 varchar2(150),
80   pds_information28                 varchar2(150),
81   pds_information29                 varchar2(150),
82   pds_information30                 varchar2(150)
83   );
84 --
85 -- ----------------------------------------------------------------------------
86 -- |           Global Definitions - Internal Development Use Only             |
87 -- ----------------------------------------------------------------------------
88 --
89 g_old_rec  g_rec_type;                            -- Global record definition
90 g_api_dml  boolean;                               -- Global api dml status
91 --
92 -- ----------------------------------------------------------------------------
93 -- |------------------------< return_api_dml_status >-------------------------|
94 -- ----------------------------------------------------------------------------
95 -- {Start Of Comments}
96 --
97 -- Description:
98 --   This function will return the current g_api_dml private global
99 --   boolean status.
100 --   The g_api_dml status determines if at the time of the function
101 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
102 --   is being issued from within an api.
103 --   If the status is TRUE then a dml statement is being issued from
104 --   within this entity api.
105 --   This function is primarily to support database triggers which
106 --   need to maintain the object_version_number for non-supported
107 --   dml statements (i.e. dml statement issued outside of the api layer).
108 --
109 -- Pre Conditions:
110 --   None.
111 --
112 -- In Arguments:
113 --   None.
114 --
115 -- Post Success:
116 --   Processing continues.
117 --   If the function returns a TRUE value then, dml is being executed from
118 --   within this api.
119 --
120 -- Post Failure:
121 --   None.
122 --
123 -- Access Status:
124 --   Internal Development Use Only.
125 --
126 -- {End Of Comments}
127 -- ----------------------------------------------------------------------------
128 Function return_api_dml_status Return Boolean;
129 --
130 -- ----------------------------------------------------------------------------
131 -- |---------------------------< constraint_error >---------------------------|
132 -- ----------------------------------------------------------------------------
133 -- {Start Of Comments}
134 --
135 -- Description:
136 --   This procedure is called when a constraint has been violated (i.e.
137 --   The exception hr_api.check_integrity_violated,
138 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
139 --   hr_api.unique_integrity_violated has been raised).
140 --   The exceptions can only be raised as follows:
141 --   1) A check constraint can only be violated during an INSERT or UPDATE
142 --      dml operation.
143 --   2) A parent integrity constraint can only be violated during an
144 --      INSERT or UPDATE dml operation.
145 --   3) A child integrity constraint can only be violated during an
146 --      DELETE dml operation.
147 --   4) A unique integrity constraint can only be violated during INSERT or
148 --      UPDATE dml operation.
149 --
150 -- Pre Conditions:
151 --   1) Either hr_api.check_integrity_violated,
152 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
153 --      hr_api.unique_integrity_violated has been raised with the subsequent
154 --      stripping of the constraint name from the generated error message
155 --      text.
156 --   2) Standalone validation test which correspond with a constraint error.
157 --
158 -- In Arguments:
159 --   p_constraint_name is in upper format and is just the constraint name
160 --   (e.g. not prefixed by brackets, schema owner etc).
161 --
162 -- Post Success:
163 --   Development dependant.
164 --
165 -- Post Failure:
166 --   Developement dependant.
167 --
168 -- Developer Implementation Notes:
169 --   For each constraint being checked the hr system package failure message
170 --   has been generated as a template only. These system error messages should
171 --   be modified as required (i.e. change the system failure message to a user
172 --   friendly defined error message).
173 --
174 -- Access Status:
175 --   Internal Development Use Only.
176 --
177 -- {End Of Comments}
178 -- ----------------------------------------------------------------------------
179 Procedure constraint_error
180             (p_constraint_name in all_constraints.constraint_name%TYPE);
181 --
182 -- ----------------------------------------------------------------------------
183 -- |-----------------------------< api_updating >-----------------------------|
184 -- ----------------------------------------------------------------------------
185 -- {Start Of Comments}
186 --
187 -- Description:
188 --   This function is used to populate the g_old_rec record with the
189 --   current row from the database for the specified primary key
190 --   provided that the primary key exists and is valid and does not
191 --   already match the current g_old_rec. The function will always return
192 --   a TRUE value if the g_old_rec is populated with the current row.
193 --   A FALSE value will be returned if all of the primary key arguments
194 --   are null.
195 --
196 -- Pre Conditions:
197 --   None.
198 --
199 -- In Arguments:
200 --
201 -- Post Success:
202 --   A value of TRUE will be returned indiciating that the g_old_rec
203 --   is current.
204 --   A value of FALSE will be returned if all of the primary key arguments
205 --   have a null value (this indicates that the row has not be inserted into
206 --   the Schema), and therefore could never have a corresponding row.
207 --
208 -- Post Failure:
209 --   A failure can only occur under two circumstances:
210 --   1) The primary key is invalid (i.e. a row does not exist for the
211 --      specified primary key values).
212 --   2) If an object_version_number exists but is NOT the same as the current
213 --      g_old_rec value.
214 --
215 -- Developer Implementation Notes:
216 --   None.
217 --
218 -- Access Status:
219 --   Internal Development Use Only.
220 --
221 -- {End Of Comments}
222 -- ----------------------------------------------------------------------------
223 Function api_updating
224   (
225   p_period_of_service_id               in number,
226   p_object_version_number              in number
227   )      Return Boolean;
228 --
229 -- ----------------------------------------------------------------------------
230 -- |---------------------------------< lck >----------------------------------|
231 -- ----------------------------------------------------------------------------
232 -- {Start Of Comments}
233 --
234 -- Description:
235 --   The Lck process has two main functions to perform. Firstly, the row to be
236 --   updated or deleted must be locked. The locking of the row will only be
237 --   successful if the row is not currently locked by another user.
238 --   Secondly, during the locking of the row, the row is selected into
239 --   the g_old_rec data structure which enables the current row values from the
240 --   server to be available to the api.
241 --
242 -- Pre Conditions:
243 --   When attempting to call the lock the object version number (if defined)
244 --   is mandatory.
245 --
246 -- In Arguments:
247 --   The arguments to the Lck process are the primary key(s) which uniquely
248 --   identify the row and the object version number of row.
249 --
250 -- Post Success:
251 --   On successful completion of the Lck process the row to be updated or
252 --   deleted will be locked and selected into the global data structure
253 --   g_old_rec.
254 --
255 -- Post Failure:
256 --   The Lck process can fail for three reasons:
257 --   1) When attempting to lock the row the row could already be locked by
258 --      another user. This will raise the HR_Api.Object_Locked exception.
259 --   2) The row which is required to be locked doesn't exist in the HR Schema.
260 --      This error is trapped and reported using the message name
261 --      'HR_7220_INVALID_PRIMARY_KEY'.
262 --   3) The row although existing in the HR Schema has a different object
263 --      version number than the object version number specified.
264 --      This error is trapped and reported using the message name
265 --      'HR_7155_OBJECT_INVALID'.
266 --
267 -- Developer Implementation Notes:
268 --   For each primary key and the object version number arguments add a
269 --   call to hr_api.mandatory_arg_error procedure to ensure that these
270 --   argument values are not null.
271 --
272 -- Access Status:
273 --   Internal Development Use Only.
274 --
275 -- {End Of Comments}
276 -- ----------------------------------------------------------------------------
277 Procedure lck
278   (
279   p_period_of_service_id               in number,
280   p_object_version_number              in number
281   );
282 --
283 -- ----------------------------------------------------------------------------
284 -- |-----------------------------< convert_args >-----------------------------|
285 -- ----------------------------------------------------------------------------
286 -- {Start Of Comments}
287 --
288 -- Description:
289 --   This function is used to turn attribute arguments into the record
290 --   structure g_rec_type.
291 --
292 -- Pre Conditions:
293 --   This is a private function and can only be called from the ins or upd
294 --   attribute processes.
295 --
296 -- In Arguments:
297 --
298 -- Post Success:
299 --   A returning record structure will be returned.
300 --
301 -- Post Failure:
302 --   No direct error handling is required within this function. Any possible
303 --   errors within this function will be a PL/SQL value error due to conversion
304 --   of datatypes or data lengths.
305 --
306 -- Developer Implementation Notes:
307 --   None.
308 --
309 -- Access Status:
310 --   Internal Development Use Only.
311 --
312 -- {End Of Comments}
313 -- ----------------------------------------------------------------------------
314 Function convert_args
315 	(
316 	p_period_of_service_id          in number,
317 	p_business_group_id             in number,
318 	p_termination_accepted_person  in number,
319 	p_person_id                     in number,
320 	p_date_start                    in date,
321 	p_accepted_termination_date     in date,
322 	p_actual_termination_date       in date,
323 	p_comments                      in varchar2,
327 	p_notified_termination_date     in date,
324 	p_final_process_date            in date,
325 	p_last_standard_process_date    in date,
326 	p_leaving_reason                in varchar2,
328 	p_projected_termination_date    in date,
329         p_adjusted_svc_date             in date,
330 	p_request_id                    in number,
331 	p_program_application_id        in number,
332 	p_program_id                    in number,
333 	p_program_update_date           in date,
334 	p_attribute_category            in varchar2,
335 	p_attribute1                    in varchar2,
336 	p_attribute2                    in varchar2,
337 	p_attribute3                    in varchar2,
338 	p_attribute4                    in varchar2,
339 	p_attribute5                    in varchar2,
340 	p_attribute6                    in varchar2,
341 	p_attribute7                    in varchar2,
342 	p_attribute8                    in varchar2,
343 	p_attribute9                    in varchar2,
344 	p_attribute10                   in varchar2,
345 	p_attribute11                   in varchar2,
346 	p_attribute12                   in varchar2,
347 	p_attribute13                   in varchar2,
348 	p_attribute14                   in varchar2,
349 	p_attribute15                   in varchar2,
350 	p_attribute16                   in varchar2,
351 	p_attribute17                   in varchar2,
352 	p_attribute18                   in varchar2,
353 	p_attribute19                   in varchar2,
354 	p_attribute20                   in varchar2,
355 	p_object_version_number         in number ,
356 	p_prior_employment_ssp_weeks    in number,
357 	p_prior_employment_ssp_paid_to  in date,
358 	p_pds_information_category      in varchar2,
359 	p_pds_information1              in varchar2,
360 	p_pds_information2              in varchar2,
361 	p_pds_information3              in varchar2,
362 	p_pds_information4              in varchar2,
363 	p_pds_information5              in varchar2,
364 	p_pds_information6              in varchar2,
365 	p_pds_information7              in varchar2,
366 	p_pds_information8              in varchar2,
367 	p_pds_information9              in varchar2,
368 	p_pds_information10             in varchar2,
369 	p_pds_information11             in varchar2,
370 	p_pds_information12             in varchar2,
371 	p_pds_information13             in varchar2,
372 	p_pds_information14             in varchar2,
373 	p_pds_information15             in varchar2,
374 	p_pds_information16             in varchar2,
375 	p_pds_information17             in varchar2,
376 	p_pds_information18             in varchar2,
377 	p_pds_information19             in varchar2,
378 	p_pds_information20             in varchar2,
379 	p_pds_information21             in varchar2,
380 	p_pds_information22             in varchar2,
381 	p_pds_information23             in varchar2,
382 	p_pds_information24             in varchar2,
383 	p_pds_information25             in varchar2,
384 	p_pds_information26             in varchar2,
385 	p_pds_information27             in varchar2,
386 	p_pds_information28             in varchar2,
387 	p_pds_information29             in varchar2,
388 	p_pds_information30             in varchar2
389 	)
390 	Return g_rec_type;
391 --
392 end per_pds_shd;