DBA Data[Home] [Help]

PACKAGE: APPS.BEN_CQB_SHD

Source


1 Package ben_cqb_shd as
2 /* $Header: becqbrhi.pkh 120.0 2005/05/28 01:19:54 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   cbr_quald_bnf_id                  number(15),
11   quald_bnf_flag                    varchar2(30),
12   cbr_elig_perd_strt_dt             date,
13   cbr_elig_perd_end_dt              date,
14   quald_bnf_person_id               number(15),
15   pgm_id                            number(15),
16   ptip_id                           number(15),
17   pl_typ_id                         number(15),
18   cvrd_emp_person_id                number(15),
19   cbr_inelg_rsn_cd                  varchar2(30),
20   business_group_id                 number(15),
21   cqb_attribute_category            varchar2(30),
22   cqb_attribute1                    varchar2(150),
23   cqb_attribute2                    varchar2(150),
24   cqb_attribute3                    varchar2(150),
25   cqb_attribute4                    varchar2(150),
26   cqb_attribute5                    varchar2(150),
27   cqb_attribute6                    varchar2(150),
28   cqb_attribute7                    varchar2(150),
29   cqb_attribute8                    varchar2(150),
30   cqb_attribute9                    varchar2(150),
31   cqb_attribute10                   varchar2(150),
32   cqb_attribute11                   varchar2(150),
33   cqb_attribute12                   varchar2(150),
34   cqb_attribute13                   varchar2(150),
35   cqb_attribute14                   varchar2(150),
36   cqb_attribute15                   varchar2(150),
37   cqb_attribute16                   varchar2(150),
38   cqb_attribute17                   varchar2(150),
39   cqb_attribute18                   varchar2(150),
40   cqb_attribute19                   varchar2(150),
41   cqb_attribute20                   varchar2(150),
42   cqb_attribute21                   varchar2(150),
43   cqb_attribute22                   varchar2(150),
44   cqb_attribute23                   varchar2(150),
45   cqb_attribute24                   varchar2(150),
46   cqb_attribute25                   varchar2(150),
47   cqb_attribute26                   varchar2(150),
48   cqb_attribute27                   varchar2(150),
49   cqb_attribute28                   varchar2(150),
50   cqb_attribute29                   varchar2(150),
51   cqb_attribute30                   varchar2(150),
52   object_version_number             number(9)
53   );
54 --
55 -- ----------------------------------------------------------------------------
56 -- |           Global Definitions - Internal Development Use Only             |
57 -- ----------------------------------------------------------------------------
58 --
59 g_old_rec  g_rec_type;                            -- Global record definition
60 g_api_dml  boolean;                               -- Global api dml status
61 --
62 -- ----------------------------------------------------------------------------
63 -- |------------------------< return_api_dml_status >-------------------------|
64 -- ----------------------------------------------------------------------------
65 -- {Start Of Comments}
66 --
67 -- Description:
68 --   This function will return the current g_api_dml private global
69 --   boolean status.
70 --   The g_api_dml status determines if at the time of the function
71 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
72 --   is being issued from within an api.
73 --   If the status is TRUE then a dml statement is being issued from
74 --   within this entity api.
75 --   This function is primarily to support database triggers which
76 --   need to maintain the object_version_number for non-supported
77 --   dml statements (i.e. dml statement issued outside of the api layer).
78 --
79 -- Prerequisites:
80 --   None.
81 --
82 -- In Parameters:
83 --   None.
84 --
85 -- Post Success:
86 --   Processing continues.
87 --   If the function returns a TRUE value then, dml is being executed from
88 --   within this api.
89 --
90 -- Post Failure:
91 --   None.
92 --
93 -- Access Status:
94 --   Internal Row Handler Use Only.
95 --
96 -- {End Of Comments}
97 -- ----------------------------------------------------------------------------
98 Function return_api_dml_status Return Boolean;
99 --
100 -- ----------------------------------------------------------------------------
101 -- |---------------------------< constraint_error >---------------------------|
102 -- ----------------------------------------------------------------------------
103 -- {Start Of Comments}
104 --
105 -- Description:
106 --   This procedure is called when a constraint has been violated (i.e.
107 --   The exception hr_api.check_integrity_violated,
108 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
109 --   hr_api.unique_integrity_violated has been raised).
110 --   The exceptions can only be raised as follows:
111 --   1) A check constraint can only be violated during an INSERT or UPDATE
112 --      dml operation.
113 --   2) A parent integrity constraint can only be violated during an
114 --      INSERT or UPDATE dml operation.
115 --   3) A child integrity constraint can only be violated during an
116 --      DELETE dml operation.
117 --   4) A unique integrity constraint can only be violated during INSERT or
118 --      UPDATE dml operation.
119 --
120 -- Prerequisites:
121 --   1) Either 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 with the subsequent
124 --      stripping of the constraint name from the generated error message
125 --      text.
126 --   2) Standalone validation test which corresponds with a constraint error.
127 --
128 -- In Parameter:
129 --   p_constraint_name is in upper format and is just the constraint name
130 --   (e.g. not prefixed by brackets, schema owner etc).
131 --
132 -- Post Success:
133 --   Development dependant.
134 --
135 -- Post Failure:
136 --   Developement dependant.
137 --
138 -- Developer Implementation Notes:
139 --   For each constraint being checked the hr system package failure message
140 --   has been generated as a template only. These system error messages should
141 --   be modified as required (i.e. change the system failure message to a user
142 --   friendly defined error message).
143 --
144 -- Access Status:
145 --   Internal Development Use Only.
146 --
147 -- {End Of Comments}
148 -- ----------------------------------------------------------------------------
149 Procedure constraint_error
150             (p_constraint_name in all_constraints.constraint_name%TYPE);
151 --
152 -- ----------------------------------------------------------------------------
153 -- |-----------------------------< api_updating >-----------------------------|
154 -- ----------------------------------------------------------------------------
155 -- {Start Of Comments}
156 --
157 -- Description:
158 --   This function is used to populate the g_old_rec record with the
159 --   current row from the database for the specified primary key
160 --   provided that the primary key exists and is valid and does not
161 --   already match the current g_old_rec. The function will always return
162 --   a TRUE value if the g_old_rec is populated with the current row.
163 --   A FALSE value will be returned if all of the primary key arguments
164 --   are null.
165 --
166 -- Prerequisites:
167 --   None.
168 --
169 -- In Parameters:
170 --
171 -- Post Success:
172 --   A value of TRUE will be returned indiciating that the g_old_rec
173 --   is current.
174 --   A value of FALSE will be returned if all of the primary key arguments
175 --   have a null value (this indicates that the row has not be inserted into
176 --   the Schema), and therefore could never have a corresponding row.
177 --
178 -- Post Failure:
179 --   A failure can only occur under two circumstances:
180 --   1) The primary key is invalid (i.e. a row does not exist for the
181 --      specified primary key values).
182 --   2) If an object_version_number exists but is NOT the same as the current
183 --      g_old_rec value.
184 --
185 -- Developer Implementation Notes:
186 --   None.
187 --
188 -- Access Status:
189 --   Internal Development Use Only.
190 --
191 -- {End Of Comments}
192 -- ----------------------------------------------------------------------------
193 Function api_updating
194   (
195   p_cbr_quald_bnf_id                   in number,
196   p_object_version_number              in number
197   )      Return Boolean;
198 --
199 -- ----------------------------------------------------------------------------
200 -- |---------------------------------< lck >----------------------------------|
201 -- ----------------------------------------------------------------------------
202 -- {Start Of Comments}
203 --
204 -- Description:
205 --   The Lck process has two main functions to perform. Firstly, the row to be
206 --   updated or deleted must be locked. The locking of the row will only be
207 --   successful if the row is not currently locked by another user.
208 --   Secondly, during the locking of the row, the row is selected into
209 --   the g_old_rec data structure which enables the current row values from the
210 --   server to be available to the api.
211 --
212 -- Prerequisites:
213 --   When attempting to call the lock the object version number (if defined)
214 --   is mandatory.
215 --
216 -- In Parameters:
217 --   The arguments to the Lck process are the primary key(s) which uniquely
218 --   identify the row and the object version number of row.
219 --
220 -- Post Success:
221 --   On successful completion of the Lck process the row to be updated or
222 --   deleted will be locked and selected into the global data structure
223 --   g_old_rec.
224 --
225 -- Post Failure:
226 --   The Lck process can fail for three reasons:
227 --   1) When attempting to lock the row the row could already be locked by
228 --      another user. This will raise the HR_Api.Object_Locked exception.
229 --   2) The row which is required to be locked doesn't exist in the HR Schema.
230 --      This error is trapped and reported using the message name
231 --      'HR_7220_INVALID_PRIMARY_KEY'.
232 --   3) The row although existing in the HR Schema has a different object
233 --      version number than the object version number specified.
234 --      This error is trapped and reported using the message name
235 --      'HR_7155_OBJECT_INVALID'.
236 --
237 -- Developer Implementation Notes:
238 --   For each primary key and the object version number arguments add a
239 --   call to hr_api.mandatory_arg_error procedure to ensure that these
240 --   argument values are not null.
241 --
242 -- Access Status:
243 --   Internal Development Use Only.
244 --
245 -- {End Of Comments}
246 -- ----------------------------------------------------------------------------
247 Procedure lck
248   (
249   p_cbr_quald_bnf_id                   in number,
250   p_object_version_number              in number
251   );
252 --
253 -- ----------------------------------------------------------------------------
254 -- |-----------------------------< convert_args >-----------------------------|
255 -- ----------------------------------------------------------------------------
256 -- {Start Of Comments}
257 --
258 -- Description:
259 --   This function is used to turn attribute parameters into the record
260 --   structure parameter g_rec_type.
261 --
262 -- Prerequisites:
263 --   This is a private function and can only be called from the ins or upd
264 --   attribute processes.
265 --
266 -- In Parameters:
267 --
268 -- Post Success:
269 --   A returning record structure will be returned.
270 --
271 -- Post Failure:
272 --   No direct error handling is required within this function. Any possible
273 --   errors within this function will be a PL/SQL value error due to conversion
274 --   of datatypes or data lengths.
275 --
276 -- Developer Implementation Notes:
277 --   None.
278 --
279 -- Access Status:
280 --   Internal Row Handler Use Only.
281 --
282 -- {End Of Comments}
283 -- ----------------------------------------------------------------------------
284 Function convert_args
285 	(
286 	p_cbr_quald_bnf_id              in number,
287 	p_quald_bnf_flag                in varchar2,
288 	p_cbr_elig_perd_strt_dt         in date,
289 	p_cbr_elig_perd_end_dt          in date,
290 	p_quald_bnf_person_id           in number,
291         p_pgm_id                        in number,
292         p_ptip_id                       in number,
293         p_pl_typ_id                     in number,
294 	p_cvrd_emp_person_id            in number,
295 	p_cbr_inelg_rsn_cd              in varchar2,
296 	p_business_group_id             in number,
297 	p_cqb_attribute_category        in varchar2,
298 	p_cqb_attribute1                in varchar2,
299 	p_cqb_attribute2                in varchar2,
300 	p_cqb_attribute3                in varchar2,
301 	p_cqb_attribute4                in varchar2,
302 	p_cqb_attribute5                in varchar2,
303 	p_cqb_attribute6                in varchar2,
304 	p_cqb_attribute7                in varchar2,
305 	p_cqb_attribute8                in varchar2,
306 	p_cqb_attribute9                in varchar2,
307 	p_cqb_attribute10               in varchar2,
308 	p_cqb_attribute11               in varchar2,
309 	p_cqb_attribute12               in varchar2,
310 	p_cqb_attribute13               in varchar2,
311 	p_cqb_attribute14               in varchar2,
312 	p_cqb_attribute15               in varchar2,
313 	p_cqb_attribute16               in varchar2,
314 	p_cqb_attribute17               in varchar2,
315 	p_cqb_attribute18               in varchar2,
316 	p_cqb_attribute19               in varchar2,
317 	p_cqb_attribute20               in varchar2,
318 	p_cqb_attribute21               in varchar2,
319 	p_cqb_attribute22               in varchar2,
320 	p_cqb_attribute23               in varchar2,
321 	p_cqb_attribute24               in varchar2,
322 	p_cqb_attribute25               in varchar2,
323 	p_cqb_attribute26               in varchar2,
324 	p_cqb_attribute27               in varchar2,
325 	p_cqb_attribute28               in varchar2,
326 	p_cqb_attribute29               in varchar2,
327 	p_cqb_attribute30               in varchar2,
328 	p_object_version_number         in number
329 	)
330 	Return g_rec_type;
331 --
332 end ben_cqb_shd;