DBA Data[Home] [Help]

PACKAGE: APPS.BEN_XFI_SHD

Source


1 Package ben_xfi_shd as
2 /* $Header: bexfirhi.pkh 120.0 2005/05/28 12:33:47 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 
9 Type g_rec_type Is Record
10   (
11   ext_file_id                       number(15),
12   name                              varchar2(600),
13   xml_tag_name                      varchar2(80),
14   business_group_id                 number(15),
15   legislation_code                  varchar2(30),
16   xfi_attribute_category            varchar2(30),
17   xfi_attribute1                    varchar2(150),
18   xfi_attribute2                    varchar2(150),
19   xfi_attribute3                    varchar2(150),
20   xfi_attribute4                    varchar2(150),
21   xfi_attribute5                    varchar2(150),
22   xfi_attribute6                    varchar2(150),
23   xfi_attribute7                    varchar2(150),
24   xfi_attribute8                    varchar2(150),
25   xfi_attribute9                    varchar2(150),
26   xfi_attribute10                   varchar2(150),
27   xfi_attribute11                   varchar2(150),
28   xfi_attribute12                   varchar2(150),
29   xfi_attribute13                   varchar2(150),
30   xfi_attribute14                   varchar2(150),
31   xfi_attribute15                   varchar2(150),
32   xfi_attribute16                   varchar2(150),
33   xfi_attribute17                   varchar2(150),
34   xfi_attribute18                   varchar2(150),
35   xfi_attribute19                   varchar2(150),
36   xfi_attribute20                   varchar2(150),
37   xfi_attribute21                   varchar2(150),
38   xfi_attribute22                   varchar2(150),
39   xfi_attribute23                   varchar2(150),
40   xfi_attribute24                   varchar2(150),
41   xfi_attribute25                   varchar2(150),
42   xfi_attribute26                   varchar2(150),
43   xfi_attribute27                   varchar2(150),
44   xfi_attribute28                   varchar2(150),
45   xfi_attribute29                   varchar2(150),
46   xfi_attribute30                   varchar2(150),
47   ext_rcd_in_file_id                number       ,
48   ext_data_elmt_in_rcd_id1          number       ,
49   ext_data_elmt_in_rcd_id2          number       ,
50   last_update_date                  date,
51   creation_date                     date,
52   last_updated_by                   number(15),
53   last_update_login                 number(15),
54   created_by                        number(15),
55   object_version_number             number(9)
56   );
57 --
58 
59 
60 
61 
62 --
63 -- ----------------------------------------------------------------------------
64 -- |           Global Definitions - Internal Development Use Only             |
65 -- ----------------------------------------------------------------------------
66 --
67 g_old_rec  g_rec_type;                            -- Global record definition
68 g_api_dml  boolean;                               -- Global api dml status
69 --
70 -- ----------------------------------------------------------------------------
71 -- |------------------------< return_api_dml_status >-------------------------|
72 -- ----------------------------------------------------------------------------
73 -- {Start Of Comments}
74 --
75 -- Description:
76 --   This function will return the current g_api_dml private global
77 --   boolean status.
78 --   The g_api_dml status determines if at the time of the function
79 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
80 --   is being issued from within an api.
81 --   If the status is TRUE then a dml statement is being issued from
82 --   within this entity api.
83 --   This function is primarily to support database triggers which
84 --   need to maintain the object_version_number for non-supported
85 --   dml statements (i.e. dml statement issued outside of the api layer).
86 --
87 -- Prerequisites:
88 --   None.
89 --
90 -- In Parameters:
91 --   None.
92 --
93 -- Post Success:
94 --   Processing continues.
95 --   If the function returns a TRUE value then, dml is being executed from
96 --   within this api.
97 --
98 -- Post Failure:
99 --   None.
100 --
101 -- Access Status:
102 --   Internal Row Handler Use Only.
103 --
104 -- {End Of Comments}
105 -- ----------------------------------------------------------------------------
106 Function return_api_dml_status Return Boolean;
107 --
108 -- ----------------------------------------------------------------------------
109 -- |---------------------------< constraint_error >---------------------------|
110 -- ----------------------------------------------------------------------------
111 -- {Start Of Comments}
112 --
113 -- Description:
114 --   This procedure is called when a constraint has been violated (i.e.
115 --   The exception hr_api.check_integrity_violated,
116 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
117 --   hr_api.unique_integrity_violated has been raised).
118 --   The exceptions can only be raised as follows:
119 --   1) A check constraint can only be violated during an INSERT or UPDATE
120 --      dml operation.
121 --   2) A parent integrity constraint can only be violated during an
122 --      INSERT or UPDATE dml operation.
123 --   3) A child integrity constraint can only be violated during an
124 --      DELETE dml operation.
125 --   4) A unique integrity constraint can only be violated during INSERT or
126 --      UPDATE dml operation.
127 --
128 -- Prerequisites:
129 --   1) Either hr_api.check_integrity_violated,
130 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
131 --      hr_api.unique_integrity_violated has been raised with the subsequent
132 --      stripping of the constraint name from the generated error message
133 --      text.
134 --   2) Standalone validation test which corresponds with a constraint error.
135 --
136 -- In Parameter:
137 --   p_constraint_name is in upper format and is just the constraint name
138 --   (e.g. not prefixed by brackets, schema owner etc).
139 --
140 -- Post Success:
141 --   Development dependant.
142 --
143 -- Post Failure:
144 --   Developement dependant.
145 --
146 -- Developer Implementation Notes:
147 --   For each constraint being checked the hr system package failure message
148 --   has been generated as a template only. These system error messages should
149 --   be modified as required (i.e. change the system failure message to a user
150 --   friendly defined error message).
151 --
152 -- Access Status:
153 --   Internal Development Use Only.
154 --
155 -- {End Of Comments}
156 -- ----------------------------------------------------------------------------
157 Procedure constraint_error
158             (p_constraint_name in all_constraints.constraint_name%TYPE);
159 --
160 -- ----------------------------------------------------------------------------
161 -- |-----------------------------< api_updating >-----------------------------|
162 -- ----------------------------------------------------------------------------
163 -- {Start Of Comments}
164 --
165 -- Description:
166 --   This function is used to populate the g_old_rec record with the
167 --   current row from the database for the specified primary key
168 --   provided that the primary key exists and is valid and does not
169 --   already match the current g_old_rec. The function will always return
170 --   a TRUE value if the g_old_rec is populated with the current row.
171 --   A FALSE value will be returned if all of the primary key arguments
172 --   are null.
173 --
174 -- Prerequisites:
175 --   None.
176 --
177 -- In Parameters:
178 --
179 -- Post Success:
180 --   A value of TRUE will be returned indiciating that the g_old_rec
181 --   is current.
182 --   A value of FALSE will be returned if all of the primary key arguments
183 --   have a null value (this indicates that the row has not be inserted into
184 --   the Schema), and therefore could never have a corresponding row.
185 --
186 -- Post Failure:
187 --   A failure can only occur under two circumstances:
188 --   1) The primary key is invalid (i.e. a row does not exist for the
189 --      specified primary key values).
190 --   2) If an object_version_number exists but is NOT the same as the current
191 --      g_old_rec value.
192 --
193 -- Developer Implementation Notes:
194 --   None.
195 --
196 -- Access Status:
197 --   Internal Development Use Only.
198 --
199 -- {End Of Comments}
200 -- ----------------------------------------------------------------------------
201 Function api_updating
202   (
203   p_ext_file_id                        in number,
204   p_object_version_number              in number
205   )      Return Boolean;
206 --
207 -- ----------------------------------------------------------------------------
208 -- |---------------------------------< lck >----------------------------------|
209 -- ----------------------------------------------------------------------------
210 -- {Start Of Comments}
211 --
212 -- Description:
213 --   The Lck process has two main functions to perform. Firstly, the row to be
214 --   updated or deleted must be locked. The locking of the row will only be
215 --   successful if the row is not currently locked by another user.
216 --   Secondly, during the locking of the row, the row is selected into
217 --   the g_old_rec data structure which enables the current row values from the
218 --   server to be available to the api.
219 --
220 -- Prerequisites:
221 --   When attempting to call the lock the object version number (if defined)
222 --   is mandatory.
223 --
224 -- In Parameters:
225 --   The arguments to the Lck process are the primary key(s) which uniquely
226 --   identify the row and the object version number of row.
227 --
228 -- Post Success:
229 --   On successful completion of the Lck process the row to be updated or
230 --   deleted will be locked and selected into the global data structure
231 --   g_old_rec.
232 --
233 -- Post Failure:
234 --   The Lck process can fail for three reasons:
235 --   1) When attempting to lock the row the row could already be locked by
236 --      another user. This will raise the HR_Api.Object_Locked exception.
237 --   2) The row which is required to be locked doesn't exist in the HR Schema.
238 --      This error is trapped and reported using the message name
239 --      'HR_7220_INVALID_PRIMARY_KEY'.
240 --   3) The row although existing in the HR Schema has a different object
241 --      version number than the object version number specified.
242 --      This error is trapped and reported using the message name
243 --      'HR_7155_OBJECT_INVALID'.
244 --
245 -- Developer Implementation Notes:
246 --   For each primary key and the object version number arguments add a
247 --   call to hr_api.mandatory_arg_error procedure to ensure that these
248 --   argument values are not null.
249 --
250 -- Access Status:
251 --   Internal Development Use Only.
252 --
253 -- {End Of Comments}
254 -- ----------------------------------------------------------------------------
255 Procedure lck
256   (
257   p_ext_file_id                        in number,
258   p_object_version_number              in number
259   );
260 --
261 -- ----------------------------------------------------------------------------
262 -- |-----------------------------< convert_args >-----------------------------|
263 -- ----------------------------------------------------------------------------
264 -- {Start Of Comments}
265 --
266 -- Description:
267 --   This function is used to turn attribute parameters into the record
268 --   structure parameter g_rec_type.
269 --
270 -- Prerequisites:
271 --   This is a private function and can only be called from the ins or upd
272 --   attribute processes.
273 --
274 -- In Parameters:
275 --
276 -- Post Success:
277 --   A returning record structure will be returned.
278 --
279 -- Post Failure:
280 --   No direct error handling is required within this function. Any possible
281 --   errors within this function will be a PL/SQL value error due to conversion
282 --   of datatypes or data lengths.
283 --
284 -- Developer Implementation Notes:
285 --   None.
286 --
287 -- Access Status:
288 --   Internal Row Handler Use Only.
289 --
290 -- {End Of Comments}
291 -- ----------------------------------------------------------------------------
292 Function convert_args
293 	(
294 	p_ext_file_id                   in number,
295 	p_name                          in varchar2,
296 	p_xml_tag_name                  in varchar2,
297 	p_business_group_id             in number,
298 	p_legislation_code              in varchar2,
299 	p_xfi_attribute_category        in varchar2,
300 	p_xfi_attribute1                in varchar2,
301 	p_xfi_attribute2                in varchar2,
302 	p_xfi_attribute3                in varchar2,
303 	p_xfi_attribute4                in varchar2,
304 	p_xfi_attribute5                in varchar2,
305 	p_xfi_attribute6                in varchar2,
306 	p_xfi_attribute7                in varchar2,
307 	p_xfi_attribute8                in varchar2,
308 	p_xfi_attribute9                in varchar2,
309 	p_xfi_attribute10               in varchar2,
310 	p_xfi_attribute11               in varchar2,
311 	p_xfi_attribute12               in varchar2,
312 	p_xfi_attribute13               in varchar2,
313 	p_xfi_attribute14               in varchar2,
314 	p_xfi_attribute15               in varchar2,
315 	p_xfi_attribute16               in varchar2,
316 	p_xfi_attribute17               in varchar2,
317 	p_xfi_attribute18               in varchar2,
318 	p_xfi_attribute19               in varchar2,
319 	p_xfi_attribute20               in varchar2,
320 	p_xfi_attribute21               in varchar2,
321 	p_xfi_attribute22               in varchar2,
322 	p_xfi_attribute23               in varchar2,
323 	p_xfi_attribute24               in varchar2,
324 	p_xfi_attribute25               in varchar2,
325 	p_xfi_attribute26               in varchar2,
326 	p_xfi_attribute27               in varchar2,
327 	p_xfi_attribute28               in varchar2,
328 	p_xfi_attribute29               in varchar2,
329 	p_xfi_attribute30               in varchar2,
330         P_ext_rcd_in_file_id            in number ,
331         p_ext_data_elmt_in_rcd_id1      in number ,
332         p_ext_data_elmt_in_rcd_id2      in number ,
333         p_last_update_date              in date,
334         p_creation_date                 in date,
335         p_last_updated_by               in number,
336         p_last_update_login             in number,
337         p_created_by                    in number,
338 	p_object_version_number         in number
339 	)
340 	Return g_rec_type;
341 --
342 end ben_xfi_shd;