1 Package pay_prt_bus as
2 /* $Header: pyprtrhi.pkh 120.0 2005/05/29 07:52:46 appldev noship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |----------------------< set_security_group_id >--------------------------|
6 -- ---------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- Sets the security_group_id in CLIENT_INFO for the appropriate business
11 -- group context.
12 -- It is only valid to call this procedure when the primary key
13 -- is within a buisiness group context.
14 --
15 -- Prerequisites:
16 -- The primary key identified by p_run_type_id
17 -- already exists.
18 --
19 -- In Arguments:
20 -- p_run_type_id
21 --
22 --
23 -- Post Success:
24 -- The security_group_id will be set in CLIENT_INFO.
25 --
26 -- Post Failure:
27 -- An error is raised if the value does not exist.
28 -- An error is also raised when the primary key data is outside
29 -- of a buisiness group context.
30 --
31 -- Access Status:
32 -- Internal Development Use Only.
33 --
34 -- {End Of Comments}
35 -- ---------------------------------------------------------------------------
36 procedure set_security_group_id
37 (p_run_type_id in number
38 );
39 --
40 --
41 -- ---------------------------------------------------------------------------
42 -- |---------------------< return_legislation_code >-------------------------|
43 -- ---------------------------------------------------------------------------
44 -- {Start Of Comments}
45 --
46 -- Description:
47 -- Return the legislation code for a specific primary key value
48 --
49 -- Prerequisites:
50 -- The primary key identified by p_run_type_id
51 -- already exists.
52 --
53 -- In Arguments:
54 -- p_run_type_id
55 --
56 --
57 -- Post Success:
58 -- The business group's legislation code will be returned.
59 --
60 -- Post Failure:
61 -- An error is raised if the value does not exist.
62 --
63 -- Access Status:
64 -- Internal Development Use Only.
65 --
66 -- {End Of Comments}
67 -- ---------------------------------------------------------------------------
68 FUNCTION return_legislation_code
69 (p_run_type_id in number
70 ) RETURN varchar2;
71 --
72 --
73 -- ----------------------------------------------------------------------------
74 -- |---------------------------< chk_run_method >-----------------------------|
75 -- ----------------------------------------------------------------------------
76 -- {Start Of Comments}
77 --
78 -- Description:
79 -- This procedure is used to ensure that the run_method is one of the
80 -- following:
81 -- N - Normal
82 -- C - Cumulative
83 -- S - Separate Payment
84 -- P - Process Separately
85 --
86 -- Pre Conditions:
87 -- g_old_rec has been populated with details of the values currently in
88 -- the database.
89 --
90 -- In Arguments:
91 -- p_rec has been populated with the updated values the user would like the
92 -- record set to.
93 --
94 -- Post Success:
95 -- Processing continues if a valid run_method has been entered.
96 --
97 -- Post Failure:
98 -- An application error is raised if a invalid run_method has been entered.
99 --
100 -- {End Of Comments}
101 -- ----------------------------------------------------------------------------
102 Procedure chk_run_method
103 (p_effective_date in date
104 ,p_validation_start_date in date
105 ,p_validation_end_date in date
106 ,p_run_method in varchar2);
107 --
108 -- ----------------------------------------------------------------------------
109 -- |--------------------------< chk_run_type_name >---------------------------|
110 -- ----------------------------------------------------------------------------
111 -- {Start Of Comments}
112 --
113 -- Description:
114 -- This procedure is used to ensure that the run_type_name is unique within
115 -- a business group.
116 --
117 -- Pre Conditions:
118 -- g_old_rec has been populated with details of the values currently in
119 -- the database.
120 --
121 -- In Arguments:
122 -- p_rec has been populated with the updated values the user would like the
123 -- record set to.
124 --
125 -- Post Success:
126 -- Processing continues if a valid run_type_name has been entered.
127 --
128 -- Post Failure:
129 -- An application error is raised if a duplicate run_type_name has been
130 -- entered.
131 --
132 -- {End Of Comments}
133 -- ----------------------------------------------------------------------------
134 Procedure chk_run_type_name
135 (p_run_type_id in number
136 ,p_run_type_name in varchar2
137 ,p_effective_date in date
138 ,p_business_group_id in number default null
139 ,p_legislation_code in varchar2 default null);
140 -- ----------------------------------------------------------------------------
141 -- |--------------------------< chk_for_child_actions >-----------------------|
142 -- ----------------------------------------------------------------------------
143 -- {Start Of Comments}
144 --
145 -- Description:
146 -- This procedure is used to ensure that there are no child payroll actions
147 -- or assignment_actions for a run type that is being deleted.
148 --
149 -- Pre Conditions:
150 -- g_old_rec has been populated with details of the values currently in
151 -- the database.
152 --
153 -- In Arguments:
154 -- p_rec has been populated with the updated values the user would like the
155 -- record set to.
156 --
157 -- Post Success:
158 -- Processing continues if no child rows are found.
159 --
160 -- Post Failure:
161 -- An application error is raised if child rows are found, and delete
162 -- processing is halted.
163 --
164 -- {End Of Comments}
165 -- ----------------------------------------------------------------------------
166 Procedure chk_for_child_actions
167 (p_run_type_id in number
168 ,p_effective_date in date
169 ,p_business_group_id in number default null
170 ,p_legislation_code in varchar2 default null);
171 -- ----------------------------------------------------------------------------
172 -- |---------------------------< insert_validate >----------------------------|
173 -- ----------------------------------------------------------------------------
174 -- {Start Of Comments}
175 --
176 -- Description:
177 -- This procedure controls the execution of all insert business rules
178 -- validation.
179 --
180 -- Prerequisites:
181 -- This private procedure is called from ins procedure.
182 --
183 -- In Parameters:
184 -- A Pl/Sql record structre.
185 --
186 -- Post Success:
187 -- Processing continues.
188 --
189 -- Post Failure:
190 -- If a business rules fails the error will not be handled by this procedure
191 -- unless explicity coded.
192 --
193 -- Developer Implementation Notes:
194 -- For insert, your business rules should be executed from this procedure and
195 -- should ideally (unless really necessary) just be straight procedure or
196 -- function calls. Try and avoid using conditional branching logic.
197 --
198 -- Access Status:
199 -- Internal Row Handler Use Only.
200 --
201 -- {End Of Comments}
202 -- ----------------------------------------------------------------------------
203 Procedure insert_validate
204 (p_rec in pay_prt_shd.g_rec_type
205 ,p_effective_date in date
206 ,p_datetrack_mode in varchar2
207 ,p_validation_start_date in date
208 ,p_validation_end_date in date
209 );
210 --
211 -- ----------------------------------------------------------------------------
212 -- |---------------------------< update_validate >----------------------------|
213 -- ----------------------------------------------------------------------------
214 -- {Start Of Comments}
215 --
216 -- Description:
217 -- This procedure controls the execution of all update business rules
218 -- validation.
219 --
220 -- Prerequisites:
221 -- This private procedure is called from upd procedure.
222 --
223 -- In Parameters:
224 -- A Pl/Sql record structre.
225 --
226 -- Post Success:
227 -- Processing continues.
228 --
229 -- Post Failure:
230 -- If a business rules fails the error will not be handled by this procedure
231 -- unless explicity coded.
232 --
233 -- Developer Implementation Notes:
234 -- For update, your business rules should be executed from this procedure and
235 -- should ideally (unless really necessary) just be straight procedure or
236 -- function calls. Try and avoid using conditional branching logic.
237 --
238 -- Access Status:
239 -- Internal Row Handler Use Only.
240 --
241 -- {End Of Comments}
242 -- ----------------------------------------------------------------------------
243 Procedure update_validate
244 (p_rec in pay_prt_shd.g_rec_type
245 ,p_effective_date in date
246 ,p_datetrack_mode in varchar2
247 ,p_validation_start_date in date
248 ,p_validation_end_date in date
249 );
250 --
251 -- ----------------------------------------------------------------------------
252 -- |---------------------------< delete_validate >----------------------------|
253 -- ----------------------------------------------------------------------------
254 -- {Start Of Comments}
255 --
256 -- Description:
257 -- This procedure controls the execution of all delete business rules
258 -- validation.
259 --
260 -- Prerequisites:
261 -- This private procedure is called from del procedure.
262 --
263 -- In Parameters:
264 -- A Pl/Sql record structure.
265 --
266 -- Post Success:
267 -- Processing continues.
268 --
269 -- Post Failure:
270 -- If a business rules fails the error will not be handled by this procedure
271 -- unless explicity coded.
272 --
273 -- Developer Implementation Notes:
274 -- For delete, your business rules should be executed from this procedure and
275 -- should ideally (unless really necessary) just be straight procedure or
276 -- function calls. Try and avoid using conditional branching logic.
277 --
278 -- Access Status:
279 -- Internal Row Handler Use Only.
280 --
281 -- {End Of Comments}
282 -- ----------------------------------------------------------------------------
283 Procedure delete_validate
287 ,p_validation_start_date in date
284 (p_rec in pay_prt_shd.g_rec_type
285 ,p_effective_date in date
286 ,p_datetrack_mode in varchar2
288 ,p_validation_end_date in date
289 );
290 --
291 end pay_prt_bus;