DBA Data[Home] [Help]

PACKAGE: APPS.BEN_XER_SHD

Source


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