1 Package per_pcl_bus as
2 /* $Header: pepclrhi.pkh 120.0 2005/05/31 13:01:05 appldev noship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |------------------------< chk_dates_are_valid >--------------------------|
6 -- ---------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- Checks that the dates are valid and fall within the correct ranges
11 -- for each other.
12 --
13 -- Prerequisites:
14 --
15 -- In Arguments:
16 -- p_cagr_entitlement_line_id
17 -- p_value
18 -- p_range_from
19 -- p_range_to
20 --
21 --
22 -- Post Success:
23 --
24 -- Post Failure:
25 -- An error is raised if the dates are invalid.
26 --
27 -- Access Status:
28 -- Internal Development Use Only.
29 --
30 -- {End Of Comments}
31 -- ---------------------------------------------------------------------------
32 --
33 PROCEDURE chk_dates_are_valid
34 (p_cagr_entitlement_item_id IN per_cagr_entitlements.cagr_entitlement_item_id%TYPE
35 ,p_value IN per_cagr_entitlement_lines_f.value%TYPE
36 ,p_range_from IN per_cagr_entitlement_lines_f.range_from%TYPE
37 ,p_range_to IN per_cagr_entitlement_lines_f.range_to%TYPE
38 ,p_effective_Date IN DATE);
39 --
40 -- ---------------------------------------------------------------------------
41 -- |----------------------< check_for_correct_type >--------------------------|
42 -- ---------------------------------------------------------------------------
43 -- {Start Of Comments}
44 --
45 -- Description:
46 -- Checks that the value passed into the procedure is of the
47 -- correct type for the entitlement item.
48 --
49 -- Prerequisites:
50 --
51 -- In Arguments:
52 -- p_cagr_entitlement_line_id
53 -- p_value
54 --
55 --
56 -- Post Success:
57 --
58 -- Post Failure:
59 -- An error is raised if the value does not exist.
60 --
61 -- Access Status:
62 -- Internal Development Use Only.
63 --
64 -- {End Of Comments}
65 -- ---------------------------------------------------------------------------
66 --
67 PROCEDURE check_for_correct_type
68 (p_cagr_entitlement_item_id IN NUMBER
69 ,p_value IN OUT NOCOPY VARCHAR2
70 ,p_business_group_id IN NUMBER
71 ,p_effective_date IN DATE);
72 --
73 -- ---------------------------------------------------------------------------
74 -- |----------------------< set_security_group_id >--------------------------|
75 -- ---------------------------------------------------------------------------
76 -- {Start Of Comments}
77 --
78 -- Description:
79 -- Sets the security_group_id in CLIENT_INFO for the appropriate business
80 -- group context.
81 --
82 -- Prerequisites:
83 -- The primary key identified by p_cagr_entitlement_line_id
84 -- already exists.
85 --
86 -- In Arguments:
87 -- p_cagr_entitlement_line_id
88 --
89 --
90 -- Post Success:
91 -- The security_group_id will be set in CLIENT_INFO.
92 --
93 -- Post Failure:
94 -- An error is raised if the value does not exist.
95 --
96 -- Access Status:
97 -- Internal Development Use Only.
98 --
99 -- {End Of Comments}
100 -- ---------------------------------------------------------------------------
101 procedure set_security_group_id
102 (p_cagr_entitlement_line_id in number
103 );
104 --
105 --
106 -- ---------------------------------------------------------------------------
107 -- |---------------------< return_legislation_code >-------------------------|
108 -- ---------------------------------------------------------------------------
109 -- {Start Of Comments}
110 --
111 -- Description:
112 -- Return the legislation code for a specific primary key value
113 --
114 -- Prerequisites:
115 -- The primary key identified by p_cagr_entitlement_line_id
116 -- already exists.
117 --
118 -- In Arguments:
119 -- p_cagr_entitlement_line_id
120 --
121 --
122 -- Post Success:
123 -- The business group's legislation code will be returned.
124 --
125 -- Post Failure:
126 -- An error is raised if the value does not exist.
127 --
128 -- Access Status:
129 -- Internal Development Use Only.
130 --
131 -- {End Of Comments}
132 -- ---------------------------------------------------------------------------
133 FUNCTION return_legislation_code
134 (p_cagr_entitlement_line_id in number
135 ) RETURN varchar2;
136 --
137 --
138 -- ----------------------------------------------------------------------------
139 -- |---------------------------< insert_validate >----------------------------|
140 -- ----------------------------------------------------------------------------
141 -- {Start Of Comments}
142 --
143 -- Description:
144 -- This procedure controls the execution of all insert business rules
145 -- validation.
146 --
147 -- Prerequisites:
148 -- This private procedure is called from ins procedure.
149 --
150 -- In Parameters:
151 -- A Pl/Sql record structre.
152 --
153 -- Post Success:
154 -- Processing continues.
155 --
156 -- Post Failure:
157 -- If a business rules fails the error will not be handled by this procedure
158 -- unless explicity coded.
159 --
160 -- Developer Implementation Notes:
161 -- For insert, your business rules should be executed from this procedure and
162 -- should ideally (unless really necessary) just be straight procedure or
163 -- function calls. Try and avoid using conditional branching logic.
164 --
165 -- Access Status:
166 -- Internal Row Handler Use Only.
167 --
168 -- {End Of Comments}
169 -- ----------------------------------------------------------------------------
170 Procedure insert_validate
171 (p_rec in per_pcl_shd.g_rec_type
172 ,p_effective_date in date
173 ,p_datetrack_mode in varchar2
174 ,p_validation_start_date in date
175 ,p_validation_end_date in date
176 );
177 --
178 -- ----------------------------------------------------------------------------
179 -- |---------------------------< update_validate >----------------------------|
180 -- ----------------------------------------------------------------------------
181 -- {Start Of Comments}
182 --
183 -- Description:
184 -- This procedure controls the execution of all update business rules
185 -- validation.
186 --
187 -- Prerequisites:
188 -- This private procedure is called from upd procedure.
189 --
190 -- In Parameters:
191 -- A Pl/Sql record structre.
192 --
193 -- Post Success:
194 -- Processing continues.
195 --
196 -- Post Failure:
197 -- If a business rules fails the error will not be handled by this procedure
198 -- unless explicity coded.
199 --
200 -- Developer Implementation Notes:
201 -- For update, your business rules should be executed from this procedure and
202 -- should ideally (unless really necessary) just be straight procedure or
203 -- function calls. Try and avoid using conditional branching logic.
204 --
205 -- Access Status:
206 -- Internal Row Handler Use Only.
207 --
208 -- {End Of Comments}
209 -- ----------------------------------------------------------------------------
210 Procedure update_validate
211 (p_rec in per_pcl_shd.g_rec_type
212 ,p_effective_date in date
213 ,p_datetrack_mode in varchar2
214 ,p_validation_start_date in date
215 ,p_validation_end_date in date
216 );
217 --
218 -- ----------------------------------------------------------------------------
219 -- |---------------------------< delete_validate >----------------------------|
220 -- ----------------------------------------------------------------------------
221 -- {Start Of Comments}
222 --
223 -- Description:
224 -- This procedure controls the execution of all delete business rules
225 -- validation.
226 --
227 -- Prerequisites:
228 -- This private procedure is called from del procedure.
229 --
230 -- In Parameters:
231 -- A Pl/Sql record structure.
232 --
233 -- Post Success:
234 -- Processing continues.
235 --
236 -- Post Failure:
237 -- If a business rules fails the error will not be handled by this procedure
238 -- unless explicity coded.
239 --
240 -- Developer Implementation Notes:
241 -- For delete, your business rules should be executed from this procedure and
242 -- should ideally (unless really necessary) just be straight procedure or
243 -- function calls. Try and avoid using conditional branching logic.
244 --
245 -- Access Status:
246 -- Internal Row Handler Use Only.
247 --
248 -- {End Of Comments}
249 -- ----------------------------------------------------------------------------
250 Procedure delete_validate
251 (p_rec in per_pcl_shd.g_rec_type
252 ,p_effective_date in date
253 ,p_datetrack_mode in varchar2
254 ,p_validation_start_date in date
255 ,p_validation_end_date in date
256 );
257 --
258 end per_pcl_bus;