DBA Data[Home] [Help]

PACKAGE: APPS.BEN_DPNT_EGD_SHD

Source


1 Package ben_dpnt_egd_shd AUTHID CURRENT_USER as
2 /* $Header: beecdrhi.pkh 120.1 2010/05/17 12:10:58 sgnanama noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10     eligy_criteria_dpnt_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     allow_range_validation_flg      varchar2(10),
32     user_defined_flag               varchar2(30),
33     business_group_id 	    	    number(15),
34     egd_attribute_category          varchar2(30),
35     egd_attribute1                  varchar2(150),
36     egd_attribute2                  varchar2(150),
37     egd_attribute3                  varchar2(150),
38     egd_attribute4                  varchar2(150),
39     egd_attribute5                  varchar2(150),
40     egd_attribute6                  varchar2(150),
41     egd_attribute7                  varchar2(150),
42     egd_attribute8                  varchar2(150),
43     egd_attribute9                  varchar2(150),
44     egd_attribute10                 varchar2(150),
45     egd_attribute11                 varchar2(150),
46     egd_attribute12                 varchar2(150),
47     egd_attribute13                 varchar2(150),
48     egd_attribute14                 varchar2(150),
49     egd_attribute15                 varchar2(150),
50     egd_attribute16                 varchar2(150),
51     egd_attribute17                 varchar2(150),
52     egd_attribute18                 varchar2(150),
53     egd_attribute19                 varchar2(150),
54     egd_attribute20                 varchar2(150),
55     egd_attribute21                 varchar2(150),
56     egd_attribute22                 varchar2(150),
57     egd_attribute23                 varchar2(150),
58     egd_attribute24                 varchar2(150),
59     egd_attribute25                 varchar2(150),
60     egd_attribute26                 varchar2(150),
61     egd_attribute27                 varchar2(150),
62     egd_attribute28                 varchar2(150),
63     egd_attribute29                 varchar2(150),
64     egd_attribute30                 varchar2(150),
65     object_version_number           number(9)   ,
66     Allow_range_validation_flag2    Varchar2(30),
67     Time_access_calc_rule1          Number(15),
68     Time_access_calc_rule2          Number(15)
69   );
70 --
71 -- ----------------------------------------------------------------------------
72 -- |           Global Definitions - Internal Development Use Only             |
73 -- ----------------------------------------------------------------------------
74 --
75 g_old_rec  g_rec_type;                            -- Global record definition
76 g_api_dml  boolean;                               -- Global api dml status
77 --
78 -- ----------------------------------------------------------------------------
79 -- |------------------------< return_api_dml_status >-------------------------|
80 -- ----------------------------------------------------------------------------
81 -- {Start Of Comments}
82 --
83 -- Description:
84 --   This function will return the current g_api_dml private global
85 --   boolean status.
86 --   The g_api_dml status determines if at the time of the function
87 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
88 --   is being issued from within an api.
89 --   If the status is TRUE then a dml statement is being issued from
90 --   within this entity api.
91 --   This function is primarily to support database triggers which
92 --   need to maintain the object_version_number for non-supported
93 --   dml statements (i.e. dml statement issued outside of the api layer).
94 --
95 -- Prerequisites:
96 --   None.
97 --
98 -- In Parameters:
99 --   None.
100 --
101 -- Post Success:
102 --   Processing continues.
103 --   If the function returns a TRUE value then, dml is being executed from
104 --   within this api.
105 --
106 -- Post Failure:
107 --   None.
108 --
109 -- Access Status:
110 --   Internal Row Handler Use Only.
111 --
112 -- {End Of Comments}
113 -- ----------------------------------------------------------------------------
114 Function return_api_dml_status Return Boolean;
115 --
116 -- ----------------------------------------------------------------------------
117 -- |---------------------------< constraint_error >---------------------------|
118 -- ----------------------------------------------------------------------------
119 -- {Start Of Comments}
120 --
121 -- Description:
122 --   This procedure is called when a constraint has been violated (i.e.
123 --   The exception hr_api.check_integrity_violated,
124 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
125 --   hr_api.unique_integrity_violated has been raised).
126 --   The exceptions can only be raised as follows:
127 --   1) A check constraint can only be violated during an INSERT or UPDATE
128 --      dml operation.
129 --   2) A parent integrity constraint can only be violated during an
130 --      INSERT or UPDATE dml operation.
131 --   3) A child integrity constraint can only be violated during an
132 --      DELETE dml operation.
133 --   4) A unique integrity constraint can only be violated during INSERT or
134 --      UPDATE dml operation.
135 --
136 -- Prerequisites:
137 --   1) Either hr_api.check_integrity_violated,
138 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
139 --      hr_api.unique_integrity_violated has been raised with the subsequent
140 --      stripping of the constraint name from the generated error message
141 --      text.
142 --   2) Standalone validation test which corresponds with a constraint error.
143 --
144 -- In Parameter:
145 --   p_constraint_name is in upper format and is just the constraint name
146 --   (e.g. not prefixed by brackets, schema owner etc).
147 --
148 -- Post Success:
149 --   Development dependant.
150 --
151 -- Post Failure:
152 --   Developement dependant.
153 --
154 -- Developer Implementation Notes:
155 --   For each constraint being checked the hr system package failure message
156 --   has been generated as a template only. These system error messages should
157 --   be modified as required (i.e. change the system failure message to a user
158 --   friendly defined error message).
159 --
160 -- Access Status:
161 --   Internal Development Use Only.
162 --
163 -- {End Of Comments}
164 -- ----------------------------------------------------------------------------
165 Procedure constraint_error
166             (p_constraint_name in all_constraints.constraint_name%TYPE);
167 --
168 -- ----------------------------------------------------------------------------
169 -- |-----------------------------< api_updating >-----------------------------|
170 -- ----------------------------------------------------------------------------
171 -- {Start Of Comments}
172 --
173 -- Description:
174 --   This function is used to populate the g_old_rec record with the
175 --   current row from the database for the specified primary key
176 --   provided that the primary key exists and is valid and does not
177 --   already match the current g_old_rec. The function will always return
178 --   a TRUE value if the g_old_rec is populated with the current row.
179 --   A FALSE value will be returned if all of the primary key arguments
180 --   are null.
181 --
182 -- Prerequisites:
183 --   None.
184 --
185 -- In Parameters:
186 --
187 -- Post Success:
188 --   A value of TRUE will be returned indiciating that the g_old_rec
189 --   is current.
190 --   A value of FALSE will be returned if all of the primary key arguments
191 --   have a null value (this indicates that the row has not be inserted into
192 --   the Schema), and therefore could never have a corresponding row.
193 --
194 -- Post Failure:
195 --   A failure can only occur under two circumstances:
196 --   1) The primary key is invalid (i.e. a row does not exist for the
197 --      specified primary key values).
198 --   2) If an object_version_number exists but is NOT the same as the current
199 --      g_old_rec value.
200 --
201 -- Developer Implementation Notes:
202 --   None.
203 --
204 -- Access Status:
205 --   Internal Development Use Only.
206 --
207 -- {End Of Comments}
208 -- ----------------------------------------------------------------------------
209 Function api_updating
210   (
211   p_eligy_criteria_dpnt_id                      in number,
212   p_object_version_number                  in number
213   )      Return Boolean;
214 --
215 -- ----------------------------------------------------------------------------
216 -- |---------------------------------< lck >----------------------------------|
217 -- ----------------------------------------------------------------------------
218 -- {Start Of Comments}
219 --
220 -- Description:
221 --   The Lck process has two main functions to perform. Firstly, the row to be
222 --   updated or deleted must be locked. The locking of the row will only be
223 --   successful if the row is not currently locked by another user.
224 --   Secondly, during the locking of the row, the row is selected into
225 --   the g_old_rec data structure which enables the current row values from the
226 --   server to be available to the api.
227 --
228 -- Prerequisites:
229 --   When attempting to call the lock the object version number (if defined)
230 --   is mandatory.
231 --
232 -- In Parameters:
233 --   The arguments to the Lck process are the primary key(s) which uniquely
234 --   identify the row and the object version number of row.
235 --
236 -- Post Success:
237 --   On successful completion of the Lck process the row to be updated or
238 --   deleted will be locked and selected into the global data structure
239 --   g_old_rec.
240 --
241 -- Post Failure:
242 --   The Lck process can fail for three reasons:
243 --   1) When attempting to lock the row the row could already be locked by
244 --      another user. This will raise the HR_Api.Object_Locked exception.
245 --   2) The row which is required to be locked doesn't exist in the HR Schema.
246 --      This error is trapped and reported using the message name
247 --      'HR_7220_INVALID_PRIMARY_KEY'.
248 --   3) The row although existing in the HR Schema has a different object
249 --      version number than the object version number specified.
250 --      This error is trapped and reported using the message name
251 --      'HR_7155_OBJECT_INVALID'.
252 --
253 -- Developer Implementation Notes:
254 --   For each primary key and the object version number arguments add a
255 --   call to hr_api.mandatory_arg_error procedure to ensure that these
256 --   argument values are not null.
257 --
258 -- Access Status:
259 --   Internal Development Use Only.
260 --
261 -- {End Of Comments}
262 -- ----------------------------------------------------------------------------
263 Procedure lck
264   (
265   p_eligy_criteria_dpnt_id                      in number,
266   p_object_version_number                  in number
267   );
268 --
269 -- ----------------------------------------------------------------------------
270 -- |-----------------------------< convert_args >-----------------------------|
271 -- ----------------------------------------------------------------------------
272 -- {Start Of Comments}
273 --
274 -- Description:
275 --   This function is used to turn attribute parameters into the record
276 --   structure parameter g_rec_type.
277 --
278 -- Prerequisites:
279 --   This is a private function and can only be called from the ins or upd
280 --   attribute processes.
281 --
282 -- In Parameters:
283 --
284 -- Post Success:
285 --   A returning record structure will be returned.
286 --
287 -- Post Failure:
288 --   No direct error handling is required within this function. Any possible
289 --   errors within this function will be a PL/SQL value error due to conversion
290 --   of datatypes or data lengths.
291 --
292 -- Developer Implementation Notes:
293 --   None.
294 --
295 -- Access Status:
296 --   Internal Row Handler Use Only.
297 --
298 -- {End Of Comments}
299 -- ----------------------------------------------------------------------------
300 Function convert_args
301 	(
302 	  p_eligy_criteria_dpnt_id              in  number,
303 	  p_name                           in  varchar2,
304 	  p_short_code                     in  varchar2,
305 	  p_description                    in  varchar2,
306 	  p_criteria_type		   in  varchar2,
307 	  p_crit_col1_val_type_cd	   in  varchar2,
308 	  p_crit_col1_datatype	    	   in  varchar2,
309 	  p_col1_lookup_type		   in  varchar2,
310 	  p_col1_value_set_id              in  number,
311 	  p_access_table_name1             in  varchar2,
312 	  p_access_column_name1	           in  varchar2,
313 	  p_time_entry_access_tab_nam1     in  varchar2,
314 	  p_time_entry_access_col_nam1     in  varchar2,
315 	  p_crit_col2_val_type_cd	   in  varchar2,
316 	  p_crit_col2_datatype		   in  varchar2,
317 	  p_col2_lookup_type		   in  varchar2,
318 	  p_col2_value_set_id              in  number,
319 	  p_access_table_name2		   in  varchar2,
320 	  p_access_column_name2	           in  varchar2,
321 	  p_time_entry_access_tab_nam2     in  varchar2,
322 	  p_time_entry_access_col_nam2     in  varchar2,
323 	  p_allow_range_validation_flg     in  varchar2,
324 	  p_user_defined_flag              in  varchar2,
325 	  p_business_group_id 	    	   in  number,
326 	  p_egd_attribute_category         in  varchar2,
327 	  p_egd_attribute1                 in  varchar2,
328 	  p_egd_attribute2                 in  varchar2,
329 	  p_egd_attribute3                 in  varchar2,
330 	  p_egd_attribute4                 in  varchar2,
331 	  p_egd_attribute5                 in  varchar2,
332 	  p_egd_attribute6                 in  varchar2,
333 	  p_egd_attribute7                 in  varchar2,
334 	  p_egd_attribute8                 in  varchar2,
335 	  p_egd_attribute9                 in  varchar2,
336 	  p_egd_attribute10                in  varchar2,
337 	  p_egd_attribute11                in  varchar2,
338 	  p_egd_attribute12                in  varchar2,
339 	  p_egd_attribute13                in  varchar2,
340 	  p_egd_attribute14                in  varchar2,
341 	  p_egd_attribute15                in  varchar2,
342 	  p_egd_attribute16                in  varchar2,
343 	  p_egd_attribute17                in  varchar2,
344 	  p_egd_attribute18                in  varchar2,
345 	  p_egd_attribute19                in  varchar2,
346 	  p_egd_attribute20                in  varchar2,
347 	  p_egd_attribute21                in  varchar2,
348 	  p_egd_attribute22                in  varchar2,
349 	  p_egd_attribute23                in  varchar2,
350 	  p_egd_attribute24                in  varchar2,
351 	  p_egd_attribute25                in  varchar2,
352 	  p_egd_attribute26                in  varchar2,
353 	  p_egd_attribute27                in  varchar2,
354 	  p_egd_attribute28                in  varchar2,
355 	  p_egd_attribute29                in  varchar2,
356 	  p_egd_attribute30                in  varchar2,
357           p_object_version_number          in  number  ,
358           p_Allow_range_validation_flag2   in  Varchar2,
359           p_Time_access_calc_rule1         in  Number,
360           p_Time_access_calc_rule2         in  Number
361 	)
362 	Return g_rec_type;
363 --
364 end ben_dpnt_egd_shd;