DBA Data[Home] [Help]

PACKAGE: APPS.BEN_EGL_SHD

Source


1 Package ben_egl_shd as
2 /* $Header: beeglrhi.pkh 120.2 2005/08/02 04:41 rbingi noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10     eligy_criteria_id               number(15),
11     name                            varchar2(240),
12     short_code                      varchar2(30),
13     description                     varchar2(2000),
14     criteria_type		    varchar2(30),
15     crit_col1_val_type_cd	    varchar2(30),
16     crit_col1_datatype	    	    varchar2(10),
17     col1_lookup_type		    varchar2(30),
18     col1_value_set_id               number(15),
19     access_table_name1              varchar2(30),
20     access_column_name1	            varchar2(30),
21     time_entry_access_tab_nam1      varchar2(30),
22     time_entry_access_col_nam1      varchar2(30),
23     crit_col2_val_type_cd	    varchar2(30),
24     crit_col2_datatype		    varchar2(10),
25     col2_lookup_type		    varchar2(30),
26     col2_value_set_id               number(15),
27     access_table_name2		    varchar2(30),
28     access_column_name2	            varchar2(30),
29     time_entry_access_tab_nam2      varchar2(30),
30     time_entry_access_col_nam2      varchar2(30),
31     access_calc_rule		    number(15),
32     allow_range_validation_flg      varchar2(10),
33     user_defined_flag               varchar2(30),
34     business_group_id 	    	    number(15),
35     legislation_code 	    	    varchar2(30),
36     egl_attribute_category          varchar2(30),
37     egl_attribute1                  varchar2(150),
38     egl_attribute2                  varchar2(150),
39     egl_attribute3                  varchar2(150),
40     egl_attribute4                  varchar2(150),
41     egl_attribute5                  varchar2(150),
42     egl_attribute6                  varchar2(150),
43     egl_attribute7                  varchar2(150),
44     egl_attribute8                  varchar2(150),
45     egl_attribute9                  varchar2(150),
46     egl_attribute10                 varchar2(150),
47     egl_attribute11                 varchar2(150),
48     egl_attribute12                 varchar2(150),
49     egl_attribute13                 varchar2(150),
50     egl_attribute14                 varchar2(150),
51     egl_attribute15                 varchar2(150),
52     egl_attribute16                 varchar2(150),
53     egl_attribute17                 varchar2(150),
54     egl_attribute18                 varchar2(150),
55     egl_attribute19                 varchar2(150),
56     egl_attribute20                 varchar2(150),
57     egl_attribute21                 varchar2(150),
58     egl_attribute22                 varchar2(150),
59     egl_attribute23                 varchar2(150),
60     egl_attribute24                 varchar2(150),
61     egl_attribute25                 varchar2(150),
62     egl_attribute26                 varchar2(150),
63     egl_attribute27                 varchar2(150),
64     egl_attribute28                 varchar2(150),
65     egl_attribute29                 varchar2(150),
66     egl_attribute30                 varchar2(150),
67     object_version_number           number(9)   ,
68     Allow_range_validation_flag2    Varchar2(30),
69     Access_calc_rule2               Number(15),
70     Time_access_calc_rule1          Number(15),
71     Time_access_calc_rule2          Number(15)
72   );
73 --
74 -- ----------------------------------------------------------------------------
75 -- |           Global Definitions - Internal Development Use Only             |
76 -- ----------------------------------------------------------------------------
77 --
78 g_old_rec  g_rec_type;                            -- Global record definition
79 g_api_dml  boolean;                               -- Global api dml status
80 --
81 -- ----------------------------------------------------------------------------
82 -- |------------------------< return_api_dml_status >-------------------------|
83 -- ----------------------------------------------------------------------------
84 -- {Start Of Comments}
85 --
86 -- Description:
87 --   This function will return the current g_api_dml private global
88 --   boolean status.
89 --   The g_api_dml status determines if at the time of the function
90 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
91 --   is being issued from within an api.
92 --   If the status is TRUE then a dml statement is being issued from
93 --   within this entity api.
94 --   This function is primarily to support database triggers which
95 --   need to maintain the object_version_number for non-supported
96 --   dml statements (i.e. dml statement issued outside of the api layer).
97 --
98 -- Prerequisites:
99 --   None.
100 --
101 -- In Parameters:
102 --   None.
103 --
104 -- Post Success:
105 --   Processing continues.
106 --   If the function returns a TRUE value then, dml is being executed from
107 --   within this api.
108 --
109 -- Post Failure:
110 --   None.
111 --
112 -- Access Status:
113 --   Internal Row Handler Use Only.
114 --
115 -- {End Of Comments}
116 -- ----------------------------------------------------------------------------
117 Function return_api_dml_status Return Boolean;
118 --
119 -- ----------------------------------------------------------------------------
120 -- |---------------------------< constraint_error >---------------------------|
121 -- ----------------------------------------------------------------------------
122 -- {Start Of Comments}
123 --
124 -- Description:
125 --   This procedure is called when a constraint has been violated (i.e.
126 --   The exception hr_api.check_integrity_violated,
127 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
128 --   hr_api.unique_integrity_violated has been raised).
129 --   The exceptions can only be raised as follows:
130 --   1) A check constraint can only be violated during an INSERT or UPDATE
131 --      dml operation.
132 --   2) A parent integrity constraint can only be violated during an
133 --      INSERT or UPDATE dml operation.
134 --   3) A child integrity constraint can only be violated during an
135 --      DELETE dml operation.
136 --   4) A unique integrity constraint can only be violated during INSERT or
137 --      UPDATE dml operation.
138 --
139 -- Prerequisites:
140 --   1) Either hr_api.check_integrity_violated,
141 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
142 --      hr_api.unique_integrity_violated has been raised with the subsequent
143 --      stripping of the constraint name from the generated error message
144 --      text.
145 --   2) Standalone validation test which corresponds with a constraint error.
146 --
147 -- In Parameter:
148 --   p_constraint_name is in upper format and is just the constraint name
149 --   (e.g. not prefixed by brackets, schema owner etc).
150 --
151 -- Post Success:
152 --   Development dependant.
153 --
154 -- Post Failure:
155 --   Developement dependant.
156 --
157 -- Developer Implementation Notes:
158 --   For each constraint being checked the hr system package failure message
159 --   has been generated as a template only. These system error messages should
160 --   be modified as required (i.e. change the system failure message to a user
161 --   friendly defined error message).
162 --
163 -- Access Status:
164 --   Internal Development Use Only.
165 --
166 -- {End Of Comments}
167 -- ----------------------------------------------------------------------------
168 Procedure constraint_error
169             (p_constraint_name in all_constraints.constraint_name%TYPE);
170 --
171 -- ----------------------------------------------------------------------------
172 -- |-----------------------------< api_updating >-----------------------------|
173 -- ----------------------------------------------------------------------------
174 -- {Start Of Comments}
175 --
176 -- Description:
177 --   This function is used to populate the g_old_rec record with the
178 --   current row from the database for the specified primary key
179 --   provided that the primary key exists and is valid and does not
180 --   already match the current g_old_rec. The function will always return
181 --   a TRUE value if the g_old_rec is populated with the current row.
182 --   A FALSE value will be returned if all of the primary key arguments
183 --   are null.
184 --
185 -- Prerequisites:
186 --   None.
187 --
188 -- In Parameters:
189 --
190 -- Post Success:
191 --   A value of TRUE will be returned indiciating that the g_old_rec
192 --   is current.
193 --   A value of FALSE will be returned if all of the primary key arguments
194 --   have a null value (this indicates that the row has not be inserted into
195 --   the Schema), and therefore could never have a corresponding row.
196 --
197 -- Post Failure:
198 --   A failure can only occur under two circumstances:
199 --   1) The primary key is invalid (i.e. a row does not exist for the
200 --      specified primary key values).
201 --   2) If an object_version_number exists but is NOT the same as the current
202 --      g_old_rec value.
203 --
204 -- Developer Implementation Notes:
205 --   None.
206 --
207 -- Access Status:
208 --   Internal Development Use Only.
209 --
210 -- {End Of Comments}
211 -- ----------------------------------------------------------------------------
212 Function api_updating
213   (
214   p_eligy_criteria_id                      in number,
215   p_object_version_number                  in number
216   )      Return Boolean;
217 --
218 -- ----------------------------------------------------------------------------
219 -- |---------------------------------< lck >----------------------------------|
220 -- ----------------------------------------------------------------------------
221 -- {Start Of Comments}
222 --
223 -- Description:
224 --   The Lck process has two main functions to perform. Firstly, the row to be
225 --   updated or deleted must be locked. The locking of the row will only be
226 --   successful if the row is not currently locked by another user.
227 --   Secondly, during the locking of the row, the row is selected into
228 --   the g_old_rec data structure which enables the current row values from the
229 --   server to be available to the api.
230 --
231 -- Prerequisites:
232 --   When attempting to call the lock the object version number (if defined)
233 --   is mandatory.
234 --
235 -- In Parameters:
236 --   The arguments to the Lck process are the primary key(s) which uniquely
237 --   identify the row and the object version number of row.
238 --
239 -- Post Success:
240 --   On successful completion of the Lck process the row to be updated or
241 --   deleted will be locked and selected into the global data structure
242 --   g_old_rec.
243 --
244 -- Post Failure:
245 --   The Lck process can fail for three reasons:
246 --   1) When attempting to lock the row the row could already be locked by
247 --      another user. This will raise the HR_Api.Object_Locked exception.
248 --   2) The row which is required to be locked doesn't exist in the HR Schema.
249 --      This error is trapped and reported using the message name
250 --      'HR_7220_INVALID_PRIMARY_KEY'.
251 --   3) The row although existing in the HR Schema has a different object
252 --      version number than the object version number specified.
253 --      This error is trapped and reported using the message name
254 --      'HR_7155_OBJECT_INVALID'.
255 --
256 -- Developer Implementation Notes:
257 --   For each primary key and the object version number arguments add a
258 --   call to hr_api.mandatory_arg_error procedure to ensure that these
259 --   argument values are not null.
260 --
261 -- Access Status:
262 --   Internal Development Use Only.
263 --
264 -- {End Of Comments}
265 -- ----------------------------------------------------------------------------
266 Procedure lck
267   (
268   p_eligy_criteria_id                      in number,
269   p_object_version_number                  in number
270   );
271 --
272 -- ----------------------------------------------------------------------------
273 -- |-----------------------------< convert_args >-----------------------------|
274 -- ----------------------------------------------------------------------------
275 -- {Start Of Comments}
276 --
277 -- Description:
278 --   This function is used to turn attribute parameters into the record
279 --   structure parameter g_rec_type.
280 --
281 -- Prerequisites:
282 --   This is a private function and can only be called from the ins or upd
283 --   attribute processes.
284 --
285 -- In Parameters:
286 --
287 -- Post Success:
288 --   A returning record structure will be returned.
289 --
290 -- Post Failure:
291 --   No direct error handling is required within this function. Any possible
292 --   errors within this function will be a PL/SQL value error due to conversion
293 --   of datatypes or data lengths.
294 --
295 -- Developer Implementation Notes:
296 --   None.
297 --
298 -- Access Status:
299 --   Internal Row Handler Use Only.
300 --
301 -- {End Of Comments}
302 -- ----------------------------------------------------------------------------
303 Function convert_args
304 	(
305 	  p_eligy_criteria_id              in  number,
306 	  p_name                           in  varchar2,
307 	  p_short_code                     in  varchar2,
308 	  p_description                    in  varchar2,
309 	  p_criteria_type		   in  varchar2,
310 	  p_crit_col1_val_type_cd	   in  varchar2,
311 	  p_crit_col1_datatype	    	   in  varchar2,
312 	  p_col1_lookup_type		   in  varchar2,
313 	  p_col1_value_set_id              in  number,
314 	  p_access_table_name1             in  varchar2,
315 	  p_access_column_name1	           in  varchar2,
316 	  p_time_entry_access_tab_nam1     in  varchar2,
317 	  p_time_entry_access_col_nam1     in  varchar2,
318 	  p_crit_col2_val_type_cd	   in  varchar2,
319 	  p_crit_col2_datatype		   in  varchar2,
320 	  p_col2_lookup_type		   in  varchar2,
321 	  p_col2_value_set_id              in  number,
322 	  p_access_table_name2		   in  varchar2,
323 	  p_access_column_name2	           in  varchar2,
324 	  p_time_entry_access_tab_nam2     in  varchar2,
325 	  p_time_entry_access_col_nam2     in  varchar2,
326 	  p_access_calc_rule		   in  number,
327 	  p_allow_range_validation_flg     in  varchar2,
328 	  p_user_defined_flag              in  varchar2,
329 	  p_business_group_id 	    	   in  number,
330 	  p_legislation_code 	    	   in  varchar2,
331 	  p_egl_attribute_category         in  varchar2,
332 	  p_egl_attribute1                 in  varchar2,
333 	  p_egl_attribute2                 in  varchar2,
334 	  p_egl_attribute3                 in  varchar2,
335 	  p_egl_attribute4                 in  varchar2,
336 	  p_egl_attribute5                 in  varchar2,
337 	  p_egl_attribute6                 in  varchar2,
338 	  p_egl_attribute7                 in  varchar2,
339 	  p_egl_attribute8                 in  varchar2,
340 	  p_egl_attribute9                 in  varchar2,
341 	  p_egl_attribute10                in  varchar2,
342 	  p_egl_attribute11                in  varchar2,
343 	  p_egl_attribute12                in  varchar2,
344 	  p_egl_attribute13                in  varchar2,
345 	  p_egl_attribute14                in  varchar2,
346 	  p_egl_attribute15                in  varchar2,
347 	  p_egl_attribute16                in  varchar2,
348 	  p_egl_attribute17                in  varchar2,
349 	  p_egl_attribute18                in  varchar2,
350 	  p_egl_attribute19                in  varchar2,
351 	  p_egl_attribute20                in  varchar2,
352 	  p_egl_attribute21                in  varchar2,
353 	  p_egl_attribute22                in  varchar2,
354 	  p_egl_attribute23                in  varchar2,
355 	  p_egl_attribute24                in  varchar2,
356 	  p_egl_attribute25                in  varchar2,
357 	  p_egl_attribute26                in  varchar2,
358 	  p_egl_attribute27                in  varchar2,
359 	  p_egl_attribute28                in  varchar2,
360 	  p_egl_attribute29                in  varchar2,
361 	  p_egl_attribute30                in  varchar2,
362           p_object_version_number          in  number  ,
363           p_Allow_range_validation_flag2   in  Varchar2,
364           p_Access_calc_rule2              in  Number,
365           p_Time_access_calc_rule1         in  Number,
366           p_Time_access_calc_rule2         in  Number
367 	)
368 	Return g_rec_type;
369 --
370 end ben_egl_shd;