1 Package pay_rtu_bus AUTHID CURRENT_USER as
2 /* $Header: pyrturhi.pkh 120.0 2005/05/29 08:29:09 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_usage_id
17 -- already exists.
18 --
19 -- In Arguments:
20 -- p_run_type_usage_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_usage_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_usage_id
51 -- already exists.
52 --
53 -- In Arguments:
54 -- p_run_type_usage_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_usage_id in number
70 ) RETURN varchar2;
71 --
72 -- ----------------------------------------------------------------------------
73 -- |-----------------------< chk_parent_run_type_id >------------------------|
74 -- ---------------------------------------------------------------------------
75 --
76 -- Description:
77 -- Checks the validity of the parent_run_type_id enterend by carrying out
78 -- the following:
79 -- - check that the parent_run_type_id exists
80 -- - check that the parent_run_type_id has a run_method = 'C'
81 --
82 -- Pre-conditions:
83 -- None
84 --
85 -- In Arguments:
86 -- p_run_type_usage_id
87 -- p_parent_run_type_id
88 -- p_effective_date
89 -- p_business_group_id
90 -- p_legislation_code
91 --
92 -- Post Success:
93 -- If the parent_run_type_id is valid then processing continues
94 --
95 -- Post Failure:
96 -- If any of the following cases are true then an application error will be
97 -- raised and processing is terminated:
98 --
99 -- a) parent_run_type_id does not exist
100 -- b) run_method of parent_run_type_id is not 'C'
101 --
102 -- Access Status:
103 -- Internal Row Handler Use Only.
104 --
105 -- ---------------------------------------------------------------------------
106 PROCEDURE chk_parent_run_type_id
107 (p_run_type_usage_id in number
108 ,p_parent_run_type_id in number
109 ,p_effective_date in date
110 ,p_business_group_id in number
111 ,p_legislation_code in varchar2);
112 -- ---------------------------------------------------------------------------
113 -- |------------------------< chk_child_run_type_id >------------------------|
114 -- ---------------------------------------------------------------------------
115 --
116 -- Description:
117 -- Checks the validity of the child_run_type_id enterend by carrying out
118 -- the following:
119 -- - check that the child_run_type_id exists
120 --
121 -- Pre-conditions:
122 -- None
123 --
124 -- In Arguments:
125 -- p_run_type_usage_id
126 -- p_child_run_type_id
127 -- p_parent_run_type_id
128 -- p_effective_date
129 -- p_business_group_id
130 -- p_legislation_code
131 --
132 -- Post Success:
133 -- If the child_run_type_id is valid then processing continues
134 --
135 -- Post Failure:
136 -- If any of the following cases are true then an application error will be
137 -- raised and processing is terminated:
138 --
139 -- a) child_run_type_id does not exist
140 --
141 -- Access Status:
142 -- Internal Row Handler Use Only.
143 --
144 -- ---------------------------------------------------------------------------
145 PROCEDURE chk_child_run_type_id
146 (p_run_type_usage_id in number
147 ,p_child_run_type_id in number
148 ,p_parent_run_type_id in number
149 ,p_effective_date in date
150 ,p_business_group_id in number
151 ,p_legislation_code in varchar2);
152 --
153 -- ---------------------------------------------------------------------------
154 -- |-----------------------------< chk_sequence >----------------------------|
155 -- ---------------------------------------------------------------------------
156 --
157 -- Description:
158 -- Checks the validity of the sequence enterend by carrying out the
159 -- following:
160 -- - check that the sequence is unique within a parent_run_type_id
161 --
162 -- Pre-conditions:
163 -- None
164 --
165 -- In Arguments:
166 -- p_run_type_usage_id
167 -- p_parent_run_type_id
168 -- p_sequence
169 -- p_effective_date
170 --
171 -- Post Success:
172 -- If the sequence is valid then processing continues
173 --
174 -- Post Failure:
175 -- If any of the following cases are true then an application error will be
176 -- raised and processing is terminated:
177 --
178 -- a) sequence is not unique within a run_type_usage_id
179 --
180 -- Access Status:
181 -- Internal Row Handler Use Only.
182 --
183 -- ---------------------------------------------------------------------------
184 PROCEDURE chk_sequence
185 (p_run_type_usage_id in number
186 ,p_parent_run_type_id in number
187 ,p_sequence in number
188 ,p_effective_date in date);
189 --
190 -- ----------------------------------------------------------------------------
191 -- |---------------------------< insert_validate >----------------------------|
192 -- ----------------------------------------------------------------------------
193 -- {Start Of Comments}
194 --
195 -- Description:
196 -- This procedure controls the execution of all insert business rules
197 -- validation.
198 --
199 -- Prerequisites:
200 -- This private procedure is called from ins procedure.
201 --
202 -- In Parameters:
203 -- A Pl/Sql record structre.
204 --
205 -- Post Success:
206 -- Processing continues.
207 --
208 -- Post Failure:
209 -- If a business rules fails the error will not be handled by this procedure
210 -- unless explicity coded.
211 --
212 -- Developer Implementation Notes:
213 -- For insert, your business rules should be executed from this procedure and
214 -- should ideally (unless really necessary) just be straight procedure or
215 -- function calls. Try and avoid using conditional branching logic.
216 --
217 -- Access Status:
218 -- Internal Row Handler Use Only.
219 --
220 -- {End Of Comments}
221 -- ----------------------------------------------------------------------------
222 Procedure insert_validate
223 (p_rec in pay_rtu_shd.g_rec_type
224 ,p_effective_date in date
225 ,p_datetrack_mode in varchar2
226 ,p_validation_start_date in date
227 ,p_validation_end_date in date
228 );
229 --
230 -- ----------------------------------------------------------------------------
231 -- |---------------------------< update_validate >----------------------------|
232 -- ----------------------------------------------------------------------------
233 -- {Start Of Comments}
234 --
235 -- Description:
236 -- This procedure controls the execution of all update business rules
237 -- validation.
238 --
239 -- Prerequisites:
240 -- This private procedure is called from upd procedure.
241 --
242 -- In Parameters:
243 -- A Pl/Sql record structre.
244 --
245 -- Post Success:
246 -- Processing continues.
247 --
248 -- Post Failure:
249 -- If a business rules fails the error will not be handled by this procedure
250 -- unless explicity coded.
251 --
252 -- Developer Implementation Notes:
253 -- For update, your business rules should be executed from this procedure and
254 -- should ideally (unless really necessary) just be straight procedure or
255 -- function calls. Try and avoid using conditional branching logic.
256 --
257 -- Access Status:
258 -- Internal Row Handler Use Only.
259 --
260 -- {End Of Comments}
261 -- ----------------------------------------------------------------------------
262 Procedure update_validate
263 (p_rec in pay_rtu_shd.g_rec_type
264 ,p_effective_date in date
265 ,p_datetrack_mode in varchar2
266 ,p_validation_start_date in date
267 ,p_validation_end_date in date
268 );
269 --
270 -- ----------------------------------------------------------------------------
271 -- |---------------------------< delete_validate >----------------------------|
272 -- ----------------------------------------------------------------------------
273 -- {Start Of Comments}
274 --
275 -- Description:
276 -- This procedure controls the execution of all delete business rules
277 -- validation.
278 --
279 -- Prerequisites:
280 -- This private procedure is called from del procedure.
281 --
282 -- In Parameters:
283 -- A Pl/Sql record structure.
284 --
285 -- Post Success:
286 -- Processing continues.
287 --
288 -- Post Failure:
289 -- If a business rules fails the error will not be handled by this procedure
290 -- unless explicity coded.
291 --
292 -- Developer Implementation Notes:
293 -- For delete, your business rules should be executed from this procedure and
294 -- should ideally (unless really necessary) just be straight procedure or
295 -- function calls. Try and avoid using conditional branching logic.
296 --
297 -- Access Status:
298 -- Internal Row Handler Use Only.
299 --
300 -- {End Of Comments}
301 -- ----------------------------------------------------------------------------
302 Procedure delete_validate
303 (p_rec in pay_rtu_shd.g_rec_type
304 ,p_effective_date in date
305 ,p_datetrack_mode in varchar2
306 ,p_validation_start_date in date
307 ,p_validation_end_date in date
308 );
309 --
310 end pay_rtu_bus;