DBA Data[Home] [Help]

PACKAGE: APPS.BEN_PIL_SHD

Source


1 Package ben_pil_shd AUTHID CURRENT_USER as
2 /* $Header: bepilrhi.pkh 120.0 2005/05/28 10:50:39 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   per_in_ler_id                     number(15),
11   per_in_ler_stat_cd                varchar2(30),
12   prvs_stat_cd                      varchar2(30),
13   lf_evt_ocrd_dt                    date,
14   trgr_table_pk_id                  number(15),
15   procd_dt                          date,
16   strtd_dt                          date,
17   voidd_dt                          date,
18   bckt_dt                           date,
19   clsd_dt                           date,
20   ntfn_dt                           date,
21   ptnl_ler_for_per_id               number(15),
22   bckt_per_in_ler_id                number(15),
23   ler_id                            number(15),
24   person_id                         number(15),
25   business_group_id                 number(15),
26   ASSIGNMENT_ID                     number(15),
27   WS_MGR_ID                         number(15),
28   GROUP_PL_ID                       number(15),
29   MGR_OVRID_PERSON_ID               number(15),
30   MGR_OVRID_DT                      date,
31   pil_attribute_category            varchar2(30),
32   pil_attribute1                    varchar2(150),
33   pil_attribute2                    varchar2(150),
34   pil_attribute3                    varchar2(150),
35   pil_attribute4                    varchar2(150),
36   pil_attribute5                    varchar2(150),
37   pil_attribute6                    varchar2(150),
38   pil_attribute7                    varchar2(150),
39   pil_attribute8                    varchar2(150),
40   pil_attribute9                    varchar2(150),
41   pil_attribute10                   varchar2(150),
42   pil_attribute11                   varchar2(150),
43   pil_attribute12                   varchar2(150),
44   pil_attribute13                   varchar2(150),
45   pil_attribute14                   varchar2(150),
46   pil_attribute15                   varchar2(150),
47   pil_attribute16                   varchar2(150),
48   pil_attribute17                   varchar2(150),
49   pil_attribute18                   varchar2(150),
50   pil_attribute19                   varchar2(150),
51   pil_attribute20                   varchar2(150),
52   pil_attribute21                   varchar2(150),
53   pil_attribute22                   varchar2(150),
54   pil_attribute23                   varchar2(150),
55   pil_attribute24                   varchar2(150),
56   pil_attribute25                   varchar2(150),
57   pil_attribute26                   varchar2(150),
58   pil_attribute27                   varchar2(150),
59   pil_attribute28                   varchar2(150),
60   pil_attribute29                   varchar2(150),
61   pil_attribute30                   varchar2(150),
62   request_id                        number(15),
63   program_application_id            number(15),
64   program_id                        number(15),
65   program_update_date               date,
66   object_version_number             number(9)
67   );
68 --
69 -- ----------------------------------------------------------------------------
70 -- |           Global Definitions - Internal Development Use Only             |
71 -- ----------------------------------------------------------------------------
72 --
73 g_old_rec  g_rec_type;                            -- Global record definition
74 g_api_dml  boolean;                               -- Global api dml status
75 --
76 -- ----------------------------------------------------------------------------
77 -- |------------------------< return_api_dml_status >-------------------------|
78 -- ----------------------------------------------------------------------------
79 -- {Start Of Comments}
80 --
81 -- Description:
82 --   This function will return the current g_api_dml private global
83 --   boolean status.
84 --   The g_api_dml status determines if at the time of the function
85 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
86 --   is being issued from within an api.
87 --   If the status is TRUE then a dml statement is being issued from
88 --   within this entity api.
89 --   This function is primarily to support database triggers which
90 --   need to maintain the object_version_number for non-supported
91 --   dml statements (i.e. dml statement issued outside of the api layer).
92 --
93 -- Prerequisites:
94 --   None.
95 --
96 -- In Parameters:
97 --   None.
98 --
99 -- Post Success:
100 --   Processing continues.
101 --   If the function returns a TRUE value then, dml is being executed from
102 --   within this api.
103 --
104 -- Post Failure:
105 --   None.
106 --
107 -- Access Status:
108 --   Internal Row Handler Use Only.
109 --
110 -- {End Of Comments}
111 -- ----------------------------------------------------------------------------
112 Function return_api_dml_status Return Boolean;
113 --
114 -- ----------------------------------------------------------------------------
115 -- |---------------------------< constraint_error >---------------------------|
116 -- ----------------------------------------------------------------------------
117 -- {Start Of Comments}
118 --
119 -- Description:
120 --   This procedure is called when a constraint has been violated (i.e.
121 --   The exception hr_api.check_integrity_violated,
122 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
123 --   hr_api.unique_integrity_violated has been raised).
124 --   The exceptions can only be raised as follows:
125 --   1) A check constraint can only be violated during an INSERT or UPDATE
126 --      dml operation.
127 --   2) A parent integrity constraint can only be violated during an
128 --      INSERT or UPDATE dml operation.
129 --   3) A child integrity constraint can only be violated during an
130 --      DELETE dml operation.
131 --   4) A unique integrity constraint can only be violated during INSERT or
132 --      UPDATE dml operation.
133 --
134 -- Prerequisites:
135 --   1) Either hr_api.check_integrity_violated,
136 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
137 --      hr_api.unique_integrity_violated has been raised with the subsequent
138 --      stripping of the constraint name from the generated error message
139 --      text.
140 --   2) Standalone validation test which corresponds with a constraint error.
141 --
142 -- In Parameter:
143 --   p_constraint_name is in upper format and is just the constraint name
144 --   (e.g. not prefixed by brackets, schema owner etc).
145 --
146 -- Post Success:
147 --   Development dependant.
148 --
149 -- Post Failure:
150 --   Developement dependant.
151 --
152 -- Developer Implementation Notes:
153 --   For each constraint being checked the hr system package failure message
154 --   has been generated as a template only. These system error messages should
155 --   be modified as required (i.e. change the system failure message to a user
156 --   friendly defined error message).
157 --
158 -- Access Status:
159 --   Internal Development Use Only.
160 --
161 -- {End Of Comments}
162 -- ----------------------------------------------------------------------------
163 Procedure constraint_error
164             (p_constraint_name in all_constraints.constraint_name%TYPE);
165 --
166 -- ----------------------------------------------------------------------------
167 -- |-----------------------------< api_updating >-----------------------------|
168 -- ----------------------------------------------------------------------------
169 -- {Start Of Comments}
170 --
171 -- Description:
172 --   This function is used to populate the g_old_rec record with the
173 --   current row from the database for the specified primary key
174 --   provided that the primary key exists and is valid and does not
175 --   already match the current g_old_rec. The function will always return
176 --   a TRUE value if the g_old_rec is populated with the current row.
177 --   A FALSE value will be returned if all of the primary key arguments
178 --   are null.
179 --
180 -- Prerequisites:
181 --   None.
182 --
183 -- In Parameters:
184 --
185 -- Post Success:
186 --   A value of TRUE will be returned indiciating that the g_old_rec
187 --   is current.
188 --   A value of FALSE will be returned if all of the primary key arguments
189 --   have a null value (this indicates that the row has not be inserted into
190 --   the Schema), and therefore could never have a corresponding row.
191 --
192 -- Post Failure:
193 --   A failure can only occur under two circumstances:
194 --   1) The primary key is invalid (i.e. a row does not exist for the
195 --      specified primary key values).
196 --   2) If an object_version_number exists but is NOT the same as the current
197 --      g_old_rec value.
198 --
199 -- Developer Implementation Notes:
200 --   None.
201 --
202 -- Access Status:
203 --   Internal Development Use Only.
204 --
205 -- {End Of Comments}
206 -- ----------------------------------------------------------------------------
207 Function api_updating
208   (
209   p_per_in_ler_id                      in number,
210   p_object_version_number              in number
211   )      Return Boolean;
212 --
213 -- ----------------------------------------------------------------------------
214 -- |---------------------------------< lck >----------------------------------|
215 -- ----------------------------------------------------------------------------
216 -- {Start Of Comments}
217 --
218 -- Description:
219 --   The Lck process has two main functions to perform. Firstly, the row to be
220 --   updated or deleted must be locked. The locking of the row will only be
221 --   successful if the row is not currently locked by another user.
222 --   Secondly, during the locking of the row, the row is selected into
223 --   the g_old_rec data structure which enables the current row values from the
224 --   server to be available to the api.
225 --
226 -- Prerequisites:
227 --   When attempting to call the lock the object version number (if defined)
228 --   is mandatory.
229 --
230 -- In Parameters:
231 --   The arguments to the Lck process are the primary key(s) which uniquely
232 --   identify the row and the object version number of row.
233 --
234 -- Post Success:
235 --   On successful completion of the Lck process the row to be updated or
236 --   deleted will be locked and selected into the global data structure
237 --   g_old_rec.
238 --
239 -- Post Failure:
240 --   The Lck process can fail for three reasons:
241 --   1) When attempting to lock the row the row could already be locked by
242 --      another user. This will raise the HR_Api.Object_Locked exception.
243 --   2) The row which is required to be locked doesn't exist in the HR Schema.
244 --      This error is trapped and reported using the message name
245 --      'HR_7220_INVALID_PRIMARY_KEY'.
246 --   3) The row although existing in the HR Schema has a different object
247 --      version number than the object version number specified.
248 --      This error is trapped and reported using the message name
249 --      'HR_7155_OBJECT_INVALID'.
250 --
251 -- Developer Implementation Notes:
252 --   For each primary key and the object version number arguments add a
253 --   call to hr_api.mandatory_arg_error procedure to ensure that these
254 --   argument values are not null.
255 --
256 -- Access Status:
257 --   Internal Development Use Only.
258 --
259 -- {End Of Comments}
260 -- ----------------------------------------------------------------------------
261 Procedure lck
262   (
263   p_per_in_ler_id                      in number,
264   p_object_version_number              in number
265   );
266 --
267 -- ----------------------------------------------------------------------------
268 -- |-----------------------------< convert_args >-----------------------------|
269 -- ----------------------------------------------------------------------------
270 -- {Start Of Comments}
271 --
272 -- Description:
273 --   This function is used to turn attribute parameters into the record
274 --   structure parameter g_rec_type.
275 --
276 -- Prerequisites:
277 --   This is a private function and can only be called from the ins or upd
278 --   attribute processes.
279 --
280 -- In Parameters:
281 --
282 -- Post Success:
283 --   A returning record structure will be returned.
284 --
285 -- Post Failure:
286 --   No direct error handling is required within this function. Any possible
287 --   errors within this function will be a PL/SQL value error due to conversion
288 --   of datatypes or data lengths.
289 --
290 -- Developer Implementation Notes:
291 --   None.
292 --
293 -- Access Status:
294 --   Internal Row Handler Use Only.
295 --
296 -- {End Of Comments}
297 -- ----------------------------------------------------------------------------
298 Function convert_args
299 	(
300 	p_per_in_ler_id                 in number,
301 	p_per_in_ler_stat_cd            in varchar2,
302 	p_prvs_stat_cd                  in varchar2,
303 	p_lf_evt_ocrd_dt                in date,
304         p_trgr_table_pk_id              in number,
305 	p_procd_dt                      in date,
306 	p_strtd_dt                      in date,
307 	p_voidd_dt                      in date,
308 	p_bckt_dt                       in date,
309 	p_clsd_dt                       in date,
310 	p_ntfn_dt                       in date,
311 	p_ptnl_ler_for_per_id           in number,
312 	p_bckt_per_in_ler_id            in number,
313 	p_ler_id                        in number,
314 	p_person_id                     in number,
315 	p_business_group_id             in number,
316         p_ASSIGNMENT_ID                  in  number,
317         p_WS_MGR_ID                      in  number,
318         p_GROUP_PL_ID                    in  number,
319         p_MGR_OVRID_PERSON_ID            in  number,
320         p_MGR_OVRID_DT                   in  date,
321 	p_pil_attribute_category        in varchar2,
322 	p_pil_attribute1                in varchar2,
323 	p_pil_attribute2                in varchar2,
324 	p_pil_attribute3                in varchar2,
325 	p_pil_attribute4                in varchar2,
326 	p_pil_attribute5                in varchar2,
327 	p_pil_attribute6                in varchar2,
328 	p_pil_attribute7                in varchar2,
329 	p_pil_attribute8                in varchar2,
330 	p_pil_attribute9                in varchar2,
331 	p_pil_attribute10               in varchar2,
332 	p_pil_attribute11               in varchar2,
333 	p_pil_attribute12               in varchar2,
334 	p_pil_attribute13               in varchar2,
335 	p_pil_attribute14               in varchar2,
336 	p_pil_attribute15               in varchar2,
337 	p_pil_attribute16               in varchar2,
338 	p_pil_attribute17               in varchar2,
339 	p_pil_attribute18               in varchar2,
340 	p_pil_attribute19               in varchar2,
341 	p_pil_attribute20               in varchar2,
342 	p_pil_attribute21               in varchar2,
343 	p_pil_attribute22               in varchar2,
344 	p_pil_attribute23               in varchar2,
345 	p_pil_attribute24               in varchar2,
346 	p_pil_attribute25               in varchar2,
347 	p_pil_attribute26               in varchar2,
348 	p_pil_attribute27               in varchar2,
349 	p_pil_attribute28               in varchar2,
350 	p_pil_attribute29               in varchar2,
351 	p_pil_attribute30               in varchar2,
352 	p_request_id                    in number,
353 	p_program_application_id        in number,
354 	p_program_id                    in number,
355 	p_program_update_date           in date,
356 	p_object_version_number         in number
357 	)
358 	Return g_rec_type;
359 --
360 end ben_pil_shd;