DBA Data[Home] [Help]

PACKAGE: APPS.BEN_XRS_SHD

Source


1 Package ben_xrs_shd as
2 /* $Header: bexrsrhi.pkh 120.1 2005/06/08 14:22:14 tjesumic noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 
9 Type g_rec_type Is Record
10   (
11   ext_rslt_id                       number(15),
12   run_strt_dt                       date,
13   run_end_dt                        date,
14   ext_stat_cd                       varchar2(30),
15   tot_rec_num                       number(15),
16   tot_per_num                       number(15),
17   tot_err_num                       number(15),
18   eff_dt                            date,
19   ext_strt_dt                       date,
20   ext_end_dt                        date,
21   output_name                       varchar2(110),
22   drctry_name                       varchar2(150),
23   ext_dfn_id                        number(15),
24   business_group_id                 number(15),
25   program_application_id            number(15),
26   program_id                        number(15),
27   program_update_date               date,
28   request_id                        number(15),
29   output_type                       varchar2(30),
30   xdo_template_id                   number(15),
31   object_version_number             number(9)
32   );
33 
34 
35 
36 
37 -- ----------------------------------------------------------------------------
38 -- |           Global Definitions - Internal Development Use Only             |
39 -- ----------------------------------------------------------------------------
40 --
41 g_old_rec  g_rec_type;                            -- Global record definition
42 g_api_dml  boolean;                               -- Global api dml status
43 --
44 -- ----------------------------------------------------------------------------
45 -- |------------------------< return_api_dml_status >-------------------------|
46 -- ----------------------------------------------------------------------------
47 -- {Start Of Comments}
48 --
49 -- Description:
50 --   This function will return the current g_api_dml private global
51 --   boolean status.
52 --   The g_api_dml status determines if at the time of the function
53 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
54 --   is being issued from within an api.
55 --   If the status is TRUE then a dml statement is being issued from
56 --   within this entity api.
57 --   This function is primarily to support database triggers which
58 --   need to maintain the object_version_number for non-supported
59 --   dml statements (i.e. dml statement issued outside of the api layer).
60 --
61 -- Prerequisites:
62 --   None.
63 --
64 -- In Parameters:
65 --   None.
66 --
67 -- Post Success:
68 --   Processing continues.
69 --   If the function returns a TRUE value then, dml is being executed from
70 --   within this api.
71 --
72 -- Post Failure:
73 --   None.
74 --
75 -- Access Status:
76 --   Internal Row Handler Use Only.
77 --
78 -- {End Of Comments}
79 -- ----------------------------------------------------------------------------
80 Function return_api_dml_status Return Boolean;
81 --
82 -- ----------------------------------------------------------------------------
83 -- |---------------------------< constraint_error >---------------------------|
84 -- ----------------------------------------------------------------------------
85 -- {Start Of Comments}
86 --
87 -- Description:
88 --   This procedure is called when a constraint has been violated (i.e.
89 --   The exception hr_api.check_integrity_violated,
90 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
91 --   hr_api.unique_integrity_violated has been raised).
92 --   The exceptions can only be raised as follows:
93 --   1) A check constraint can only be violated during an INSERT or UPDATE
94 --      dml operation.
95 --   2) A parent integrity constraint can only be violated during an
96 --      INSERT or UPDATE dml operation.
97 --   3) A child integrity constraint can only be violated during an
98 --      DELETE dml operation.
99 --   4) A unique integrity constraint can only be violated during INSERT or
100 --      UPDATE dml operation.
101 --
102 -- Prerequisites:
103 --   1) Either hr_api.check_integrity_violated,
104 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
105 --      hr_api.unique_integrity_violated has been raised with the subsequent
106 --      stripping of the constraint name from the generated error message
107 --      text.
108 --   2) Standalone validation test which corresponds with a constraint error.
109 --
110 -- In Parameter:
111 --   p_constraint_name is in upper format and is just the constraint name
112 --   (e.g. not prefixed by brackets, schema owner etc).
113 --
114 -- Post Success:
115 --   Development dependant.
116 --
117 -- Post Failure:
118 --   Developement dependant.
119 --
120 -- Developer Implementation Notes:
121 --   For each constraint being checked the hr system package failure message
122 --   has been generated as a template only. These system error messages should
123 --   be modified as required (i.e. change the system failure message to a user
124 --   friendly defined error message).
125 --
126 -- Access Status:
127 --   Internal Development Use Only.
128 --
129 -- {End Of Comments}
130 -- ----------------------------------------------------------------------------
131 Procedure constraint_error
132             (p_constraint_name in all_constraints.constraint_name%TYPE);
133 --
134 -- ----------------------------------------------------------------------------
135 -- |-----------------------------< api_updating >-----------------------------|
136 -- ----------------------------------------------------------------------------
137 -- {Start Of Comments}
138 --
139 -- Description:
140 --   This function is used to populate the g_old_rec record with the
141 --   current row from the database for the specified primary key
142 --   provided that the primary key exists and is valid and does not
143 --   already match the current g_old_rec. The function will always return
144 --   a TRUE value if the g_old_rec is populated with the current row.
145 --   A FALSE value will be returned if all of the primary key arguments
146 --   are null.
147 --
148 -- Prerequisites:
149 --   None.
150 --
151 -- In Parameters:
152 --
153 -- Post Success:
154 --   A value of TRUE will be returned indiciating that the g_old_rec
155 --   is current.
156 --   A value of FALSE will be returned if all of the primary key arguments
157 --   have a null value (this indicates that the row has not be inserted into
158 --   the Schema), and therefore could never have a corresponding row.
159 --
160 -- Post Failure:
161 --   A failure can only occur under two circumstances:
162 --   1) The primary key is invalid (i.e. a row does not exist for the
163 --      specified primary key values).
164 --   2) If an object_version_number exists but is NOT the same as the current
165 --      g_old_rec value.
166 --
167 -- Developer Implementation Notes:
168 --   None.
169 --
170 -- Access Status:
171 --   Internal Development Use Only.
172 --
173 -- {End Of Comments}
174 -- ----------------------------------------------------------------------------
175 Function api_updating
176   (
177   p_ext_rslt_id                        in number,
178   p_object_version_number              in number
179   )      Return Boolean;
180 --
181 -- ----------------------------------------------------------------------------
182 -- |---------------------------------< lck >----------------------------------|
183 -- ----------------------------------------------------------------------------
184 -- {Start Of Comments}
185 --
186 -- Description:
187 --   The Lck process has two main functions to perform. Firstly, the row to be
188 --   updated or deleted must be locked. The locking of the row will only be
189 --   successful if the row is not currently locked by another user.
190 --   Secondly, during the locking of the row, the row is selected into
191 --   the g_old_rec data structure which enables the current row values from the
192 --   server to be available to the api.
193 --
194 -- Prerequisites:
195 --   When attempting to call the lock the object version number (if defined)
196 --   is mandatory.
197 --
198 -- In Parameters:
199 --   The arguments to the Lck process are the primary key(s) which uniquely
200 --   identify the row and the object version number of row.
201 --
202 -- Post Success:
203 --   On successful completion of the Lck process the row to be updated or
204 --   deleted will be locked and selected into the global data structure
205 --   g_old_rec.
206 --
207 -- Post Failure:
208 --   The Lck process can fail for three reasons:
209 --   1) When attempting to lock the row the row could already be locked by
210 --      another user. This will raise the HR_Api.Object_Locked exception.
211 --   2) The row which is required to be locked doesn't exist in the HR Schema.
212 --      This error is trapped and reported using the message name
213 --      'HR_7220_INVALID_PRIMARY_KEY'.
214 --   3) The row although existing in the HR Schema has a different object
215 --      version number than the object version number specified.
216 --      This error is trapped and reported using the message name
217 --      'HR_7155_OBJECT_INVALID'.
218 --
219 -- Developer Implementation Notes:
220 --   For each primary key and the object version number arguments add a
221 --   call to hr_api.mandatory_arg_error procedure to ensure that these
222 --   argument values are not null.
223 --
224 -- Access Status:
225 --   Internal Development Use Only.
226 --
227 -- {End Of Comments}
228 -- ----------------------------------------------------------------------------
229 Procedure lck
230   (
231   p_ext_rslt_id                        in number,
232   p_object_version_number              in number
233   );
234 --
235 -- ----------------------------------------------------------------------------
236 -- |-----------------------------< convert_args >-----------------------------|
237 -- ----------------------------------------------------------------------------
238 -- {Start Of Comments}
239 --
240 -- Description:
241 --   This function is used to turn attribute parameters into the record
242 --   structure parameter g_rec_type.
243 --
244 -- Prerequisites:
245 --   This is a private function and can only be called from the ins or upd
246 --   attribute processes.
247 --
248 -- In Parameters:
249 --
250 -- Post Success:
251 --   A returning record structure will be returned.
252 --
253 -- Post Failure:
254 --   No direct error handling is required within this function. Any possible
255 --   errors within this function will be a PL/SQL value error due to conversion
256 --   of datatypes or data lengths.
257 --
258 -- Developer Implementation Notes:
259 --   None.
260 --
261 -- Access Status:
262 --   Internal Row Handler Use Only.
263 --
264 -- {End Of Comments}
265 -- ----------------------------------------------------------------------------
266 Function convert_args
267 	(
268 	p_ext_rslt_id                   in number,
269 	p_run_strt_dt                   in date,
270 	p_run_end_dt                    in date,
271 	p_ext_stat_cd                   in varchar2,
272 	p_tot_rec_num                   in number,
273 	p_tot_per_num                   in number,
274 	p_tot_err_num                   in number,
275 	p_eff_dt                        in date,
276 	p_ext_strt_dt                   in date,
277 	p_ext_end_dt                    in date,
278 	p_output_name                   in varchar2,
279 	p_drctry_name                   in varchar2,
280 	p_ext_dfn_id                    in number,
281 	p_business_group_id             in number,
282 	p_program_application_id        in number,
283 	p_program_id                    in number,
284 	p_program_update_date           in date,
285 	p_request_id                    in number,
286         p_output_type                   in varchar2,
287         p_xdo_template_id               in number,
288         p_object_version_number         in number
289         ) return g_rec_type ;
290 
291 
292 
293 --
294 end ben_xrs_shd;