1 Package ota_nhs_bus as
2 /* $Header: otnhsrhi.pkh 120.0 2005/05/29 07:26:54 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 --
13 -- Prerequisites:
14 -- The primary key identified by p_nota_history_id
15 -- already exists.
16 --
17 -- In Arguments:
18 -- p_nota_history_id
19 --
20 --
21 -- Post Success:
22 -- The security_group_id will be set in CLIENT_INFO.
23 --
24 -- Post Failure:
25 -- An error is raised if the value does not exist.
26 --
27 -- Access Status:
28 -- Internal Development Use Only.
29 --
30 -- {End Of Comments}
31 -- ---------------------------------------------------------------------------
32 procedure set_security_group_id
33 (p_nota_history_id in number
34 );
35 --
36 --
37 -- ---------------------------------------------------------------------------
38 -- |---------------------< return_legislation_code >-------------------------|
39 -- ---------------------------------------------------------------------------
40 -- {Start Of Comments}
41 --
42 -- Description:
43 -- Return the legislation code for a specific primary key value
44 --
45 -- Prerequisites:
46 -- The primary key identified by p_nota_history_id
47 -- already exists.
48 --
49 -- In Arguments:
50 -- p_nota_history_id
51 --
52 --
53 -- Post Success:
54 -- The business group's legislation code will be returned.
55 --
56 -- Post Failure:
57 -- An error is raised if the value does not exist.
58 --
59 -- Access Status:
60 -- Internal Development Use Only.
61 --
62 -- {End Of Comments}
63 -- ---------------------------------------------------------------------------
64 FUNCTION return_legislation_code
65 (p_nota_history_id in number
66 ) RETURN varchar2;
67 --
68
69
70 -- ---------------------------------------------------------------------------
71 -- |---------------------< chk_df>-------------------------|
72 -- ---------------------------------------------------------------------------
73 -- {Start Of Comments}
74 --
75 -- Description:
76 -- Return the legislation code for a specific primary key value
77 --
78 -- Prerequisites:
79 -- The primary key identified by p_nota_history_id
80 -- already exists.
81 --
82 -- In Arguments:
83 -- p_rec
84 --
85 --
86 -- Post Success:
87 -- The descriptive flexfield will be saved.
88 --
89 -- Post Failure:
90 -- An error is raised if the value does not exist.
91 --
92 -- Access Status:
93 -- Internal Development Use Only.
94 --
95 -- {End Of Comments}
96 -- ---------------------------------------------------------------------------
97 procedure chk_df
98 (p_rec in ota_nhs_shd.g_rec_type );
99
100 --
101 -- ----------------------------------------------------------------------------
102 -- |-----------------------< chk_non_updateable_args >------------------------|
103 -- ----------------------------------------------------------------------------
104 -- {Start Of Comments}
105 --
106 -- Description:
107 -- This procedure is used to ensure that non updateable attributes have
108 -- not been updated. If an attribute has been updated an error is generated.
109 --
110 -- Pre Conditions:
111 -- g_old_rec has been populated with details of the values currently in
112 -- the database.
113 --
114 -- In Arguments:
115 -- p_rec has been populated with the updated values the user would like the
116 -- record set to.
117 --
118 -- Post Success:
119 -- Processing continues if all the non updateable attributes have not
120 -- changed.
121 --
122 -- Post Failure:
123 -- An application error is raised if any of the non updatable attributes
124 -- have been altered.
125 --
126 -- {End Of Comments}
127 -- ----------------------------------------------------------------------------
128 Procedure chk_non_updateable_args
129 (p_effective_date in date
130 ,p_rec in ota_nhs_shd.g_rec_type);
131
132
133 --
134 -- ----------------------------------------------------------------------------
135 -- |---------------------------< chk_organization_id >----------------------|
136 -- ----------------------------------------------------------------------------
137 -- {Start Of Comments}
138 --
139 -- Description:
140 -- Check whether the organization_id is valid
141 --
142 -- Prerequisites:
143 -- The primary key identified by p_nota_history_id
144 -- already exists.
145 --
146 -- In Arguments:
147 -- p_nota_history_id
148 -- p_organization_id
149 -- p_effective_date
150 --
151 --
152 -- Post Success:
153 -- No error.
154 --
155 -- Post Failure:
156 -- An error is raised if the value does not exist.
157 --
158 -- Access Status:
159 -- Internal Development Use Only.
160 --
161 -- {End Of Comments}
162 -- ---------------------------------------------------------------------------
163
164 Procedure chk_organization_id
165 (p_nota_history_id in number
166 ,p_organization_id in number
167 ,p_business_group_id in number
168 ,p_effective_date in date) ;
169 --
170 -- ----------------------------------------------------------------------------
171 -- |---------------------------< chk_customer_id >----------------------------|
172 -- ----------------------------------------------------------------------------
173 -- {Start Of Comments}
174 --
175 -- Description:
176 -- Check whether the customer_id is valid
177 --
178 -- Prerequisites:
179 -- The primary key identified by p_nota_history_id
180 -- already exists.
181 --
182 -- In Arguments:
183 -- p_nota_history_id
184 -- p_customer_id
185 -- p_effective_date
186 --
187 --
188 -- Post Success:
189 -- No error.
190 --
191 -- Post Failure:
192 -- An error is raised if the value does not exist.
193 --
194 -- Access Status:
195 -- Internal Development Use Only.
196 --
197 -- {End Of Comments}
198 -- ---------------------------------------------------------------------------
199
200 Procedure chk_customer_id
201 (p_nota_history_id in number
202 ,p_customer_id in number
203 ,p_effective_date in date) ;
204
205
206 -- ----------------------------------------------------------------------------
207 -- |---------------------------< chk_person_id >----------------------------|
208 -- ----------------------------------------------------------------------------
209 -- {Start Of Comments}
210 --
211 -- Description:
212 -- Check whether the person_id is valid
213 --
214 -- Prerequisites:
215 -- The primary key identified by p_nota_history_id
216 -- already exists.
217 --
218 -- In Arguments:
219 -- p_nota_history_id
220 -- p_customer_id
221 -- p_organization_id
222 -- p_person_id
223 -- p_effective_date
224 --
225 --
226 -- Post Success:
227 -- No error.
228 --
229 -- Post Failure:
230 -- An error is raised if the value does not exist.
231 --
232 -- Access Status:
233 -- Internal Development Use Only.
234 --
235 -- {End Of Comments}
236 -- ---------------------------------------------------------------------------
237
238 Procedure chk_person_id
239 (p_nota_history_id in number
240 ,p_customer_id in number
241 ,p_organization_id in number
242 ,p_person_id in number
243 ,p_business_group_id in number
244 ,p_effective_date in date) ;
245
246 -- ----------------------------------------------------------------------------
247 -- |---------------------------< chk_contact_id >----------------------------|
248 -- ----------------------------------------------------------------------------
249 -- {Start Of Comments}
250 --
251 -- Description:
252 -- Check whether the contact_id is valid
253 --
254 -- Prerequisites:
255 -- The primary key identified by p_nota_history_id
256 -- already exists.
257 --
258 -- In Arguments:
259 -- p_nota_history_id
260 -- p_customer_id
261 -- p_organization_id
262 -- p_person_id
263 -- p_effective_date
264 --
265 --
266 -- Post Success:
267 -- No error.
268 --
269 -- Post Failure:
270 -- An error is raised if the value does not exist.
271 --
272 -- Access Status:
273 -- Internal Development Use Only.
274 --
275 -- {End Of Comments}
276 -- ---------------------------------------------------------------------------
277
278 Procedure chk_contact_id
279 (p_nota_history_id in number
280 ,p_customer_id in number
281 ,p_organization_id in number
282 ,p_contact_id in number
283 ,p_effective_date in date) ;
284
285
286
287 -- ----------------------------------------------------------------------------
288 -- |---------------------------< chk_status >----------------------------|
289 -- ----------------------------------------------------------------------------
290 -- {Start Of Comments}
291 --
292 -- Description:
293 -- Check whether the status is valid
294 --
295 -- Prerequisites:
296 -- The primary key identified by p_nota_history_id
297 -- already exists.
298 --
299 -- In Arguments:
300 -- p_nota_history_id
301 -- p_status
302 -- p_effective_date
303 --
304 --
305 -- Post Success:
306 -- No error.
307 --
308 -- Post Failure:
309 -- An error is raised if the value does not exist.
310 --
311 -- Access Status:
312 -- Internal Development Use Only.
313 --
314 -- {End Of Comments}
315 -- ---------------------------------------------------------------------------
316 Procedure chk_status
317 (p_nota_history_id in number
318 ,p_status in varchar2
319 ,p_effective_date in date);
320
321
322 -- ----------------------------------------------------------------------------
323 -- |---------------------------< chk_type >----------------------------|
324 -- ----------------------------------------------------------------------------
325 -- {Start Of Comments}
326 --
327 -- Description:
328 -- Check whether the type valid
329 --
330 -- Prerequisites:
331 -- The primary key identified by p_nota_history_id
332 -- already exists.
333 --
334 -- In Arguments:
335 -- p_nota_history_id
336 -- p_type
337 -- p_effective_date
338 --
339 --
340 -- Post Success:
341 -- No error.
342 --
343 -- Post Failure:
344 -- An error is raised if the value does not exist.
345 --
346 -- Access Status:
347 -- Internal Development Use Only.
348 --
349 -- {End Of Comments}
350 -- ---------------------------------------------------------------------------
351 Procedure chk_type
352 (p_nota_history_id in number
353 ,p_type in varchar2
354 ,p_effective_date in date);
355
356
357 -- ----------------------------------------------------------------------------
358 -- |---------------------------< chk_duration_unit >----------------------------|
359 -- ----------------------------------------------------------------------------
360 -- ----------------------------------------------------------------------------
361 -- {Start Of Comments}
362 --
363 -- Description:
364 -- Check whether the duration unit is valid
365 --
366 -- Prerequisites:
367 -- The primary key identified by p_nota_history_id
368 -- already exists.
369 --
370 -- In Arguments:
371 -- p_nota_history_id
372 -- p_duration_units
373 -- p_effective_date
374 --
375 --
376 -- Post Success:
377 -- No error.
378 --
379 -- Post Failure:
380 -- An error is raised if the value does not exist.
381 --
382 -- Access Status:
383 -- Internal Development Use Only.
384 --
385 -- {End Of Comments}
386 -- ---------------------------------------------------------------------------
387 Procedure chk_duration_unit
388 (p_nota_history_id in number
389 ,p_duration_units in varchar2
390 ,p_effective_date in date) ;
391
392
393 -- ----------------------------------------------------------------------------
394 -- |---------------------------< chk_comb_duration >----------------------------|
395 -- ----------------------------------------------------------------------------
396 -- ----------------------------------------------------------------------------
397 -- {Start Of Comments}
398 --
399 -- Description:
400 -- Check whether the both has to be null or both not null
401 --
402 -- Prerequisites:
403 -- The primary key identified by p_nota_history_id
404 -- already exists.
405 --
406 -- In Arguments:
407 -- p_nota_history_id
408 -- p_duration_units
409 -- p_duration
410 -- p_effective_date
411 --
412 --
413 -- Post Success:
414 -- No error.
415 --
416 -- Post Failure:
417 -- An error is raised if the only one has value.
418 --
419 -- Access Status:
420 -- Internal Development Use Only.
421 --
422 -- {End Of Comments}
423 -- ---------------------------------------------------------------------------
424 Procedure chk_comb_duration
425 (p_nota_history_id in number
426 ,p_duration in number
427 ,p_duration_units in varchar2
428 ,p_effective_date in date) ;
429
430 -- ----------------------------------------------------------------------------
431 -- |---------------------------< get_profile_value >------------------------|
432 -- ----------------------------------------------------------------------------
433 -- ----------------------------------------------------------------------------
434 -- {Start Of Comments}
435 --
436 -- Description:
437 -- Get Cross Business Group profile and Single Business Group profile
438 --
439 -- Prerequisites:
440 -- None
441 --
442 -- In Arguments:
443 -- None
444 --
445 -- out Arguments:
446 -- p_cross_business_group
447 -- p_single_busines_group_id
448 --
449 -- Post Success:
450 -- No error.
451 --
452 -- Post Failure:
453 -- An error is raised if the only one has value.
454 --
455 -- Access Status:
456 -- Internal Development Use Only.
457 --
458 -- {End Of Comments}
459 -- ---------------------------------------------------------------------------
460 Procedure get_profile_value
461 (p_cross_business_group out nocopy varchar2
462 ,p_single_business_group_id out nocopy varchar2);
463
464 -- ----------------------------------------------------------------------------
465 -- |---------------------------< insert_validate >----------------------------|
469 -- Description:
466 -- ----------------------------------------------------------------------------
467 -- {Start Of Comments}
468 --
470 -- This procedure controls the execution of all insert business rules
471 -- validation.
472 --
473 -- Prerequisites:
474 -- This private procedure is called from ins procedure.
475 --
476 -- In Parameters:
477 -- A Pl/Sql record structre.
478 --
479 -- Post Success:
480 -- Processing continues.
481 --
482 -- Post Failure:
483 -- If a business rules fails the error will not be handled by this procedure
484 -- unless explicity coded.
485 --
486 -- Developer Implementation Notes:
487 -- For insert, your business rules should be executed from this procedure and
488 -- should ideally (unless really necessary) just be straight procedure or
489 -- function calls. Try and avoid using conditional branching logic.
490 --
491 -- Access Status:
492 -- Internal Row Handler Use Only.
493 --
494 -- {End Of Comments}
495 -- ----------------------------------------------------------------------------
496 Procedure insert_validate(p_effective_date in date,
497 p_rec in ota_nhs_shd.g_rec_type);
498 --
499 -- ----------------------------------------------------------------------------
500 -- |---------------------------< update_validate >----------------------------|
501 -- ----------------------------------------------------------------------------
502 -- {Start Of Comments}
503 --
504 -- Description:
505 -- This procedure controls the execution of all update business rules
506 -- validation.
507 --
508 -- Prerequisites:
509 -- This private procedure is called from upd procedure.
510 --
511 -- In Parameters:
512 -- A Pl/Sql record structre.
513 --
514 -- Post Success:
515 -- Processing continues.
516 --
517 -- Post Failure:
518 -- If a business rules fails the error will not be handled by this procedure
519 -- unless explicity coded.
520 --
521 -- Developer Implementation Notes:
522 -- For update, your business rules should be executed from this procedure and
523 -- should ideally (unless really necessary) just be straight procedure or
524 -- function calls. Try and avoid using conditional branching logic.
525 --
526 -- Access Status:
527 -- Internal Row Handler Use Only.
528 --
529 -- {End Of Comments}
530 -- ----------------------------------------------------------------------------
531 Procedure update_validate(p_effective_date in date,
532 p_rec in ota_nhs_shd.g_rec_type);
533 --
534 -- ----------------------------------------------------------------------------
535 -- |---------------------------< delete_validate >----------------------------|
536 -- ----------------------------------------------------------------------------
537 -- {Start Of Comments}
538 --
539 -- Description:
540 -- This procedure controls the execution of all delete business rules
541 -- validation.
542 --
543 -- Prerequisites:
544 -- This private procedure is called from del procedure.
545 --
546 -- In Parameters:
547 -- A Pl/Sql record structre.
548 --
549 -- Post Success:
550 -- Processing continues.
551 --
552 -- Post Failure:
553 -- If a business rules fails the error will not be handled by this procedure
554 -- unless explicity coded.
555 --
556 -- Developer Implementation Notes:
557 -- For delete, your business rules should be executed from this procedure and
558 -- should ideally (unless really necessary) just be straight procedure or
559 -- function calls. Try and avoid using conditional branching logic.
560 --
561 -- Access Status:
562 -- Internal Row Handler Use Only.
563 --
564 -- {End Of Comments}
565 -- ----------------------------------------------------------------------------
566 Procedure delete_validate(p_rec in ota_nhs_shd.g_rec_type);
567 --
568 end ota_nhs_bus;