1 Package per_ptu_bus as
2 /* $Header: pepturhi.pkh 120.0 2005/05/31 15:58:28 appldev noship $ */
3 --
4 -- The following two global variables are only to be
5 -- used by the return_legislation_code function.
6 --
7 g_legislation_code varchar2(150) default null;
8 g_person_type_usage_id number default null;
9 --
10 --
11 -- ----------------------------------------------------------------------------
12 -- |---------------------------< insert_validate >----------------------------|
13 -- ----------------------------------------------------------------------------
14 -- {Start Of Comments}
15 --
16 -- Description:
17 -- This procedure controls the execution of all insert business rules
18 -- validation.
19 --
20 -- Prerequisites:
21 -- This private procedure is called from ins procedure.
22 --
23 -- In Parameters:
24 -- A Pl/Sql record structre.
25 --
26 -- Post Success:
27 -- Processing continues.
28 --
29 -- Post Failure:
30 -- If a business rules fails the error will not be handled by this procedure
31 -- unless explicity coded.
32 --
33 -- Developer Implementation Notes:
34 -- For insert, your business rules should be executed from this procedure and
35 -- should ideally (unless really necessary) just be straight procedure or
36 -- function calls. Try and avoid using conditional branching logic.
37 --
38 -- Access Status:
39 -- Internal Row Handler Use Only.
40 --
41 -- {End Of Comments}
42 -- ----------------------------------------------------------------------------
43 Procedure insert_validate
44 (p_rec in per_ptu_shd.g_rec_type,
45 p_effective_date in date,
46 p_datetrack_mode in varchar2,
47 p_validation_start_date in date,
48 p_validation_end_date in date);
49 --
50 -- ----------------------------------------------------------------------------
51 -- |---------------------------< update_validate >----------------------------|
52 -- ----------------------------------------------------------------------------
53 -- {Start Of Comments}
54 --
55 -- Description:
56 -- This procedure controls the execution of all update business rules
57 -- validation.
58 --
59 -- Prerequisites:
60 -- This private procedure is called from upd procedure.
61 --
62 -- In Parameters:
63 -- A Pl/Sql record structre.
64 --
65 -- Post Success:
66 -- Processing continues.
67 --
68 -- Post Failure:
69 -- If a business rules fails the error will not be handled by this procedure
70 -- unless explicity coded.
71 --
72 -- Developer Implementation Notes:
73 -- For update, your business rules should be executed from this procedure and
74 -- should ideally (unless really necessary) just be straight procedure or
75 -- function calls. Try and avoid using conditional branching logic.
76 --
77 -- Access Status:
78 -- Internal Row Handler Use Only.
79 --
80 -- {End Of Comments}
81 -- ----------------------------------------------------------------------------
82 Procedure update_validate
83 (p_rec in per_ptu_shd.g_rec_type,
84 p_effective_date in date,
85 p_datetrack_mode in varchar2,
86 p_validation_start_date in date,
87 p_validation_end_date in date);
88 --
89 -- ----------------------------------------------------------------------------
90 -- |---------------------------< delete_validate >----------------------------|
91 -- ----------------------------------------------------------------------------
92 -- {Start Of Comments}
93 --
94 -- Description:
95 -- This procedure controls the execution of all delete business rules
96 -- validation.
97 --
98 -- Prerequisites:
99 -- This private procedure is called from del procedure.
100 --
101 -- In Parameters:
102 -- A Pl/Sql record structre.
103 --
104 -- Post Success:
105 -- Processing continues.
106 --
107 -- Post Failure:
108 -- If a business rules fails the error will not be handled by this procedure
109 -- unless explicity coded.
110 --
111 -- Developer Implementation Notes:
112 -- For delete, your business rules should be executed from this procedure and
113 -- should ideally (unless really necessary) just be straight procedure or
114 -- function calls. Try and avoid using conditional branching logic.
115 --
116 -- Access Status:
117 -- Internal Row Handler Use Only.
118 --
119 -- {End Of Comments}
120 -- ----------------------------------------------------------------------------
121 Procedure delete_validate
122 (p_rec in per_ptu_shd.g_rec_type,
123 p_effective_date in date,
124 p_datetrack_mode in varchar2,
125 p_validation_start_date in date,
126 p_validation_end_date in date);
127 --
128 --
129 -- ---------------------------------------------------------------------------
130 -- |---------------------< return_legislation_code >-------------------------|
131 -- ---------------------------------------------------------------------------
132 -- {Start Of Comments}
133 --
134 -- Description:
135 -- This procedure returns the business group id of the parent row.
136 --
137 -- Pre Conditions:
138 -- That the person_usage_type row has been created.
139 --
140 -- In Parameters:
141 -- Primary key for the person_usage_types table.
142 --
143 -- Post Success:
144 -- Processing continues.
145 --
146 -- Post Failure:
147 -- An error is raised.
148 --
149 -- Developer Implementation Notes:
150 -- This return_legislation_code function is slightly different from others in
151 -- that the cursor does a join on the parent table (in this case the parent
152 -- table is always PER_ALL_PEOPLE_F and retrieves the business_group_id from
153 -- there.
154 --
155 -- Access Status:
156 -- Public
157 --
158 -- {End Of Comments}
159 -- ----------------------------------------------------------------------------
160 --
161 function return_legislation_code
162 (p_person_type_usage_id in number
163 ) return varchar2;
164 --
165 end per_ptu_bus;