1 Package per_ssl_shd as
2 /* $Header: pesslrhi.pkh 120.0.12010000.1 2008/07/28 06:01:26 appldev ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 salary_survey_line_id number(15),
11 object_version_number number(9),
12 salary_survey_id number(15),
13 survey_job_name_code varchar2(30),
14 survey_region_code varchar2(30),
15 survey_seniority_code varchar2(30),
16 company_size_code varchar2(30),
17 industry_code varchar2(30),
18 survey_age_code varchar2(30),
19 start_date date,
20 end_date date,
21 currency_code varchar2(15),
22 differential number,
23 minimum_pay number,
24 mean_pay number,
25 maximum_pay number,
26 graduate_pay number,
27 starting_pay number,
28 percentage_change number,
29 job_first_quartile number,
30 job_median_quartile number,
31 job_third_quartile number,
32 job_fourth_quartile number,
33 minimum_total_compensation number,
34 mean_total_compensation number,
35 maximum_total_compensation number,
36 compnstn_first_quartile number,
37 compnstn_median_quartile number,
38 compnstn_third_quartile number,
39 compnstn_fourth_quartile number,
40 /*Added for Enhancement 4021737 */
41 tenth_percentile number,
42 twenty_fifth_percentile number,
43 fiftieth_percentile number,
44 seventy_fifth_percentile number,
45 ninetieth_percentile number,
46 minimum_bonus number,
47 mean_bonus number,
48 maximum_bonus number,
49 minimum_salary_increase number,
50 mean_salary_increase number,
51 maximum_salary_increase number,
52 min_variable_compensation number,
53 mean_variable_compensation number,
54 max_variable_compensation number,
55 minimum_stock number,
56 mean_stock number,
57 maximum_stock number,
58 stock_display_type varchar2(30),
59 /*End Enhancement 4021737 */
60 attribute_category varchar2(30),
61 attribute1 varchar2(150),
62 attribute2 varchar2(150),
63 attribute3 varchar2(150),
64 attribute4 varchar2(150),
65 attribute5 varchar2(150),
66 attribute6 varchar2(150),
67 attribute7 varchar2(150),
68 attribute8 varchar2(150),
69 attribute9 varchar2(150),
70 attribute10 varchar2(150),
71 attribute11 varchar2(150),
72 attribute12 varchar2(150),
73 attribute13 varchar2(150),
74 attribute14 varchar2(150),
75 attribute15 varchar2(150),
76 attribute16 varchar2(150),
77 attribute17 varchar2(150),
78 attribute18 varchar2(150),
79 attribute19 varchar2(150),
80 attribute20 varchar2(150),
81 /*Added for Enhancement 4021737 */
82 attribute21 varchar2(150),
83 attribute22 varchar2(150),
84 attribute23 varchar2(150),
85 attribute24 varchar2(150),
86 attribute25 varchar2(150),
87 attribute26 varchar2(150),
88 attribute27 varchar2(150),
89 attribute28 varchar2(150),
90 attribute29 varchar2(150),
91 attribute30 varchar2(150)
92 /*End Enhancement 4021737 */
93 );
94 --
95 -- ----------------------------------------------------------------------------
96 -- | Global Definitions - Internal Development Use Only |
97 -- ----------------------------------------------------------------------------
98 --
99 g_old_rec g_rec_type; -- Global record definition
100 --
101 -- ----------------------------------------------------------------------------
102 -- |---------------------------< constraint_error >---------------------------|
103 -- ----------------------------------------------------------------------------
104 -- {Start Of Comments}
105 --
106 -- Description:
107 -- This procedure is called when a constraint has been violated (i.e.
108 -- The exception hr_api.check_integrity_violated,
109 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
110 -- hr_api.unique_integrity_violated has been raised).
111 -- The exceptions can only be raised as follows:
112 -- 1) A check constraint can only be violated during an INSERT or UPDATE
113 -- dml operation.
114 -- 2) A parent integrity constraint can only be violated during an
115 -- INSERT or UPDATE dml operation.
116 -- 3) A child integrity constraint can only be violated during an
117 -- DELETE dml operation.
118 -- 4) A unique integrity constraint can only be violated during INSERT or
119 -- UPDATE dml operation.
120 --
121 -- Prerequisites:
122 -- 1) Either hr_api.check_integrity_violated,
123 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
124 -- hr_api.unique_integrity_violated has been raised with the subsequent
125 -- stripping of the constraint name from the generated error message
126 -- text.
127 -- 2) Standalone validation test which corresponds with a constraint error.
128 --
129 -- In Parameter:
130 -- p_constraint_name is in upper format and is just the constraint name
131 -- (e.g. not prefixed by brackets, schema owner etc).
132 --
133 -- Post Success:
134 -- Development dependant.
135 --
136 -- Post Failure:
137 -- Developement dependant.
138 --
139 -- Developer Implementation Notes:
140 -- For each constraint being checked the hr system package failure message
141 -- has been generated as a template only. These system error messages should
142 -- be modified as required (i.e. change the system failure message to a user
143 -- friendly defined error message).
144 --
145 -- Access Status:
146 -- Internal Development Use Only.
147 --
148 -- {End Of Comments}
149 -- ----------------------------------------------------------------------------
150 Procedure constraint_error
151 (p_constraint_name in all_constraints.constraint_name%TYPE);
152 --
153 -- ----------------------------------------------------------------------------
154 -- |-----------------------------< api_updating >-----------------------------|
155 -- ----------------------------------------------------------------------------
156 -- {Start Of Comments}
157 --
158 -- Description:
159 -- This function is used to populate the g_old_rec record with the
160 -- current row from the database for the specified primary key
161 -- provided that the primary key exists and is valid and does not
162 -- already match the current g_old_rec. The function will always return
163 -- a TRUE value if the g_old_rec is populated with the current row.
164 -- A FALSE value will be returned if all of the primary key arguments
165 -- are null.
166 --
167 -- Prerequisites:
168 -- None.
169 --
170 -- In Parameters:
171 --
172 -- Post Success:
173 -- A value of TRUE will be returned indiciating that the g_old_rec
174 -- is current.
175 -- A value of FALSE will be returned if all of the primary key arguments
176 -- have a null value (this indicates that the row has not be inserted into
177 -- the Schema), and therefore could never have a corresponding row.
178 --
179 -- Post Failure:
180 -- A failure can only occur under two circumstances:
181 -- 1) The primary key is invalid (i.e. a row does not exist for the
182 -- specified primary key values).
183 -- 2) If an object_version_number exists but is NOT the same as the current
184 -- g_old_rec value.
185 --
186 -- Developer Implementation Notes:
187 -- None.
188 --
189 -- Access Status:
190 -- Internal Development Use Only.
191 --
192 -- {End Of Comments}
193 -- ----------------------------------------------------------------------------
194 Function api_updating
195 (
196 p_salary_survey_line_id in number,
197 p_object_version_number in number
198 ) Return Boolean;
199 --
200 -- ----------------------------------------------------------------------------
201 -- |---------------------------------< lck >----------------------------------|
202 -- ----------------------------------------------------------------------------
203 -- {Start Of Comments}
204 --
205 -- Description:
206 -- The Lck process has two main functions to perform. Firstly, the row to be
207 -- updated or deleted must be locked. The locking of the row will only be
208 -- successful if the row is not currently locked by another user.
209 -- Secondly, during the locking of the row, the row is selected into
210 -- the g_old_rec data structure which enables the current row values from the
211 -- server to be available to the api.
212 --
213 -- Prerequisites:
214 -- When attempting to call the lock the object version number (if defined)
215 -- is mandatory.
216 --
217 -- In Parameters:
218 -- The arguments to the Lck process are the primary key(s) which uniquely
219 -- identify the row and the object version number of row.
220 --
221 -- Post Success:
222 -- On successful completion of the Lck process the row to be updated or
223 -- deleted will be locked and selected into the global data structure
224 -- g_old_rec.
225 --
226 -- Post Failure:
227 -- The Lck process can fail for three reasons:
228 -- 1) When attempting to lock the row the row could already be locked by
229 -- another user. This will raise the HR_Api.Object_Locked exception.
230 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
231 -- This error is trapped and reported using the message name
232 -- 'HR_7220_INVALID_PRIMARY_KEY'.
233 -- 3) The row although existing in the HR Schema has a different object
234 -- version number than the object version number specified.
235 -- This error is trapped and reported using the message name
236 -- 'HR_7155_OBJECT_INVALID'.
237 --
238 -- Developer Implementation Notes:
239 -- For each primary key and the object version number arguments add a
240 -- call to hr_api.mandatory_arg_error procedure to ensure that these
241 -- argument values are not null.
242 --
243 -- Access Status:
244 -- Internal Development Use Only.
245 --
246 -- {End Of Comments}
247 -- ----------------------------------------------------------------------------
248 Procedure lck
249 (
250 p_salary_survey_line_id in number,
251 p_object_version_number in number
252 );
253 --
254 -- ----------------------------------------------------------------------------
255 -- |-----------------------------< convert_args >-----------------------------|
256 -- ----------------------------------------------------------------------------
257 -- {Start Of Comments}
258 --
259 -- Description:
260 -- This function is used to turn attribute parameters into the record
261 -- structure parameter g_rec_type.
262 --
263 -- Prerequisites:
264 -- This is a private function and can only be called from the ins or upd
265 -- attribute processes.
266 --
267 -- In Parameters:
268 --
269 -- Post Success:
270 -- A returning record structure will be returned.
271 --
272 -- Post Failure:
273 -- No direct error handling is required within this function. Any possible
274 -- errors within this function will be a PL/SQL value error due to conversion
275 -- of datatypes or data lengths.
276 --
277 -- Developer Implementation Notes:
278 -- None.
279 --
280 -- Access Status:
281 -- Internal Row Handler Use Only.
282 --
283 -- {End Of Comments}
284 -- ----------------------------------------------------------------------------
285 Function convert_args
286 (
287 p_salary_survey_line_id in number,
288 p_object_version_number in number,
289 p_salary_survey_id in number,
290 p_survey_job_name_code in varchar2,
291 p_survey_region_code in varchar2,
292 p_survey_seniority_code in varchar2,
293 p_company_size_code in varchar2,
294 p_industry_code in varchar2,
295 p_survey_age_code in varchar2,
296 p_start_date in date,
297 p_end_date in date,
298 p_currency_code in varchar2,
299 p_differential in number,
300 p_minimum_pay in number,
301 p_mean_pay in number,
302 p_maximum_pay in number,
303 p_graduate_pay in number,
304 p_starting_pay in number,
305 p_percentage_change in number,
306 p_job_first_quartile in number,
307 p_job_median_quartile in number,
308 p_job_third_quartile in number,
309 p_job_fourth_quartile in number,
310 p_minimum_total_compensation in number,
311 p_mean_total_compensation in number,
312 p_maximum_total_compensation in number,
313 p_compnstn_first_quartile in number,
314 p_compnstn_median_quartile in number,
315 p_compnstn_third_quartile in number,
316 p_compnstn_fourth_quartile in number,
317 /*Added for Enhancement 4021737*/
318 p_tenth_percentile in number,
319 p_twenty_fifth_percentile in number,
320 p_fiftieth_percentile in number,
321 p_seventy_fifth_percentile in number,
322 p_ninetieth_percentile in number,
323 p_minimum_bonus in number,
324 p_mean_bonus in number,
325 p_maximum_bonus in number,
326 p_minimum_salary_increase in number,
327 p_mean_salary_increase in number,
328 p_maximum_salary_increase in number,
329 p_min_variable_compensation in number,
330 p_mean_variable_compensation in number,
331 p_max_variable_compensation in number,
332 p_minimum_stock in number,
333 p_mean_stock in number,
334 p_maximum_stock in number,
335 p_stock_display_type in varchar2,
336 /*End Enhancement 4021737 */
337 p_attribute_category in varchar2,
338 p_attribute1 in varchar2,
339 p_attribute2 in varchar2,
340 p_attribute3 in varchar2,
341 p_attribute4 in varchar2,
342 p_attribute5 in varchar2,
343 p_attribute6 in varchar2,
344 p_attribute7 in varchar2,
345 p_attribute8 in varchar2,
346 p_attribute9 in varchar2,
347 p_attribute10 in varchar2,
348 p_attribute11 in varchar2,
349 p_attribute12 in varchar2,
350 p_attribute13 in varchar2,
351 p_attribute14 in varchar2,
352 p_attribute15 in varchar2,
353 p_attribute16 in varchar2,
354 p_attribute17 in varchar2,
355 p_attribute18 in varchar2,
359 p_attribute21 in varchar2,
356 p_attribute19 in varchar2,
357 p_attribute20 in varchar2,
358 /*Added for Enhancement 4021737*/
360 p_attribute22 in varchar2,
361 p_attribute23 in varchar2,
362 p_attribute24 in varchar2,
363 p_attribute25 in varchar2,
364 p_attribute26 in varchar2,
365 p_attribute27 in varchar2,
366 p_attribute28 in varchar2,
367 p_attribute29 in varchar2,
368 p_attribute30 in varchar2
369 /*End Enhancement 4021737 */
370 )
371 Return g_rec_type;
372 --
373 end per_ssl_shd;