1 Package per_ckl_bus as
2 /* $Header: pecklrhi.pkh 120.3 2006/09/06 06:02:08 sturlapa 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_checklist_id
17 -- already exists.
18 --
19 -- In Arguments:
20 -- p_checklist_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_checklist_id in number
38 ,p_associated_column1 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_checklist_id
52 -- already exists.
53 --
54 -- In Arguments:
55 -- p_checklist_id
56 --
57 --
58 -- Post Success:
59 -- The business group's legislation code will be returned.
60 --
61 -- Post Failure:
62 -- An error is raised if the value does not exist.
63 --
64 -- Access Status:
65 -- Internal Development Use Only.
66 --
67 -- {End Of Comments}
68 -- ---------------------------------------------------------------------------
69 FUNCTION return_legislation_code
70 (p_checklist_id in number
71 ) RETURN varchar2;
72 --
73 --
74 -- --------------------------------------------------------------------------
75 -- |------------------------< chk_name >------------------------------------|
76 -- --------------------------------------------------------------------------
77 --
78 -- Description:
79 -- Validates that name is not null, and that it is unique for the
80 -- given business group id.
81 --
82 -- Pre-requisites:
83 -- The business group id is valid.
84 --
85 -- IN Parameters:
86 -- p_name
87 -- p_business_group_id
88 --
89 -- Post Success:
90 -- Processing continues if the name is valid.
91 --
92 -- Post Failure:
93 -- An application error is raised and processing is terminated if the
94 -- name is invalid
95 --
96 -- Developer/Implementation Notes:
97 -- None.
98 --
99 -- Access Status:
100 -- Internal Development Use Only.
101 --
102 Procedure chk_name
103 (p_name in per_checklists.name%TYPE
104 ,p_category IN per_checklists.checklist_category%TYPE
105 ,p_business_group_id in per_checklists.business_group_id%TYPE
106 ,p_checklist_id in per_checklists.checklist_id%type
107 ,p_object_version_number in per_checklists.object_version_number%type
108 );
109 --
110 -- ---------------------------------------------------------------------------
111 -- |-------------------------------< chk_ler_id >----------------------------|
112 -- ---------------------------------------------------------------------------
113 --
114 -- Desciption :
115 --
116 -- Validates that LIFE_EVENT_REASON_ID exists in ben_ler_f on the
117 -- effective_date.
118 --
119 --
120 -- Pre-conditions :
121 --
122 --
123 -- In Arguments :
124 -- p_ler_id
125 -- p_effective_date
126 --
127 -- Post Success :
128 -- Processing continues
129 --
130 -- Post Failure :
131 -- An application error will be raised and processing is
132 -- terminated
133 --
134 -- Access Status :
135 -- Internal Row Handler Use Only.
136 --
137 -- {End of Comments}
138 --
139 -- ---------------------------------------------------------------------------
140 procedure chk_ler_id
141 (p_ler_id in per_checklists.event_reason_id%TYPE
142 ,p_business_group_id in per_checklists.business_group_id%TYPE
143 ,p_effective_date in date
144 );
145 --
146 -- ---------------------------------------------------------------------------
147 -- |--------------------------< chk_ckl_category >--------------------------|
148 -- ---------------------------------------------------------------------------
149 --
150 -- Description:
151 -- Validates that value for CHECKLIST_CATEGORY exists in hr_leg_lookups for
152 -- the lookup_type of 'CHECKLIST_CATEGORY'.
153 --
154 -- Pre-conditions:
155 --
156 -- In Arguments:
157 -- p_checklist_id
158 -- p_ckl_category
159 -- p_effective_date
160 --
161 -- Post Success:
162 -- Processing continues.
163 --
164 -- Post Failure:
165 -- An application error will be raised and processing is terminated.
166 --
167 -- Access Status:
168 -- Internal Row Handler Use Only.
169 --
170 -- {End Of Comments}
171 -- ----------------------------------------------------------------------------
172 procedure chk_ckl_category
173 (p_checklist_id in per_checklists.checklist_id%TYPE,
174 p_ckl_category in per_checklists.checklist_category%TYPE,
175 p_effective_date in date
176 );
177 --
178 -- ----------------------------------------------------------------------------
179 -- |---------------------------< insert_validate >----------------------------|
180 -- ----------------------------------------------------------------------------
181 -- {Start of comments}
182 --
183 -- Description:
184 -- This procedure controls the execution of all insert business rules
185 -- validation.
186 --
187 -- Prerequisites:
188 -- This private procedure is called from ins procedure.
189 --
190 -- In Parameters:
191 -- A Pl/Sql record structure.
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 insert, your business rules should be executed from this procedure
202 -- and should ideally (unless really necessary) just be straight procedure
203 -- or 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 insert_validate
211 (p_effective_date in date
212 ,p_rec in per_ckl_shd.g_rec_type
213 );
214 --
215 -- ----------------------------------------------------------------------------
216 -- |---------------------------< update_validate >----------------------------|
217 -- ----------------------------------------------------------------------------
218 -- {Start Of Comments}
219 --
220 -- Description:
221 -- This procedure controls the execution of all update business rules
222 -- validation.
223 --
224 -- Prerequisites:
225 -- This private procedure is called from upd procedure.
226 --
227 -- In Parameters:
228 -- A Pl/Sql record structure.
229 --
230 -- Post Success:
231 -- Processing continues.
232 --
233 -- Post Failure:
234 -- If a business rules fails the error will not be handled by this procedure
235 -- unless explicity coded.
236 --
237 -- Access Status:
238 -- Internal Row Handler Use Only.
239 --
240 -- {End Of Comments}
241 -- ----------------------------------------------------------------------------
242 Procedure update_validate
243 (p_effective_date in date
244 ,p_rec in per_ckl_shd.g_rec_type
245 );
246 --
247 -- ----------------------------------------------------------------------------
248 -- |---------------------------< delete_validate >----------------------------|
249 -- ----------------------------------------------------------------------------
250 -- {Start Of Comments}
251 --
252 -- Description:
253 -- This procedure controls the execution of all delete business rules
254 -- validation.
255 --
256 -- Prerequisites:
257 -- This private procedure is called from del procedure.
258 --
259 -- In Parameters:
260 -- A Pl/Sql record structure.
261 --
262 -- Post Success:
263 -- Processing continues.
264 --
265 -- Post Failure:
266 -- If a business rules fails the error will not be handled by this procedure
267 -- unless explicity coded.
268 --
269 -- Developer Implementation Notes:
270 -- For delete, your business rules should be executed from this procedure
271 -- and should ideally (unless really necessary) just be straight procedure
272 -- or function calls. Try and avoid using conditional branching logic.
273 --
274 -- Access Status:
275 -- Internal Row Handler Use Only.
276 --
277 -- {End Of Comments}
278 -- ----------------------------------------------------------------------------
279 Procedure delete_validate
280 (p_rec in per_ckl_shd.g_rec_type
281 );
282 --
283 end per_ckl_bus;