DBA Data[Home] [Help]

PACKAGE: APPS.BEN_AGF_SHD

Source


1 Package ben_agf_shd AUTHID CURRENT_USER as
2 /* $Header: beagfrhi.pkh 120.0 2005/05/28 00:23:19 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   age_fctr_id                       number(15),
11   name                              varchar2(240),
12   mx_age_num                        number,
13   mn_age_num                        number,
14   age_uom                           varchar2(30),
15   no_mn_age_flag                    varchar2(30),
16   no_mx_age_flag                    varchar2(30),
17   age_to_use_cd                     varchar2(30),
18   age_det_cd                        varchar2(30),
19   age_det_rl                        number(15),
20   rndg_cd                           varchar2(30),
21   rndg_rl                           number(15),
22   age_calc_rl                       number(15),
23   business_group_id                 number(15),
24   agf_attribute_category            varchar2(30),
25   agf_attribute1                    varchar2(150),
26   agf_attribute2                    varchar2(150),
27   agf_attribute3                    varchar2(150),
28   agf_attribute4                    varchar2(150),
29   agf_attribute5                    varchar2(150),
30   agf_attribute6                    varchar2(150),
31   agf_attribute7                    varchar2(150),
32   agf_attribute8                    varchar2(150),
33   agf_attribute9                    varchar2(150),
34   agf_attribute10                   varchar2(150),
35   agf_attribute11                   varchar2(150),
36   agf_attribute12                   varchar2(150),
37   agf_attribute13                   varchar2(150),
38   agf_attribute14                   varchar2(150),
39   agf_attribute15                   varchar2(150),
40   agf_attribute16                   varchar2(150),
41   agf_attribute17                   varchar2(150),
42   agf_attribute18                   varchar2(150),
43   agf_attribute19                   varchar2(150),
44   agf_attribute20                   varchar2(150),
45   agf_attribute21                   varchar2(150),
46   agf_attribute22                   varchar2(150),
47   agf_attribute23                   varchar2(150),
48   agf_attribute24                   varchar2(150),
49   agf_attribute25                   varchar2(150),
50   agf_attribute26                   varchar2(150),
51   agf_attribute27                   varchar2(150),
52   agf_attribute28                   varchar2(150),
53   agf_attribute29                   varchar2(150),
54   agf_attribute30                   varchar2(150),
55   object_version_number             number(9)
56   );
57 --
58 -- ----------------------------------------------------------------------------
59 -- |           Global Definitions - Internal Development Use Only             |
60 -- ----------------------------------------------------------------------------
61 --
62 g_old_rec  g_rec_type;                            -- Global record definition
63 g_api_dml  boolean;                               -- Global api dml status
64 --
65 -- ----------------------------------------------------------------------------
66 -- |------------------------< return_api_dml_status >-------------------------|
67 -- ----------------------------------------------------------------------------
68 -- {Start Of Comments}
69 --
70 -- Description:
71 --   This function will return the current g_api_dml private global
72 --   boolean status.
73 --   The g_api_dml status determines if at the time of the function
74 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
75 --   is being issued from within an api.
76 --   If the status is TRUE then a dml statement is being issued from
77 --   within this entity api.
78 --   This function is primarily to support database triggers which
79 --   need to maintain the object_version_number for non-supported
80 --   dml statements (i.e. dml statement issued outside of the api layer).
81 --
82 -- Prerequisites:
83 --   None.
84 --
85 -- In Parameters:
86 --   None.
87 --
88 -- Post Success:
89 --   Processing continues.
90 --   If the function returns a TRUE value then, dml is being executed from
91 --   within this api.
92 --
93 -- Post Failure:
94 --   None.
95 --
96 -- Access Status:
97 --   Internal Row Handler Use Only.
98 --
99 -- {End Of Comments}
100 -- ----------------------------------------------------------------------------
101 Function return_api_dml_status Return Boolean;
102 --
103 -- ----------------------------------------------------------------------------
104 -- |---------------------------< constraint_error >---------------------------|
105 -- ----------------------------------------------------------------------------
106 -- {Start Of Comments}
107 --
108 -- Description:
109 --   This procedure is called when a constraint has been violated (i.e.
110 --   The exception hr_api.check_integrity_violated,
111 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
112 --   hr_api.unique_integrity_violated has been raised).
113 --   The exceptions can only be raised as follows:
114 --   1) A check constraint can only be violated during an INSERT or UPDATE
115 --      dml operation.
116 --   2) A parent integrity constraint can only be violated during an
117 --      INSERT or UPDATE dml operation.
118 --   3) A child integrity constraint can only be violated during an
119 --      DELETE dml operation.
120 --   4) A unique integrity constraint can only be violated during INSERT or
121 --      UPDATE dml operation.
122 --
123 -- Prerequisites:
124 --   1) Either hr_api.check_integrity_violated,
125 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
126 --      hr_api.unique_integrity_violated has been raised with the subsequent
127 --      stripping of the constraint name from the generated error message
128 --      text.
129 --   2) Standalone validation test which corresponds with a constraint error.
130 --
131 -- In Parameter:
132 --   p_constraint_name is in upper format and is just the constraint name
133 --   (e.g. not prefixed by brackets, schema owner etc).
134 --
135 -- Post Success:
136 --   Development dependant.
137 --
138 -- Post Failure:
139 --   Developement dependant.
140 --
141 -- Developer Implementation Notes:
142 --   For each constraint being checked the hr system package failure message
143 --   has been generated as a template only. These system error messages should
144 --   be modified as required (i.e. change the system failure message to a user
145 --   friendly defined error message).
146 --
147 -- Access Status:
148 --   Internal Development Use Only.
149 --
150 -- {End Of Comments}
151 -- ----------------------------------------------------------------------------
152 Procedure constraint_error
153             (p_constraint_name in all_constraints.constraint_name%TYPE);
154 --
155 -- ----------------------------------------------------------------------------
156 -- |-----------------------------< api_updating >-----------------------------|
157 -- ----------------------------------------------------------------------------
158 -- {Start Of Comments}
159 --
160 -- Description:
161 --   This function is used to populate the g_old_rec record with the
162 --   current row from the database for the specified primary key
163 --   provided that the primary key exists and is valid and does not
164 --   already match the current g_old_rec. The function will always return
165 --   a TRUE value if the g_old_rec is populated with the current row.
166 --   A FALSE value will be returned if all of the primary key arguments
167 --   are null.
168 --
169 -- Prerequisites:
170 --   None.
171 --
172 -- In Parameters:
173 --
174 -- Post Success:
175 --   A value of TRUE will be returned indiciating that the g_old_rec
176 --   is current.
177 --   A value of FALSE will be returned if all of the primary key arguments
178 --   have a null value (this indicates that the row has not be inserted into
179 --   the Schema), and therefore could never have a corresponding row.
180 --
181 -- Post Failure:
182 --   A failure can only occur under two circumstances:
183 --   1) The primary key is invalid (i.e. a row does not exist for the
184 --      specified primary key values).
185 --   2) If an object_version_number exists but is NOT the same as the current
186 --      g_old_rec value.
187 --
188 -- Developer Implementation Notes:
189 --   None.
190 --
191 -- Access Status:
192 --   Internal Development Use Only.
193 --
194 -- {End Of Comments}
195 -- ----------------------------------------------------------------------------
196 Function api_updating
197   (
198   p_age_fctr_id                        in number,
199   p_object_version_number              in number
200   )      Return Boolean;
201 --
202 -- ----------------------------------------------------------------------------
203 -- |---------------------------------< lck >----------------------------------|
204 -- ----------------------------------------------------------------------------
205 -- {Start Of Comments}
206 --
207 -- Description:
208 --   The Lck process has two main functions to perform. Firstly, the row to be
209 --   updated or deleted must be locked. The locking of the row will only be
210 --   successful if the row is not currently locked by another user.
211 --   Secondly, during the locking of the row, the row is selected into
212 --   the g_old_rec data structure which enables the current row values from the
213 --   server to be available to the api.
214 --
215 -- Prerequisites:
216 --   When attempting to call the lock the object version number (if defined)
217 --   is mandatory.
218 --
219 -- In Parameters:
220 --   The arguments to the Lck process are the primary key(s) which uniquely
221 --   identify the row and the object version number of row.
222 --
223 -- Post Success:
224 --   On successful completion of the Lck process the row to be updated or
225 --   deleted will be locked and selected into the global data structure
226 --   g_old_rec.
227 --
228 -- Post Failure:
229 --   The Lck process can fail for three reasons:
230 --   1) When attempting to lock the row the row could already be locked by
231 --      another user. This will raise the HR_Api.Object_Locked exception.
232 --   2) The row which is required to be locked doesn't exist in the HR Schema.
233 --      This error is trapped and reported using the message name
234 --      'HR_7220_INVALID_PRIMARY_KEY'.
235 --   3) The row although existing in the HR Schema has a different object
236 --      version number than the object version number specified.
237 --      This error is trapped and reported using the message name
238 --      'HR_7155_OBJECT_INVALID'.
239 --
240 -- Developer Implementation Notes:
241 --   For each primary key and the object version number arguments add a
242 --   call to hr_api.mandatory_arg_error procedure to ensure that these
243 --   argument values are not null.
244 --
245 -- Access Status:
246 --   Internal Development Use Only.
247 --
248 -- {End Of Comments}
249 -- ----------------------------------------------------------------------------
250 Procedure lck
251   (
252   p_age_fctr_id                        in number,
253   p_object_version_number              in number
254   );
255 --
256 -- ----------------------------------------------------------------------------
257 -- |-----------------------------< convert_args >-----------------------------|
258 -- ----------------------------------------------------------------------------
259 -- {Start Of Comments}
260 --
261 -- Description:
262 --   This function is used to turn attribute parameters into the record
263 --   structure parameter g_rec_type.
264 --
265 -- Prerequisites:
266 --   This is a private function and can only be called from the ins or upd
267 --   attribute processes.
268 --
269 -- In Parameters:
270 --
271 -- Post Success:
272 --   A returning record structure will be returned.
273 --
274 -- Post Failure:
275 --   No direct error handling is required within this function. Any possible
276 --   errors within this function will be a PL/SQL value error due to conversion
277 --   of datatypes or data lengths.
278 --
279 -- Developer Implementation Notes:
280 --   None.
281 --
282 -- Access Status:
283 --   Internal Row Handler Use Only.
284 --
285 -- {End Of Comments}
286 -- ----------------------------------------------------------------------------
287 Function convert_args
288 	(
289 	p_age_fctr_id                   in number,
290 	p_name                          in varchar2,
291 	p_mx_age_num                    in number,
292 	p_mn_age_num                    in number,
293 	p_age_uom                       in varchar2,
294 	p_no_mn_age_flag                in varchar2,
295 	p_no_mx_age_flag                in varchar2,
296         p_age_to_use_cd                 in varchar2,
297 	p_age_det_cd                    in varchar2,
298 	p_age_det_rl                    in number,
299 	p_rndg_cd                       in varchar2,
300 	p_rndg_rl                       in number,
301 	p_age_calc_rl                   in number,
302 	p_business_group_id             in number,
303 	p_agf_attribute_category        in varchar2,
304 	p_agf_attribute1                in varchar2,
305 	p_agf_attribute2                in varchar2,
306 	p_agf_attribute3                in varchar2,
307 	p_agf_attribute4                in varchar2,
308 	p_agf_attribute5                in varchar2,
309 	p_agf_attribute6                in varchar2,
310 	p_agf_attribute7                in varchar2,
311 	p_agf_attribute8                in varchar2,
312 	p_agf_attribute9                in varchar2,
313 	p_agf_attribute10               in varchar2,
314 	p_agf_attribute11               in varchar2,
315 	p_agf_attribute12               in varchar2,
316 	p_agf_attribute13               in varchar2,
317 	p_agf_attribute14               in varchar2,
318 	p_agf_attribute15               in varchar2,
319 	p_agf_attribute16               in varchar2,
320 	p_agf_attribute17               in varchar2,
321 	p_agf_attribute18               in varchar2,
322 	p_agf_attribute19               in varchar2,
323 	p_agf_attribute20               in varchar2,
324 	p_agf_attribute21               in varchar2,
325 	p_agf_attribute22               in varchar2,
326 	p_agf_attribute23               in varchar2,
327 	p_agf_attribute24               in varchar2,
328 	p_agf_attribute25               in varchar2,
329 	p_agf_attribute26               in varchar2,
330 	p_agf_attribute27               in varchar2,
331 	p_agf_attribute28               in varchar2,
332 	p_agf_attribute29               in varchar2,
333 	p_agf_attribute30               in varchar2,
334 	p_object_version_number         in number
335 	)
336 	Return g_rec_type;
337 --
338 end ben_agf_shd;