1 Package per_ssl_bus AUTHID CURRENT_USER as
2 /* $Header: pesslrhi.pkh 120.0.12010000.1 2008/07/28 06:01:26 appldev ship $ */
3
4 --
5 --
6 -- ----------------------------------------------------------------------------
7 -- |---------------------------< chk_unique_key >-----------------------------|
8 -- ----------------------------------------------------------------------------
9 --
10 -- Description
11 -- This Procedure is used to check that survey_job_name_code,
12 -- survey_region_code, survey_seniority_code, company_size_code,
13 -- industry_code, survey_age_code form a unique combination with
14 -- the start_date for this row, between the start_date and
15 -- end_date of any other row.
16 --
17 -- Pre Requisites
18 -- None.
19 --
20 -- In Parameters
21 -- salary_survey_line_id
22 -- object_version_number
23 -- survey_job_name_code
24 -- survey_region_code
25 -- survey_seniority_code
26 -- company_size_code
27 -- industry_code
28 -- survey_age_code
29 -- start_date.
30 --
31 -- Post Success
32 -- Processing continues If the survey_job_name_code, survey_region_code,
33 -- survey_seniority_code, company_size_code, industry_code survey_age_code
34 -- form a unique combination with start_date for this row between the
35 -- start_date and end_date of any other row.
36 --
37 -- Post Failure
38 -- An application error is raised If the survey_job_name_code,
39 -- survey_region_code, survey_seniority, company_size, industry_code
40 -- survey_age_code combined with start_date for this row are not unique
41 -- between start_date and end_date of any other row..
42 --
43 -- Developer/Implementation Notes
44 -- None.
45 --
46 -- Access Status
47 -- Internal row handler use only.
48 --
49 Procedure chk_unique_key
50 (p_salary_survey_line_id in number,
51 p_object_version_number in number,
52 p_salary_survey_id in number,
53 p_survey_job_name_code in per_salary_survey_lines.survey_job_name_code%TYPE,
54 p_survey_region_code in per_salary_survey_lines.survey_region_code%TYPE,
55 p_survey_seniority_code in per_salary_survey_lines.survey_seniority_code%TYPE,
56 p_company_size_code in per_salary_survey_lines.company_size_code%TYPE,
57 p_industry_code in per_salary_survey_lines.industry_code%TYPE,
58 p_survey_age_code in per_salary_survey_lines.survey_age_code%TYPE,
59 p_start_date in per_salary_survey_lines.start_date%TYPE,
60 p_end_date in per_salary_survey_lines.end_date%TYPE);
61
62
63 --
64 -- ---------------------------------------------------------------
65 -- |------------------< chk_salary_figures >---------------------|
66 -- ---------------------------------------------------------------
67 --
68 -- Description
69 -- This Procedure is used to check that
70 -- a) At least one of the following parameters is not null.
71 --
72 -- Pre Requisites
73 -- None.
74 --
75 -- In Parameters
76 -- SALARY_SURVEY_LINE_ID
77 -- OBJECT_VERSI0N_NUMBER
78 -- CURRENCY_CODE
79 -- MINIMUM_PAY
80 -- MEAN_PAY
81 -- MAXIMUM_PAY
82 -- GRADUATE_PAY
83 -- STARTING_PAY
84 -- PERCENTAGE_CHANGE
85 -- JOB_FIRST_QUARTILE
86 -- JOB_MEDIAN_QUARTILE
87 -- JOB_THIRD_QUARTILE
88 -- JOB_FOURTH_QUARTILE
89 -- MINIMUM_TOTAL_COMPENSATION
90 -- MEAN_TOTAL_COMPENSATION
91 -- MAXIMUM_TOTAL_COMPENSATION
92 -- COMPNSTN_FIRST_QUARTILE
93 -- COMPNSTN_MEDIAN_QUARTILE
94 -- COMPNSTN_THIRD_QUARTILE
95 -- COMPNSTN_FOURTH_QUARTILE
96 --
97 -- Post Success
98 -- Processing continues
99 -- If at least one of the salary figures is not null.
100 -- ras If all the salary figures are numbers.
101 --
102 -- Post Failure
103 -- An application error is raised and processing is terminated:
104 -- If any of the salary figures is null.
105 -- ras If any of the salary figures are not numbers.
106 --
107 -- Developer/Implementation Notes
108 -- None.
109 --
110 -- Access Status
111 -- Internal row handler use only.
112 --
113 Procedure chk_salary_figures
114 (p_salary_survey_line_id
115 in number,
116 p_object_version_number
117 in number,
118 p_currency_code
119 in per_salary_survey_lines.currency_code%TYPE,
120 p_minimum_pay
121 in per_salary_survey_lines.minimum_pay%TYPE,
122 p_mean_pay
123 in per_salary_survey_lines.mean_pay%TYPE,
124 p_maximum_pay
125 in per_salary_survey_lines.maximum_pay%TYPE,
126 p_graduate_pay
127 in per_salary_survey_lines.graduate_pay%TYPE,
128 p_starting_pay
129 in per_salary_survey_lines.starting_pay%TYPE,
130 p_percentage_change
131 in per_salary_survey_lines.percentage_change%TYPE,
132 p_job_first_quartile
133 in per_salary_survey_lines.job_first_quartile%TYPE,
134 p_job_median_quartile
135 in per_salary_survey_lines.job_median_quartile%TYPE,
136 p_job_third_quartile
137 in per_salary_survey_lines.job_third_quartile%TYPE,
138 p_job_fourth_quartile
139 in per_salary_survey_lines.job_fourth_quartile%TYPE,
140 p_minimum_total_compensation
141 in per_salary_survey_lines.minimum_total_compensation%TYPE,
142 p_mean_total_compensation
143 in per_salary_survey_lines.mean_total_compensation%TYPE,
144 p_maximum_total_compensation
145 in per_salary_survey_lines.maximum_total_compensation%TYPE,
146 p_compnstn_first_quartile
147 in per_salary_survey_lines.compnstn_first_quartile%TYPE,
148 p_compnstn_median_quartile
149 in per_salary_survey_lines.compnstn_median_quartile%TYPE,
150 p_compnstn_third_quartile
151 in per_salary_survey_lines.compnstn_third_quartile%TYPE,
152 p_compnstn_fourth_quartile
153 in per_salary_survey_lines.compnstn_fourth_quartile%TYPE
154 );
155
156
157 --
158 -- ----------------------------------------------------------------------------
159 -- |---------------------------< insert_validate >----------------------------|
160 -- ----------------------------------------------------------------------------
161 -- {Start Of Comments}
162 --
163 -- Description:
164 -- This procedure controls the execution of all insert business rules
165 -- validation.
166 --
167 -- Prerequisites:
168 -- This private procedure is called from ins procedure.
169 --
170 -- In Parameters:
171 -- A Pl/Sql record structre.
172 --
173 -- Post Success:
174 -- Processing continues.
175 --
176 -- Post Failure:
177 -- If a business rules fails the error will not be handled by this procedure
178 -- unless explicity coded.
179 --
180 -- Developer Implementation Notes:
181 -- For insert, your business rules should be executed from this procedure and
182 -- should ideally (unless really necessary) just be straight procedure or
183 -- function calls. Try and avoid using conditional branching logic.
184 --
185 -- Access Status:
186 -- Internal Row Handler Use Only.
187 --
188 -- {End Of Comments}
189 -- ----------------------------------------------------------------------------
190 Procedure insert_validate(p_rec in per_ssl_shd.g_rec_type,
191 p_effective_date in date);
192 --
193 -- ----------------------------------------------------------------------------
194 -- |---------------------------< update_validate >----------------------------|
195 -- ----------------------------------------------------------------------------
196 -- {Start Of Comments}
197 --
198 -- Description:
199 -- This procedure controls the execution of all update business rules
200 -- validation.
201 --
202 -- Prerequisites:
203 -- This private procedure is called from upd procedure.
204 --
205 -- In Parameters:
206 -- A Pl/Sql record structre.
207 --
208 -- Post Success:
209 -- Processing continues.
210 --
211 -- Post Failure:
212 -- If a business rules fails the error will not be handled by this procedure
213 -- unless explicity coded.
214 --
215 -- Developer Implementation Notes:
216 -- For update, your business rules should be executed from this procedure and
217 -- should ideally (unless really necessary) just be straight procedure or
218 -- function calls. Try and avoid using conditional branching logic.
219 --
220 -- Access Status:
221 -- Internal Row Handler Use Only.
222 --
223 -- {End Of Comments}
224 -- ----------------------------------------------------------------------------
225 Procedure update_validate(p_rec in per_ssl_shd.g_rec_type,
226 p_effective_date in date);
227 --
228 -- ----------------------------------------------------------------------------
229 -- |---------------------------< delete_validate >----------------------------|
230 -- ----------------------------------------------------------------------------
231 -- {Start Of Comments}
232 --
233 -- Description:
234 -- This procedure controls the execution of all delete business rules
235 -- validation.
236 --
237 -- Prerequisites:
238 -- This private procedure is called from del procedure.
239 --
240 -- In Parameters:
241 -- A Pl/Sql record structre.
242 --
243 -- Post Success:
244 -- Processing continues.
245 --
246 -- Post Failure:
247 -- If a business rules fails the error will not be handled by this procedure
248 -- unless explicity coded.
249 --
250 -- Developer Implementation Notes:
251 -- For delete, your business rules should be executed from this procedure and
252 -- should ideally (unless really necessary) just be straight procedure or
253 -- function calls. Try and avoid using conditional branching logic.
254 --
255 -- Access Status:
256 -- Internal Row Handler Use Only.
257 --
258 -- {End Of Comments}
259 -- ----------------------------------------------------------------------------
260 Procedure delete_validate(p_rec in per_ssl_shd.g_rec_type);
261 --
262 end per_ssl_bus;