DBA Data[Home] [Help]

PACKAGE: APPS.BEN_BNR_SHD

Source


1 Package ben_bnr_shd as
2 /* $Header: bebnrrhi.pkh 120.0 2005/05/28 00:46:11 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   rptg_grp_id                       number(15),
11   name                              varchar2(240), -- UTF8 Change Bug 2254683
12   business_group_id                 number(15),
13 --  pgm_id                            number(15),
14   rptg_prps_cd                      varchar2(30),
15   rpg_desc                          varchar2(240),
16   bnr_attribute_category            varchar2(30),
17   bnr_attribute1                    varchar2(150),
18   bnr_attribute2                    varchar2(150),
19   bnr_attribute3                    varchar2(150),
20   bnr_attribute4                    varchar2(150),
21   bnr_attribute5                    varchar2(150),
22   bnr_attribute6                    varchar2(150),
23   bnr_attribute7                    varchar2(150),
24   bnr_attribute8                    varchar2(150),
25   bnr_attribute9                    varchar2(150),
26   bnr_attribute10                   varchar2(150),
27   bnr_attribute11                   varchar2(150),
28   bnr_attribute12                   varchar2(150),
29   bnr_attribute13                   varchar2(150),
30   bnr_attribute14                   varchar2(150),
31   bnr_attribute15                   varchar2(150),
32   bnr_attribute16                   varchar2(150),
33   bnr_attribute17                   varchar2(150),
34   bnr_attribute18                   varchar2(150),
35   bnr_attribute19                   varchar2(150),
36   bnr_attribute20                   varchar2(150),
37   bnr_attribute21                   varchar2(150),
38   bnr_attribute22                   varchar2(150),
39   bnr_attribute23                   varchar2(150),
40   bnr_attribute24                   varchar2(150),
41   bnr_attribute25                   varchar2(150),
42   bnr_attribute26                   varchar2(150),
43   bnr_attribute27                   varchar2(150),
44   bnr_attribute28                   varchar2(150),
45   bnr_attribute29                   varchar2(150),
46   bnr_attribute30                   varchar2(150),
47   function_code                     varchar2(30),
48   legislation_code                  varchar2(30),
49   object_version_number             number(9),
50   ordr_num                          number(15)        --iRec
51   );
52 --
53 -- ----------------------------------------------------------------------------
54 -- |           Global Definitions - Internal Development Use Only             |
55 -- ----------------------------------------------------------------------------
56 --
57 g_old_rec  g_rec_type;                            -- Global record definition
58 g_api_dml  boolean;                               -- Global api dml status
59 --
60 -- ----------------------------------------------------------------------------
61 -- |------------------------< return_api_dml_status >-------------------------|
62 -- ----------------------------------------------------------------------------
63 -- {Start Of Comments}
64 --
65 -- Description:
66 --   This function will return the current g_api_dml private global
67 --   boolean status.
68 --   The g_api_dml status determines if at the time of the function
69 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
70 --   is being issued from within an api.
71 --   If the status is TRUE then a dml statement is being issued from
72 --   within this entity api.
73 --   This function is primarily to support database triggers which
74 --   need to maintain the object_version_number for non-supported
75 --   dml statements (i.e. dml statement issued outside of the api layer).
76 --
77 -- Prerequisites:
78 --   None.
79 --
80 -- In Parameters:
81 --   None.
82 --
83 -- Post Success:
84 --   Processing continues.
85 --   If the function returns a TRUE value then, dml is being executed from
86 --   within this api.
87 --
88 -- Post Failure:
89 --   None.
90 --
91 -- Access Status:
92 --   Internal Row Handler Use Only.
93 --
94 -- {End Of Comments}
95 -- ----------------------------------------------------------------------------
96 Function return_api_dml_status Return Boolean;
97 --
98 -- ----------------------------------------------------------------------------
99 -- |---------------------------< constraint_error >---------------------------|
100 -- ----------------------------------------------------------------------------
101 -- {Start Of Comments}
102 --
103 -- Description:
104 --   This procedure is called when a constraint has been violated (i.e.
105 --   The exception hr_api.check_integrity_violated,
106 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
107 --   hr_api.unique_integrity_violated has been raised).
108 --   The exceptions can only be raised as follows:
109 --   1) A check constraint can only be violated during an INSERT or UPDATE
110 --      dml operation.
111 --   2) A parent integrity constraint can only be violated during an
112 --      INSERT or UPDATE dml operation.
113 --   3) A child integrity constraint can only be violated during an
114 --      DELETE dml operation.
115 --   4) A unique integrity constraint can only be violated during INSERT or
116 --      UPDATE dml operation.
117 --
118 -- Prerequisites:
119 --   1) Either hr_api.check_integrity_violated,
120 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
121 --      hr_api.unique_integrity_violated has been raised with the subsequent
122 --      stripping of the constraint name from the generated error message
123 --      text.
124 --   2) Standalone validation test which corresponds with a constraint error.
125 --
126 -- In Parameter:
127 --   p_constraint_name is in upper format and is just the constraint name
128 --   (e.g. not prefixed by brackets, schema owner etc).
129 --
130 -- Post Success:
131 --   Development dependant.
132 --
133 -- Post Failure:
134 --   Developement dependant.
135 --
136 -- Developer Implementation Notes:
137 --   For each constraint being checked the hr system package failure message
138 --   has been generated as a template only. These system error messages should
139 --   be modified as required (i.e. change the system failure message to a user
140 --   friendly defined error message).
141 --
142 -- Access Status:
143 --   Internal Development Use Only.
144 --
145 -- {End Of Comments}
146 -- ----------------------------------------------------------------------------
147 Procedure constraint_error
148             (p_constraint_name in all_constraints.constraint_name%TYPE);
149 --
150 -- ----------------------------------------------------------------------------
151 -- |-----------------------------< api_updating >-----------------------------|
152 -- ----------------------------------------------------------------------------
153 -- {Start Of Comments}
154 --
155 -- Description:
156 --   This function is used to populate the g_old_rec record with the
157 --   current row from the database for the specified primary key
158 --   provided that the primary key exists and is valid and does not
159 --   already match the current g_old_rec. The function will always return
160 --   a TRUE value if the g_old_rec is populated with the current row.
161 --   A FALSE value will be returned if all of the primary key arguments
162 --   are null.
163 --
164 -- Prerequisites:
165 --   None.
166 --
167 -- In Parameters:
168 --
169 -- Post Success:
170 --   A value of TRUE will be returned indiciating that the g_old_rec
171 --   is current.
172 --   A value of FALSE will be returned if all of the primary key arguments
173 --   have a null value (this indicates that the row has not be inserted into
174 --   the Schema), and therefore could never have a corresponding row.
175 --
176 -- Post Failure:
177 --   A failure can only occur under two circumstances:
178 --   1) The primary key is invalid (i.e. a row does not exist for the
179 --      specified primary key values).
180 --   2) If an object_version_number exists but is NOT the same as the current
181 --      g_old_rec value.
182 --
183 -- Developer Implementation Notes:
184 --   None.
185 --
186 -- Access Status:
187 --   Internal Development Use Only.
188 --
189 -- {End Of Comments}
190 -- ----------------------------------------------------------------------------
191 Function api_updating
192   (
193   p_rptg_grp_id                        in number,
194   p_object_version_number              in number
195   )      Return Boolean;
196 --
197 -- ----------------------------------------------------------------------------
198 -- |---------------------------------< lck >----------------------------------|
199 -- ----------------------------------------------------------------------------
200 -- {Start Of Comments}
201 --
202 -- Description:
203 --   The Lck process has two main functions to perform. Firstly, the row to be
204 --   updated or deleted must be locked. The locking of the row will only be
205 --   successful if the row is not currently locked by another user.
206 --   Secondly, during the locking of the row, the row is selected into
207 --   the g_old_rec data structure which enables the current row values from the
208 --   server to be available to the api.
209 --
210 -- Prerequisites:
211 --   When attempting to call the lock the object version number (if defined)
212 --   is mandatory.
213 --
214 -- In Parameters:
215 --   The arguments to the Lck process are the primary key(s) which uniquely
216 --   identify the row and the object version number of row.
217 --
218 -- Post Success:
219 --   On successful completion of the Lck process the row to be updated or
220 --   deleted will be locked and selected into the global data structure
221 --   g_old_rec.
222 --
223 -- Post Failure:
224 --   The Lck process can fail for three reasons:
225 --   1) When attempting to lock the row the row could already be locked by
226 --      another user. This will raise the HR_Api.Object_Locked exception.
227 --   2) The row which is required to be locked doesn't exist in the HR Schema.
228 --      This error is trapped and reported using the message name
229 --      'HR_7220_INVALID_PRIMARY_KEY'.
230 --   3) The row although existing in the HR Schema has a different object
231 --      version number than the object version number specified.
232 --      This error is trapped and reported using the message name
233 --      'HR_7155_OBJECT_INVALID'.
234 --
235 -- Developer Implementation Notes:
236 --   For each primary key and the object version number arguments add a
237 --   call to hr_api.mandatory_arg_error procedure to ensure that these
238 --   argument values are not null.
239 --
240 -- Access Status:
241 --   Internal Development Use Only.
242 --
243 -- {End Of Comments}
244 -- ----------------------------------------------------------------------------
245 Procedure lck
246   (
247   p_rptg_grp_id                        in number,
248   p_object_version_number              in number
249   );
250 --
251 -- ----------------------------------------------------------------------------
252 -- |-----------------------------< convert_args >-----------------------------|
253 -- ----------------------------------------------------------------------------
254 -- {Start Of Comments}
255 --
256 -- Description:
257 --   This function is used to turn attribute parameters into the record
258 --   structure parameter g_rec_type.
259 --
260 -- Prerequisites:
261 --   This is a private function and can only be called from the ins or upd
262 --   attribute processes.
263 --
264 -- In Parameters:
265 --
266 -- Post Success:
267 --   A returning record structure will be returned.
268 --
269 -- Post Failure:
270 --   No direct error handling is required within this function. Any possible
271 --   errors within this function will be a PL/SQL value error due to conversion
272 --   of datatypes or data lengths.
273 --
274 -- Developer Implementation Notes:
275 --   None.
276 --
277 -- Access Status:
278 --   Internal Row Handler Use Only.
279 --
280 -- {End Of Comments}
281 -- ----------------------------------------------------------------------------
282 Function convert_args
283 	(
284 	p_rptg_grp_id                   in number,
285 	p_name                          in varchar2,
286 	p_business_group_id             in number,
287 --	p_pgm_id                        in number,
288 	p_rptg_prps_cd                  in varchar2,
289 	p_rpg_desc                      in varchar2,
290 	p_bnr_attribute_category        in varchar2,
291 	p_bnr_attribute1                in varchar2,
292 	p_bnr_attribute2                in varchar2,
293 	p_bnr_attribute3                in varchar2,
294 	p_bnr_attribute4                in varchar2,
295 	p_bnr_attribute5                in varchar2,
296 	p_bnr_attribute6                in varchar2,
297 	p_bnr_attribute7                in varchar2,
298 	p_bnr_attribute8                in varchar2,
299 	p_bnr_attribute9                in varchar2,
300 	p_bnr_attribute10               in varchar2,
301 	p_bnr_attribute11               in varchar2,
302 	p_bnr_attribute12               in varchar2,
303 	p_bnr_attribute13               in varchar2,
304 	p_bnr_attribute14               in varchar2,
305 	p_bnr_attribute15               in varchar2,
306 	p_bnr_attribute16               in varchar2,
307 	p_bnr_attribute17               in varchar2,
308 	p_bnr_attribute18               in varchar2,
309 	p_bnr_attribute19               in varchar2,
310 	p_bnr_attribute20               in varchar2,
311 	p_bnr_attribute21               in varchar2,
312 	p_bnr_attribute22               in varchar2,
313 	p_bnr_attribute23               in varchar2,
314 	p_bnr_attribute24               in varchar2,
315 	p_bnr_attribute25               in varchar2,
316 	p_bnr_attribute26               in varchar2,
317 	p_bnr_attribute27               in varchar2,
318 	p_bnr_attribute28               in varchar2,
319 	p_bnr_attribute29               in varchar2,
320 	p_bnr_attribute30               in varchar2,
321         p_function_code                 in varchar2,
322         p_legislation_code              in varchar2,
323 	p_object_version_number         in number,
324 	p_ordr_num                      in number      --iRec
325 	)
326 	Return g_rec_type;
327 --
328 --
329 Procedure add_language;
330 --
331 
332 end ben_bnr_shd;