1 Package ota_lci_bus as
2 /* $Header: otlcirhi.pkh 120.0.12000000.1 2007/01/18 04:39:57 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_learning_path_id
15 -- p_category_usage_id
16 -- already exists.
17 --
18 -- In Arguments:
19 -- p_learning_path_id
20 -- p_category_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 --
29 -- Access Status:
30 -- Internal Development Use Only.
31 --
32 -- {End Of Comments}
33 -- ---------------------------------------------------------------------------
34 procedure set_security_group_id
35 (p_learning_path_id in number
36 ,p_category_usage_id in number
37 ,p_associated_column1 in varchar2 default null
38 ,p_associated_column2 in varchar2 default null
39 );
40 --
41 --
42 -- ---------------------------------------------------------------------------
43 -- |---------------------< return_legislation_code >-------------------------|
44 -- ---------------------------------------------------------------------------
45 -- {Start Of Comments}
46 --
47 -- Description:
48 -- Return the legislation code for a specific primary key value
49 --
50 -- Prerequisites:
51 -- The primary key identified by p_learning_path_id
52 -- p_category_usage_id
53 -- already exists.
54 --
55 -- In Arguments:
56 -- p_learning_path_id
57 -- p_category_usage_id
58 --
59 --
60 -- Post Success:
61 -- The business group's legislation code will be returned.
62 --
63 -- Post Failure:
64 -- An error is raised if the value does not exist.
65 --
66 -- Access Status:
67 -- Internal Development Use Only.
68 --
69 -- {End Of Comments}
70 -- ---------------------------------------------------------------------------
71 FUNCTION return_legislation_code
72 (p_learning_path_id in number
73 ,p_category_usage_id in number
74 ) RETURN varchar2;
75 --
76 --
77 -- ----------------------------------------------------------------------------
78 -- |---------------------------< insert_validate >----------------------------|
79 -- ----------------------------------------------------------------------------
80 -- {Start of comments}
81 --
82 -- Description:
83 -- This procedure controls the execution of all insert business rules
84 -- validation.
85 --
86 -- Prerequisites:
87 -- This private procedure is called from ins procedure.
88 --
89 -- In Parameters:
90 -- A Pl/Sql record structure.
91 --
92 -- Post Success:
93 -- Processing continues.
94 --
95 -- Post Failure:
96 -- If a business rules fails the error will not be handled by this procedure
97 -- unless explicity coded.
98 --
99 -- Developer Implementation Notes:
100 -- For insert, your business rules should be executed from this procedure
101 -- and should ideally (unless really necessary) just be straight procedure
102 -- or function calls. Try and avoid using conditional branching logic.
103 --
104 -- Access Status:
105 -- Internal Row Handler Use Only.
106 --
107 -- {End of comments}
108 -- ----------------------------------------------------------------------------
109 Procedure insert_validate
110 (p_effective_date in date
111 ,p_rec in ota_lci_shd.g_rec_type
112 ,p_learning_path_id in number
113 ,p_category_usage_id in number
114 );
115 --
116 -- ----------------------------------------------------------------------------
117 -- |---------------------------< update_validate >----------------------------|
118 -- ----------------------------------------------------------------------------
119 -- {Start Of Comments}
120 --
121 -- Description:
122 -- This procedure controls the execution of all update business rules
123 -- validation.
124 --
125 -- Prerequisites:
126 -- This private procedure is called from upd procedure.
127 --
128 -- In Parameters:
129 -- A Pl/Sql record structure.
130 --
131 -- Post Success:
132 -- Processing continues.
133 --
134 -- Post Failure:
135 -- If a business rules fails the error will not be handled by this procedure
136 -- unless explicity coded.
137 --
138 -- Access Status:
139 -- Internal Row Handler Use Only.
140 --
141 -- {End Of Comments}
142 -- ----------------------------------------------------------------------------
143 Procedure update_validate
144 (p_effective_date in date
145 ,p_rec in ota_lci_shd.g_rec_type
146 );
147 --
148 -- ----------------------------------------------------------------------------
149 -- |---------------------------< delete_validate >----------------------------|
150 -- ----------------------------------------------------------------------------
151 -- {Start Of Comments}
152 --
153 -- Description:
154 -- This procedure controls the execution of all delete business rules
155 -- validation.
156 --
157 -- Prerequisites:
158 -- This private procedure is called from del procedure.
159 --
160 -- In Parameters:
161 -- A Pl/Sql record structure.
162 --
163 -- Post Success:
164 -- Processing continues.
165 --
166 -- Post Failure:
167 -- If a business rules fails the error will not be handled by this procedure
168 -- unless explicity coded.
169 --
170 -- Developer Implementation Notes:
171 -- For delete, your business rules should be executed from this procedure
172 -- and should ideally (unless really necessary) just be straight procedure
173 -- or function calls. Try and avoid using conditional branching logic.
174 --
175 -- Access Status:
176 -- Internal Row Handler Use Only.
177 --
178 -- {End Of Comments}
179 -- ----------------------------------------------------------------------------
180 Procedure delete_validate
181 (p_rec in ota_lci_shd.g_rec_type
182 );
183 --
184
185 -- ----------------------------------------------------------------------------
186 -- |---------------------------< check_if_primary_category >----------------------------|
187 -- ----------------------------------------------------------------------------
188 -- {Start Of Comments}
189 --
190 -- Description:
191 -- This procedure Checks if the given Category is Primary for the
192 -- Learning Path.
193 --
194 -- Prerequisites:
195 -- This private procedure is called from insertValidate and UpdateValidate
196 --
197 -- In Parameters:
198 -- Learning_path_id and Category_usage_id
199 --
200 -- Post Success:
201 -- Processing continues.
202 --
203 -- Post Failure:
204 -- If a business rules fails the error will not be handled by this procedure
205 -- unless explicity coded.
206 --
207 -- Developer Implementation Notes:
208 --
209 --
210 -- Access Status:
211 -- Internal Row Handler Use Only.
212 --
213 -- {End Of Comments}
214 -- ----------------------------------------------------------------------------
215 Procedure check_if_primary_category
216 (
217 p_learning_path_id in number
218 ,p_category_usage_id in number
219 );
220
221 -- ----------------------------------------------------------------------------
222 -- |---------------------------< check_multiple_primary_ctgr >----------------------------|
223 -- ----------------------------------------------------------------------------
224 -- {Start Of Comments}
225 --
226 -- Description:
227 -- This procedure checks if there are multiple Primary Categories.
228 -- validation.
229 --
230 -- Prerequisites:
231 -- This private procedure is called from insertValidate and UpdateValidate
232 --
233 -- In Parameters:
234 -- Learning_path_id
235 --
236 -- Post Success:
237 -- Processing continues.
238 --
239 -- Post Failure:
240 -- If a business rules fails the error will not be handled by this procedure
241 -- unless explicity coded.
242 --
243 -- Developer Implementation Notes:
244 --
245 --
246 -- Access Status:
247 -- Internal Row Handler Use Only.
248 --
249 -- {End Of Comments}
250 -- ----------------------------------------------------------------------------
251 Procedure check_multiple_primary_ctgr
252 (
253 p_learning_path_id in number
254 );
255
256 -- ----------------------------------------------------------------------------
257 -- |---------------------------< check_start_end_dates >----------------------------|
258 -- ----------------------------------------------------------------------------
259 -- {Start Of Comments}
260 --
261 -- Description:
262 -- This procedure checks the sStart and End Dates for the inclusion.
263 --
264 -- Prerequisites:
265 -- This private procedure is called from insert_validate and update_validate.
266 --
267 -- In Parameters:
268 -- StartDate and EndDate for the Inclusion.
269 --
270 -- Post Success:
271 -- Processing continues.
272 --
273 -- Post Failure:
274 -- If a business rules fails the error will not be handled by this procedure
275 -- unless explicity coded.
276 --
277 -- Developer Implementation Notes:
278 --
279 --
280 -- Access Status:
281 -- Internal Row Handler Use Only.
282 --
283 -- {End Of Comments}
284 -- ----------------------------------------------------------------------------
285 Procedure check_start_end_dates
286 (
287 p_start_date in date
288 ,p_end_date in date
289 );
290
291 -- ----------------------------------------------------------------------------
292 -- |---------------------------< check_unique_key >----------------------------|
293 -- ----------------------------------------------------------------------------
294 -- {Start Of Comments}
295 --
296 -- Description:
297 -- This procedure checks whether the Category has already been attached to
298 -- the Learning Path
299 --
300 -- Prerequisites:
301 -- This private procedure is called from insert_validate and update_validate.
302 --
303 -- In Parameters:
304 -- Learning_path_id and Category_usage_id
305 --
306 -- Post Success:
307 -- Processing continues.
308 --
309 -- Post Failure:
310 -- If a business rules fails the error will not be handled by this procedure
311 -- unless explicity coded.
312 --
313 -- Developer Implementation Notes:
314 --
315 --
316 -- Access Status:
317 -- Internal Row Handler Use Only.
318 --
319 -- {End Of Comments}
320 -- ----------------------------------------------------------------------------
321 Procedure check_unique_key
322 (
323 p_learning_path_id in number
324 ,p_category_usage_id in number
325 );
326
327 -- ----------------------------------------------------------------------------
328 -- |---------------------------< check_category_dates >----------------------------|
329 -- ----------------------------------------------------------------------------
330 -- {Start Of Comments}
331 --
332 -- Description:
333 -- This procedure checks whether the start and end date are within the
334 -- category dates.
335 --
336 -- Prerequisites:
337 -- This private procedure is called from insert_validate and update_validate.
338 --
339 -- In Parameters:
340 -- p_category_usage_id - Category Usage Id
341 -- p_start_date - Start Date Active for the Inclusion
342 -- p_end_date - End Date Active for the Inclusion
343 --
344 -- Post Success:
345 -- Processing continues.
346 --
347 -- Post Failure:
348 -- If a business rules fails the error will not be handled by this procedure
349 -- unless explicity coded.
350 --
351 -- Developer Implementation Notes:
352 --
353 --
354 -- Access Status:
355 -- Internal Row Handler Use Only.
356 --
357 -- {End Of Comments}
358 -- ----------------------------------------------------------------------------
359 Procedure check_category_dates
360 (
361 p_category_usage_id in number
362 ,p_start_date in date
363 ,p_end_date in date
364 );
365
366 end ota_lci_bus;