DBA Data[Home] [Help]

PACKAGE: APPS.BEN_PGI_SHD

Source


1 Package ben_pgi_shd as
2 /* $Header: bepgirhi.pkh 120.0 2005/05/28 10:46:19 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   pgm_extra_info_id                 number(15),
11   information_type                  varchar2(40),
12   pgm_id                            number(15),
13   request_id                        number(15),
14   program_application_id            number(15),
15   program_id                        number(15),
16   program_update_date               date,
17   pgi_attribute_category            varchar2(30),
18   pgi_attribute1                    varchar2(150),
19   pgi_attribute2                    varchar2(150),
20   pgi_attribute3                    varchar2(150),
21   pgi_attribute4                    varchar2(150),
22   pgi_attribute5                    varchar2(150),
23   pgi_attribute6                    varchar2(150),
24   pgi_attribute7                    varchar2(150),
25   pgi_attribute8                    varchar2(150),
26   pgi_attribute9                    varchar2(150),
27   pgi_attribute10                   varchar2(150),
28   pgi_attribute11                   varchar2(150),
29   pgi_attribute12                   varchar2(150),
30   pgi_attribute13                   varchar2(150),
31   pgi_attribute14                   varchar2(150),
32   pgi_attribute15                   varchar2(150),
33   pgi_attribute16                   varchar2(150),
34   pgi_attribute17                   varchar2(150),
35   pgi_attribute18                   varchar2(150),
36   pgi_attribute19                   varchar2(150),
37   pgi_attribute20                   varchar2(150),
38   pgi_information_category          varchar2(30),
39   pgi_information1                  varchar2(150),
40   pgi_information2                  varchar2(150),
41   pgi_information3                  varchar2(150),
42   pgi_information4                  varchar2(150),
43   pgi_information5                  varchar2(150),
44   pgi_information6                  varchar2(150),
45   pgi_information7                  varchar2(150),
46   pgi_information8                  varchar2(150),
47   pgi_information9                  varchar2(150),
48   pgi_information10                 varchar2(150),
49   pgi_information11                 varchar2(150),
50   pgi_information12                 varchar2(150),
51   pgi_information13                 varchar2(150),
52   pgi_information14                 varchar2(150),
53   pgi_information15                 varchar2(150),
54   pgi_information16                 varchar2(150),
55   pgi_information17                 varchar2(150),
56   pgi_information18                 varchar2(150),
57   pgi_information19                 varchar2(150),
58   pgi_information20                 varchar2(150),
59   pgi_information21                 varchar2(150),
60   pgi_information22                 varchar2(150),
61   pgi_information23                 varchar2(150),
62   pgi_information24                 varchar2(150),
63   pgi_information25                 varchar2(150),
64   pgi_information26                 varchar2(150),
65   pgi_information27                 varchar2(150),
66   pgi_information28                 varchar2(150),
67   pgi_information29                 varchar2(150),
68   pgi_information30                 varchar2(150),
69   object_version_number             number(9)
70   );
71 --
72 -- ----------------------------------------------------------------------------
73 -- |           Global Definitions - Internal Development Use Only             |
74 -- ----------------------------------------------------------------------------
75 --
76 g_old_rec  g_rec_type;                            -- Global record definition
77 --
78 -- ----------------------------------------------------------------------------
79 -- |---------------------------< constraint_error >---------------------------|
80 -- ----------------------------------------------------------------------------
81 -- {Start Of Comments}
82 --
83 -- Description:
84 --   This procedure is called when a constraint has been violated (i.e.
85 --   The exception hr_api.check_integrity_violated,
86 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
87 --   hr_api.unique_integrity_violated has been raised).
88 --   The exceptions can only be raised as follows:
89 --   1) A check constraint can only be violated during an INSERT or UPDATE
90 --      dml operation.
91 --   2) A parent integrity constraint can only be violated during an
92 --      INSERT or UPDATE dml operation.
93 --   3) A child integrity constraint can only be violated during an
94 --      DELETE dml operation.
95 --   4) A unique integrity constraint can only be violated during INSERT or
96 --      UPDATE dml operation.
97 --
98 -- Pre Conditions:
99 --   1) Either hr_api.check_integrity_violated,
100 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
101 --      hr_api.unique_integrity_violated has been raised with the subsequent
102 --      stripping of the constraint name from the generated error message
103 --      text.
104 --   2) Standalone validation test which corresponds with a constraint error.
105 --
106 -- In Parameter:
107 --   p_constraint_name is in upper format and is just the constraint name
108 --   (e.g. not prefixed by brackets, schema owner etc).
109 --
110 -- Post Success:
111 --   Development dependant.
112 --
113 -- Post Failure:
114 --   Developement dependant.
115 --
116 -- Developer Implementation Notes:
117 --   For each constraint being checked the hr system package failure message
118 --   has been generated as a template only. These system error messages should
119 --   be modified as required (i.e. change the system failure message to a user
120 --   friendly defined error message).
121 --
122 -- Access Status:
123 --   Internal Development Use Only.
124 --
125 -- {End Of Comments}
126 -- ----------------------------------------------------------------------------
127 Procedure constraint_error
128             (p_constraint_name in all_constraints.constraint_name%TYPE);
129 --
130 -- ----------------------------------------------------------------------------
131 -- |-----------------------------< api_updating >-----------------------------|
132 -- ----------------------------------------------------------------------------
133 -- {Start Of Comments}
134 --
135 -- Description:
136 --   This function is used to populate the g_old_rec record with the
137 --   current row from the database for the specified primary key
138 --   provided that the primary key exists and is valid and does not
139 --   already match the current g_old_rec. The function will always return
140 --   a TRUE value if the g_old_rec is populated with the current row.
141 --   A FALSE value will be returned if all of the primary key arguments
142 --   are null.
143 --
144 -- Pre Conditions:
145 --   None.
146 --
147 -- In Parameters:
148 --
149 -- Post Success:
150 --   A value of TRUE will be returned indiciating that the g_old_rec
151 --   is current.
152 --   A value of FALSE will be returned if all of the primary key arguments
153 --   have a null value (this indicates that the row has not be inserted into
154 --   the Schema), and therefore could never have a corresponding row.
155 --
156 -- Post Failure:
157 --   A failure can only occur under two circumstances:
158 --   1) The primary key is invalid (i.e. a row does not exist for the
159 --      specified primary key values).
160 --   2) If an object_version_number exists but is NOT the same as the current
161 --      g_old_rec value.
162 --
163 -- Developer Implementation Notes:
164 --   None.
165 --
166 -- Access Status:
167 --   Internal Development Use Only.
168 --
169 -- {End Of Comments}
170 -- ----------------------------------------------------------------------------
171 Function api_updating
172   (
173   p_pgm_extra_info_id                  in number,
174   p_object_version_number              in number
175   )      Return Boolean;
176 --
177 -- ----------------------------------------------------------------------------
178 -- |---------------------------------< lck >----------------------------------|
179 -- ----------------------------------------------------------------------------
180 -- {Start Of Comments}
181 --
182 -- Description:
183 --   The Lck process has two main functions to perform. Firstly, the row to be
184 --   updated or deleted must be locked. The locking of the row will only be
185 --   successful if the row is not currently locked by another user.
186 --   Secondly, during the locking of the row, the row is selected into
187 --   the g_old_rec data structure which enables the current row values from the
188 --   server to be available to the api.
189 --
190 -- Pre Conditions:
191 --   When attempting to call the lock the object version number (if defined)
192 --   is mandatory.
193 --
194 -- In Parameters:
195 --   The arguments to the Lck process are the primary key(s) which uniquely
196 --   identify the row and the object version number of row.
197 --
198 -- Post Success:
199 --   On successful completion of the Lck process the row to be updated or
200 --   deleted will be locked and selected into the global data structure
201 --   g_old_rec.
202 --
203 -- Post Failure:
204 --   The Lck process can fail for three reasons:
205 --   1) When attempting to lock the row the row could already be locked by
206 --      another user. This will raise the HR_Api.Object_Locked exception.
207 --   2) The row which is required to be locked doesn't exist in the HR Schema.
208 --      This error is trapped and reported using the message name
209 --      'HR_7220_INVALID_PRIMARY_KEY'.
210 --   3) The row although existing in the HR Schema has a different object
211 --      version number than the object version number specified.
212 --      This error is trapped and reported using the message name
213 --      'HR_7155_OBJECT_INVALID'.
214 --
215 -- Developer Implementation Notes:
216 --   For each primary key and the object version number arguments add a
217 --   call to hr_api.mandatory_arg_error procedure to ensure that these
218 --   argument values are not null.
219 --
220 -- Access Status:
221 --   Internal Development Use Only.
222 --
223 -- {End Of Comments}
224 -- ----------------------------------------------------------------------------
225 Procedure lck
226   (
227   p_pgm_extra_info_id                  in number,
228   p_object_version_number              in number
229   );
230 --
231 -- ----------------------------------------------------------------------------
232 -- |-----------------------------< convert_args >-----------------------------|
233 -- ----------------------------------------------------------------------------
234 -- {Start Of Comments}
235 --
236 -- Description:
237 --   This function is used to turn attribute parameters into the record
238 --   structure parameter g_rec_type.
239 --
240 -- Pre Conditions:
241 --   This is a private function and can only be called from the ins or upd
242 --   attribute processes.
243 --
244 -- In Parameters:
245 --
246 -- Post Success:
247 --   A returning record structure will be returned.
248 --
249 -- Post Failure:
250 --   No direct error handling is required within this function. Any possible
251 --   errors within this function will be a pgm/SQL value error due to conversion
252 --   of datatypes or data lengths.
253 --
254 -- Developer Implementation Notes:
255 --   None.
256 --
257 -- Access Status:
258 --   Internal Table Handpgm Use Only.
259 --
260 -- {End Of Comments}
261 -- ----------------------------------------------------------------------------
262 Function convert_args
263 	(
264 	p_pgm_extra_info_id             in number,
265 	p_information_type              in varchar2,
266 	p_pgm_id                        in number,
267 	p_request_id                    in number,
268 	p_program_application_id        in number,
269 	p_program_id                    in number,
270 	p_program_update_date           in date,
271 	p_pgi_attribute_category        in varchar2,
272 	p_pgi_attribute1                in varchar2,
273 	p_pgi_attribute2                in varchar2,
274 	p_pgi_attribute3                in varchar2,
275 	p_pgi_attribute4                in varchar2,
276 	p_pgi_attribute5                in varchar2,
277 	p_pgi_attribute6                in varchar2,
278 	p_pgi_attribute7                in varchar2,
279 	p_pgi_attribute8                in varchar2,
280 	p_pgi_attribute9                in varchar2,
281 	p_pgi_attribute10               in varchar2,
282 	p_pgi_attribute11               in varchar2,
283 	p_pgi_attribute12               in varchar2,
284 	p_pgi_attribute13               in varchar2,
285 	p_pgi_attribute14               in varchar2,
286 	p_pgi_attribute15               in varchar2,
287 	p_pgi_attribute16               in varchar2,
288 	p_pgi_attribute17               in varchar2,
289 	p_pgi_attribute18               in varchar2,
290 	p_pgi_attribute19               in varchar2,
291 	p_pgi_attribute20               in varchar2,
292 	p_pgi_information_category      in varchar2,
293 	p_pgi_information1              in varchar2,
294 	p_pgi_information2              in varchar2,
295 	p_pgi_information3              in varchar2,
296 	p_pgi_information4              in varchar2,
297 	p_pgi_information5              in varchar2,
298 	p_pgi_information6              in varchar2,
299 	p_pgi_information7              in varchar2,
300 	p_pgi_information8              in varchar2,
301 	p_pgi_information9              in varchar2,
302 	p_pgi_information10             in varchar2,
303 	p_pgi_information11             in varchar2,
304 	p_pgi_information12             in varchar2,
305 	p_pgi_information13             in varchar2,
306 	p_pgi_information14             in varchar2,
307 	p_pgi_information15             in varchar2,
308 	p_pgi_information16             in varchar2,
309 	p_pgi_information17             in varchar2,
310 	p_pgi_information18             in varchar2,
311 	p_pgi_information19             in varchar2,
312 	p_pgi_information20             in varchar2,
313 	p_pgi_information21             in varchar2,
314 	p_pgi_information22             in varchar2,
315 	p_pgi_information23             in varchar2,
316 	p_pgi_information24             in varchar2,
317 	p_pgi_information25             in varchar2,
318 	p_pgi_information26             in varchar2,
319 	p_pgi_information27             in varchar2,
320 	p_pgi_information28             in varchar2,
321 	p_pgi_information29             in varchar2,
322 	p_pgi_information30             in varchar2,
323 	p_object_version_number         in number
324 	)
325 	Return g_rec_type;
326 --
327 end ben_pgi_shd;