DBA Data[Home] [Help]

PACKAGE: APPS.BEN_CLA_SHD

Source


1 Package ben_cla_shd AUTHID CURRENT_USER as
2 /* $Header: beclarhi.pkh 120.0 2005/05/28 01:03:27 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   cmbn_age_los_fctr_id              number(15),
11   business_group_id                 number(15),
12   los_fctr_id                       number(15),
13   age_fctr_id                       number(15),
14   cmbnd_min_val                     number,
15   cmbnd_max_val                     number,
16   ordr_num                          number(15),
17   cla_attribute_category            varchar2(30),
18   cla_attribute1                    varchar2(150),
19   cla_attribute2                    varchar2(150),
20   cla_attribute3                    varchar2(150),
21   cla_attribute4                    varchar2(150),
22   cla_attribute5                    varchar2(150),
23   cla_attribute6                    varchar2(150),
24   cla_attribute7                    varchar2(150),
25   cla_attribute8                    varchar2(150),
26   cla_attribute9                    varchar2(150),
27   cla_attribute10                   varchar2(150),
28   cla_attribute11                   varchar2(150),
29   cla_attribute12                   varchar2(150),
30   cla_attribute13                   varchar2(150),
31   cla_attribute14                   varchar2(150),
32   cla_attribute15                   varchar2(150),
33   cla_attribute16                   varchar2(150),
34   cla_attribute17                   varchar2(150),
35   cla_attribute18                   varchar2(150),
36   cla_attribute19                   varchar2(150),
37   cla_attribute20                   varchar2(150),
38   cla_attribute21                   varchar2(150),
39   cla_attribute22                   varchar2(150),
40   cla_attribute23                   varchar2(150),
41   cla_attribute24                   varchar2(150),
42   cla_attribute25                   varchar2(150),
43   cla_attribute26                   varchar2(150),
44   cla_attribute27                   varchar2(150),
45   cla_attribute28                   varchar2(150),
46   cla_attribute29                   varchar2(150),
47   cla_attribute30                   varchar2(150),
48   object_version_number             number(9) ,
49   name                              varchar2(240)
50   );
51 --
52 -- ----------------------------------------------------------------------------
53 -- |           Global Definitions - Internal Development Use Only             |
54 -- ----------------------------------------------------------------------------
55 --
56 g_old_rec  g_rec_type;                            -- Global record definition
57 g_api_dml  boolean;                               -- Global api dml status
58 --
59 -- ----------------------------------------------------------------------------
60 -- |------------------------< return_api_dml_status >-------------------------|
61 -- ----------------------------------------------------------------------------
62 -- {Start Of Comments}
63 --
64 -- Description:
65 --   This function will return the current g_api_dml private global
66 --   boolean status.
67 --   The g_api_dml status determines if at the time of the function
68 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
69 --   is being issued from within an api.
70 --   If the status is TRUE then a dml statement is being issued from
71 --   within this entity api.
72 --   This function is primarily to support database triggers which
73 --   need to maintain the object_version_number for non-supported
74 --   dml statements (i.e. dml statement issued outside of the api layer).
75 --
76 -- Prerequisites:
77 --   None.
78 --
79 -- In Parameters:
80 --   None.
81 --
82 -- Post Success:
83 --   Processing continues.
84 --   If the function returns a TRUE value then, dml is being executed from
85 --   within this api.
86 --
87 -- Post Failure:
88 --   None.
89 --
90 -- Access Status:
91 --   Internal Row Handler Use Only.
92 --
93 -- {End Of Comments}
94 -- ----------------------------------------------------------------------------
95 Function return_api_dml_status Return Boolean;
96 --
97 -- ----------------------------------------------------------------------------
98 -- |---------------------------< constraint_error >---------------------------|
99 -- ----------------------------------------------------------------------------
100 -- {Start Of Comments}
101 --
102 -- Description:
103 --   This procedure is called when a constraint has been violated (i.e.
104 --   The exception hr_api.check_integrity_violated,
105 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
106 --   hr_api.unique_integrity_violated has been raised).
107 --   The exceptions can only be raised as follows:
108 --   1) A check constraint can only be violated during an INSERT or UPDATE
109 --      dml operation.
110 --   2) A parent integrity constraint can only be violated during an
111 --      INSERT or UPDATE dml operation.
112 --   3) A child integrity constraint can only be violated during an
113 --      DELETE dml operation.
114 --   4) A unique integrity constraint can only be violated during INSERT or
115 --      UPDATE dml operation.
116 --
117 -- Prerequisites:
118 --   1) Either hr_api.check_integrity_violated,
119 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
120 --      hr_api.unique_integrity_violated has been raised with the subsequent
121 --      stripping of the constraint name from the generated error message
122 --      text.
123 --   2) Standalone validation test which corresponds with a constraint error.
124 --
125 -- In Parameter:
126 --   p_constraint_name is in upper format and is just the constraint name
127 --   (e.g. not prefixed by brackets, schema owner etc).
128 --
129 -- Post Success:
130 --   Development dependant.
131 --
132 -- Post Failure:
133 --   Developement dependant.
134 --
135 -- Developer Implementation Notes:
136 --   For each constraint being checked the hr system package failure message
137 --   has been generated as a template only. These system error messages should
138 --   be modified as required (i.e. change the system failure message to a user
139 --   friendly defined error message).
140 --
141 -- Access Status:
142 --   Internal Development Use Only.
143 --
144 -- {End Of Comments}
145 -- ----------------------------------------------------------------------------
146 Procedure constraint_error
147             (p_constraint_name in all_constraints.constraint_name%TYPE);
148 --
149 -- ----------------------------------------------------------------------------
150 -- |-----------------------------< api_updating >-----------------------------|
151 -- ----------------------------------------------------------------------------
152 -- {Start Of Comments}
153 --
154 -- Description:
155 --   This function is used to populate the g_old_rec record with the
156 --   current row from the database for the specified primary key
157 --   provided that the primary key exists and is valid and does not
158 --   already match the current g_old_rec. The function will always return
159 --   a TRUE value if the g_old_rec is populated with the current row.
160 --   A FALSE value will be returned if all of the primary key arguments
161 --   are null.
162 --
163 -- Prerequisites:
164 --   None.
165 --
166 -- In Parameters:
167 --
168 -- Post Success:
169 --   A value of TRUE will be returned indiciating that the g_old_rec
170 --   is current.
171 --   A value of FALSE will be returned if all of the primary key arguments
172 --   have a null value (this indicates that the row has not be inserted into
173 --   the Schema), and therefore could never have a corresponding row.
174 --
175 -- Post Failure:
176 --   A failure can only occur under two circumstances:
177 --   1) The primary key is invalid (i.e. a row does not exist for the
178 --      specified primary key values).
179 --   2) If an object_version_number exists but is NOT the same as the current
180 --      g_old_rec value.
181 --
182 -- Developer Implementation Notes:
183 --   None.
184 --
185 -- Access Status:
186 --   Internal Development Use Only.
187 --
188 -- {End Of Comments}
189 -- ----------------------------------------------------------------------------
190 Function api_updating
191   (
192   p_cmbn_age_los_fctr_id               in number,
193   p_object_version_number              in number
194   )      Return Boolean;
195 --
196 -- ----------------------------------------------------------------------------
197 -- |---------------------------------< lck >----------------------------------|
198 -- ----------------------------------------------------------------------------
199 -- {Start Of Comments}
200 --
201 -- Description:
202 --   The Lck process has two main functions to perform. Firstly, the row to be
203 --   updated or deleted must be locked. The locking of the row will only be
204 --   successful if the row is not currently locked by another user.
205 --   Secondly, during the locking of the row, the row is selected into
206 --   the g_old_rec data structure which enables the current row values from the
207 --   server to be available to the api.
208 --
209 -- Prerequisites:
210 --   When attempting to call the lock the object version number (if defined)
211 --   is mandatory.
212 --
213 -- In Parameters:
214 --   The arguments to the Lck process are the primary key(s) which uniquely
215 --   identify the row and the object version number of row.
216 --
217 -- Post Success:
218 --   On successful completion of the Lck process the row to be updated or
219 --   deleted will be locked and selected into the global data structure
220 --   g_old_rec.
221 --
222 -- Post Failure:
223 --   The Lck process can fail for three reasons:
224 --   1) When attempting to lock the row the row could already be locked by
225 --      another user. This will raise the HR_Api.Object_Locked exception.
226 --   2) The row which is required to be locked doesn't exist in the HR Schema.
227 --      This error is trapped and reported using the message name
228 --      'HR_7220_INVALID_PRIMARY_KEY'.
229 --   3) The row although existing in the HR Schema has a different object
230 --      version number than the object version number specified.
231 --      This error is trapped and reported using the message name
232 --      'HR_7155_OBJECT_INVALID'.
233 --
234 -- Developer Implementation Notes:
235 --   For each primary key and the object version number arguments add a
236 --   call to hr_api.mandatory_arg_error procedure to ensure that these
237 --   argument values are not null.
238 --
239 -- Access Status:
240 --   Internal Development Use Only.
241 --
242 -- {End Of Comments}
243 -- ----------------------------------------------------------------------------
244 Procedure lck
245   (
246   p_cmbn_age_los_fctr_id               in number,
247   p_object_version_number              in number
248   );
249 --
250 -- ----------------------------------------------------------------------------
251 -- |-----------------------------< convert_args >-----------------------------|
252 -- ----------------------------------------------------------------------------
253 -- {Start Of Comments}
254 --
255 -- Description:
256 --   This function is used to turn attribute parameters into the record
257 --   structure parameter g_rec_type.
258 --
259 -- Prerequisites:
260 --   This is a private function and can only be called from the ins or upd
261 --   attribute processes.
262 --
263 -- In Parameters:
264 --
265 -- Post Success:
266 --   A returning record structure will be returned.
267 --
268 -- Post Failure:
269 --   No direct error handling is required within this function. Any possible
270 --   errors within this function will be a PL/SQL value error due to conversion
271 --   of datatypes or data lengths.
272 --
273 -- Developer Implementation Notes:
274 --   None.
275 --
276 -- Access Status:
277 --   Internal Row Handler Use Only.
278 --
279 -- {End Of Comments}
280 -- ----------------------------------------------------------------------------
281 Function convert_args
282 	(
283 	p_cmbn_age_los_fctr_id          in number,
284 	p_business_group_id             in number,
285 	p_los_fctr_id                   in number,
286 	p_age_fctr_id                   in number,
287 	p_cmbnd_min_val                 in number,
288 	p_cmbnd_max_val                 in number,
289 	p_ordr_num                      in number,
290 	p_cla_attribute_category        in varchar2,
291 	p_cla_attribute1                in varchar2,
292 	p_cla_attribute2                in varchar2,
293 	p_cla_attribute3                in varchar2,
294 	p_cla_attribute4                in varchar2,
295 	p_cla_attribute5                in varchar2,
296 	p_cla_attribute6                in varchar2,
297 	p_cla_attribute7                in varchar2,
298 	p_cla_attribute8                in varchar2,
299 	p_cla_attribute9                in varchar2,
300 	p_cla_attribute10               in varchar2,
301 	p_cla_attribute11               in varchar2,
302 	p_cla_attribute12               in varchar2,
303 	p_cla_attribute13               in varchar2,
304 	p_cla_attribute14               in varchar2,
305 	p_cla_attribute15               in varchar2,
306 	p_cla_attribute16               in varchar2,
307 	p_cla_attribute17               in varchar2,
308 	p_cla_attribute18               in varchar2,
309 	p_cla_attribute19               in varchar2,
310 	p_cla_attribute20               in varchar2,
311 	p_cla_attribute21               in varchar2,
312 	p_cla_attribute22               in varchar2,
313 	p_cla_attribute23               in varchar2,
314 	p_cla_attribute24               in varchar2,
315 	p_cla_attribute25               in varchar2,
316 	p_cla_attribute26               in varchar2,
317 	p_cla_attribute27               in varchar2,
318 	p_cla_attribute28               in varchar2,
319 	p_cla_attribute29               in varchar2,
320 	p_cla_attribute30               in varchar2,
321 	p_object_version_number         in number ,
322         p_name                          in varchar2
323 	)
324 	Return g_rec_type;
325 --
326 end ben_cla_shd;