DBA Data[Home] [Help]

PACKAGE: APPS.PER_ABC_SHD

Source


1 Package per_abc_shd as
2 /* $Header: peabcrhi.pkh 120.1 2005/09/28 05:02:31 snukala noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (absence_case_id                 number(10)
10   ,name                            varchar2(240)
11   ,person_id                       number(10)
12   ,incident_id                     varchar2(10)
13   ,absence_category                varchar2(30)
14   ,ac_information_category         varchar2(30)
15   ,ac_information1                 varchar2(150)
16   ,ac_information2                 varchar2(150)
17   ,ac_information3                 varchar2(150)
18   ,ac_information4                 varchar2(150)
19   ,ac_information5                 varchar2(150)
20   ,ac_information6                 varchar2(150)
21   ,ac_information7                 varchar2(150)
22   ,ac_information8                 varchar2(150)
23   ,ac_information9                 varchar2(150)
24   ,ac_information10                varchar2(150)
25   ,ac_information11                varchar2(150)
26   ,ac_information12                varchar2(150)
27   ,ac_information13                varchar2(150)
28   ,ac_information14                varchar2(150)
29   ,ac_information15                varchar2(150)
30   ,ac_information16                varchar2(150)
31   ,ac_information17                varchar2(150)
32   ,ac_information18                varchar2(150)
33   ,ac_information19                varchar2(150)
34   ,ac_information20                varchar2(150)
35   ,ac_information21                varchar2(150)
36   ,ac_information22                varchar2(150)
37   ,ac_information23                varchar2(150)
38   ,ac_information24                varchar2(150)
39   ,ac_information25                varchar2(150)
40   ,ac_information26                varchar2(150)
41   ,ac_information27                varchar2(150)
42   ,ac_information28                varchar2(150)
43   ,ac_information29                varchar2(150)
44   ,ac_information30                varchar2(150)
45   ,ac_attribute_category           varchar2(30)
46   ,attribute1                      varchar2(150)
47   ,attribute2                      varchar2(150)
48   ,attribute3                      varchar2(150)
49   ,attribute4                      varchar2(150)
50   ,attribute5                      varchar2(150)
51   ,attribute6                      varchar2(150)
52   ,attribute7                      varchar2(150)
53   ,attribute8                      varchar2(150)
54   ,attribute9                      varchar2(150)
55   ,attribute10                     varchar2(150)
56   ,attribute11                     varchar2(150)
57   ,attribute12                     varchar2(150)
58   ,attribute13                     varchar2(150)
59   ,attribute14                     varchar2(150)
60   ,attribute15                     varchar2(150)
61   ,attribute16                     varchar2(150)
62   ,attribute17                     varchar2(150)
63   ,attribute18                     varchar2(150)
64   ,attribute19                     varchar2(150)
65   ,attribute20                     varchar2(150)
66   ,attribute21                     varchar2(150)
67   ,attribute22                     varchar2(150)
68   ,attribute23                     varchar2(150)
69   ,attribute24                     varchar2(150)
70   ,attribute25                     varchar2(150)
71   ,attribute26                     varchar2(150)
72   ,attribute27                     varchar2(150)
73   ,attribute28                     varchar2(150)
74   ,attribute29                     varchar2(150)
75   ,attribute30                     varchar2(150)
76   ,object_version_number           number(9)
77   ,business_group_id               number(15)
78   ,comments                        varchar2(2000)
79   );
80 --
81 -- ----------------------------------------------------------------------------
82 -- |           Global Definitions - Internal Development Use Only             |
83 -- ----------------------------------------------------------------------------
84 --
85 g_old_rec  g_rec_type;                            -- Global record definition
86 -- Global table name
87 g_tab_nam  constant varchar2(30) := 'PER_ABSENCE_CASES';
88 g_api_dml  boolean;                               -- Global api dml status
89 --
90 -- ----------------------------------------------------------------------------
91 -- |------------------------< return_api_dml_status >-------------------------|
92 -- ----------------------------------------------------------------------------
93 -- {Start Of Comments}
94 --
95 -- Description:
96 --   This function will return the current g_api_dml private global
97 --   boolean status.
98 --   The g_api_dml status determines if at the time of the function
99 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
100 --   is being issued from within an api.
101 --   If the status is TRUE then a dml statement is being issued from
102 --   within this entity api.
103 --   This function is primarily to support database triggers which
104 --   need to maintain the object_version_number for non-supported
105 --   dml statements (i.e. dml statement issued outside of the api layer).
106 --
107 -- Prerequisites:
108 --   None.
109 --
110 -- In Parameters:
111 --   None.
112 --
113 -- Post Success:
114 --   Processing continues.
115 --   If the function returns a TRUE value then, dml is being executed from
116 --   within this api.
117 --
118 -- Post Failure:
119 --   None.
120 --
121 -- Access Status:
122 --   Internal Row Handler Use Only.
123 --
124 -- {End Of Comments}
125 -- ----------------------------------------------------------------------------
126 Function return_api_dml_status Return Boolean;
127 --
128 -- ----------------------------------------------------------------------------
129 -- |---------------------------< constraint_error >---------------------------|
130 -- ----------------------------------------------------------------------------
131 -- {Start Of Comments}
132 --
133 -- Description:
134 --   This procedure is called when a constraint has been violated (i.e.
135 --   The exception 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).
138 --   The exceptions can only be raised as follows:
139 --   1) A check constraint can only be violated during an INSERT or UPDATE
140 --      dml operation.
141 --   2) A parent integrity constraint can only be violated during an
142 --      INSERT or UPDATE dml operation.
143 --   3) A child integrity constraint can only be violated during an
144 --      DELETE dml operation.
145 --   4) A unique integrity constraint can only be violated during INSERT or
146 --      UPDATE dml operation.
147 --
148 -- Prerequisites:
149 --   1) Either hr_api.check_integrity_violated,
150 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
151 --      hr_api.unique_integrity_violated has been raised with the subsequent
152 --      stripping of the constraint name from the generated error message
153 --      text.
154 --   2) Standalone validation test which corresponds with a constraint error.
155 --
156 -- In Parameter:
157 --   p_constraint_name is in upper format and is just the constraint name
158 --   (e.g. not prefixed by brackets, schema owner etc).
159 --
160 -- Post Success:
161 --   Development dependant.
162 --
163 -- Post Failure:
164 --   Developement dependant.
165 --
166 -- Developer Implementation Notes:
167 --   For each constraint being checked the hr system package failure message
168 --   has been generated as a template only. These system error messages should
169 --   be modified as required (i.e. change the system failure message to a user
170 --   friendly defined error message).
171 --
172 -- Access Status:
173 --   Internal Development Use Only.
174 --
175 -- {End Of Comments}
176 -- ----------------------------------------------------------------------------
177 Procedure constraint_error
178   (p_constraint_name in all_constraints.constraint_name%TYPE);
179 --
180 -- ----------------------------------------------------------------------------
181 -- |-----------------------------< api_updating >-----------------------------|
182 -- ----------------------------------------------------------------------------
183 --  {Start Of Comments}
184 --
185 -- Description:
186 --   This function is used to populate the g_old_rec record with the
187 --   current row from the database for the specified primary key
188 --   provided that the primary key exists and is valid and does not
189 --   already match the current g_old_rec. The function will always return
190 --   a TRUE value if the g_old_rec is populated with the current row.
191 --   A FALSE value will be returned if all of the primary key arguments
192 --   are null.
193 --
194 -- Prerequisites:
195 --   None.
196 --
197 -- In Parameters:
198 --
199 -- Post Success:
200 --   A value of TRUE will be returned indiciating that the g_old_rec
201 --   is current.
202 --   A value of FALSE will be returned if all of the primary key arguments
203 --   have a null value (this indicates that the row has not be inserted into
204 --   the Schema), and therefore could never have a corresponding row.
205 --
206 -- Post Failure:
207 --   A failure can only occur under two circumstances:
208 --   1) The primary key is invalid (i.e. a row does not exist for the
209 --      specified primary key values).
210 --   2) If an object_version_number exists but is NOT the same as the current
211 --      g_old_rec value.
212 --
213 -- Developer Implementation Notes:
214 --   None.
215 --
216 -- Access Status:
217 --   Internal Development Use Only.
218 --
219 -- {End Of Comments}
220 -- ----------------------------------------------------------------------------
221 Function api_updating
222   (p_absence_case_id                      in     number
223   ,p_object_version_number                in     number
224   )      Return Boolean;
225 --
226 -- ----------------------------------------------------------------------------
227 -- |---------------------------------< lck >----------------------------------|
228 -- ----------------------------------------------------------------------------
229 -- {Start of comments}
230 --
231 -- Description:
232 --   The Lck process has two main functions to perform. Firstly, the row to be
233 --   updated or deleted must be locked. The locking of the row will only be
234 --   successful if the row is not currently locked by another user.
235 --   Secondly, during the locking of the row, the row is selected into
236 --   the g_old_rec data structure which enables the current row values from
237 --   the server to be available to the api.
238 --
239 -- Prerequisites:
240 --   When attempting to call the lock the object version number (if defined)
241 --   is mandatory.
242 --
243 -- In Parameters:
244 --   The arguments to the Lck process are the primary key(s) which uniquely
245 --   identify the row and the object version number of row.
246 --
247 -- Post Success:
248 --   On successful completion of the Lck process the row to be updated or
249 --   deleted will be locked and selected into the global data structure
250 --   g_old_rec.
251 --
252 -- Post Failure:
253 --   The Lck process can fail for three reasons:
254 --   1) When attempting to lock the row the row could already be locked by
255 --      another user. This will raise the HR_Api.Object_Locked exception.
256 --   2) The row which is required to be locked doesn't exist in the HR Schema.
257 --      This error is trapped and reported using the message name
258 --      'HR_7220_INVALID_PRIMARY_KEY'.
259 --   3) The row although existing in the HR Schema has a different object
260 --      version number than the object version number specified.
261 --      This error is trapped and reported using the message name
262 --      'HR_7155_OBJECT_INVALID'.
263 --
264 -- Developer Implementation Notes:
265 --   For each primary key and the object version number arguments add a
269 -- Access Status:
266 --   call to hr_api.mandatory_arg_error procedure to ensure that these
267 --   argument values are not null.
268 --
270 --   Internal Development Use Only.
271 --
272 -- {End of comments}
273 -- ----------------------------------------------------------------------------
274 Procedure lck
275   (p_absence_case_id                      in     number
276   ,p_object_version_number                in     number
277   );
278 --
279 -- ----------------------------------------------------------------------------
280 -- |-----------------------------< convert_args >-----------------------------|
281 -- ----------------------------------------------------------------------------
282 -- {Start Of Comments}
283 --
284 -- Description:
285 --   This function is used to turn attribute parameters into the record
286 --   structure parameter g_rec_type.
287 --
288 -- Prerequisites:
289 --   This is a private function and can only be called from the ins or upd
290 --   attribute processes.
291 --
292 -- In Parameters:
293 --
294 -- Post Success:
295 --   A returning record structure will be returned.
296 --
297 -- Post Failure:
301 --
298 --   No direct error handling is required within this function.  Any possible
299 --   errors within this function will be a PL/SQL value error due to
300 --   conversion of datatypes or data lengths.
302 -- Developer Implementation Notes:
303 --   None.
304 --
305 -- Access Status:
306 --   Internal Row Handler Use Only.
307 --
308 -- {End Of Comments}
309 -- ----------------------------------------------------------------------------
310 Function convert_args
311   (p_absence_case_id                in number
312   ,p_name                           in varchar2
313   ,p_person_id                      in number
314   ,p_incident_id                    in varchar2
315   ,p_absence_category               in varchar2
316   ,p_ac_information_category        in varchar2
317   ,p_ac_information1                in varchar2
318   ,p_ac_information2                in varchar2
319   ,p_ac_information3                in varchar2
320   ,p_ac_information4                in varchar2
321   ,p_ac_information5                in varchar2
322   ,p_ac_information6                in varchar2
323   ,p_ac_information7                in varchar2
324   ,p_ac_information8                in varchar2
325   ,p_ac_information9                in varchar2
326   ,p_ac_information10               in varchar2
327   ,p_ac_information11               in varchar2
328   ,p_ac_information12               in varchar2
329   ,p_ac_information13               in varchar2
330   ,p_ac_information14               in varchar2
331   ,p_ac_information15               in varchar2
332   ,p_ac_information16               in varchar2
333   ,p_ac_information17               in varchar2
334   ,p_ac_information18               in varchar2
335   ,p_ac_information19               in varchar2
336   ,p_ac_information20               in varchar2
340   ,p_ac_information24               in varchar2
337   ,p_ac_information21               in varchar2
338   ,p_ac_information22               in varchar2
339   ,p_ac_information23               in varchar2
341   ,p_ac_information25               in varchar2
342   ,p_ac_information26               in varchar2
343   ,p_ac_information27               in varchar2
344   ,p_ac_information28               in varchar2
345   ,p_ac_information29               in varchar2
346   ,p_ac_information30               in varchar2
347   ,p_ac_attribute_category          in varchar2
348   ,p_attribute1                     in varchar2
349   ,p_attribute2                     in varchar2
350   ,p_attribute3                     in varchar2
351   ,p_attribute4                     in varchar2
352   ,p_attribute5                     in varchar2
353   ,p_attribute6                     in varchar2
354   ,p_attribute7                     in varchar2
355   ,p_attribute8                     in varchar2
356   ,p_attribute9                     in varchar2
357   ,p_attribute10                    in varchar2
358   ,p_attribute11                    in varchar2
359   ,p_attribute12                    in varchar2
360   ,p_attribute13                    in varchar2
361   ,p_attribute14                    in varchar2
362   ,p_attribute15                    in varchar2
363   ,p_attribute16                    in varchar2
364   ,p_attribute17                    in varchar2
365   ,p_attribute18                    in varchar2
366   ,p_attribute19                    in varchar2
367   ,p_attribute20                    in varchar2
368   ,p_attribute21                    in varchar2
369   ,p_attribute22                    in varchar2
370   ,p_attribute23                    in varchar2
371   ,p_attribute24                    in varchar2
372   ,p_attribute25                    in varchar2
373   ,p_attribute26                    in varchar2
374   ,p_attribute27                    in varchar2
375   ,p_attribute28                    in varchar2
376   ,p_attribute29                    in varchar2
377   ,p_attribute30                    in varchar2
378   ,p_object_version_number          in number
379   ,p_business_group_id              in number
380   ,p_comments                       in varchar2
381   )
382   Return g_rec_type;
383 --
384 end per_abc_shd;