1 Package per_abc_bus as
2 /* $Header: peabcrhi.pkh 120.1 2005/09/28 05:02 snukala 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_absence_case_id
15 -- already exists.
16 --
17 -- In Arguments:
18 -- p_absence_case_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_absence_case_id in number
34 ,p_associated_column1 in varchar2 default null
35 );
36 --
37 --
38 -- ---------------------------------------------------------------------------
39 -- |---------------------< return_legislation_code >-------------------------|
40 -- ---------------------------------------------------------------------------
41 -- {Start Of Comments}
42 --
43 -- Description:
44 -- Return the legislation code for a specific primary key value
45 --
46 -- Prerequisites:
47 -- The primary key identified by p_absence_case_id
48 -- already exists.
49 --
50 -- In Arguments:
51 -- p_absence_case_id
52 --
53 --
54 -- Post Success:
55 -- The business group's legislation code will be returned.
56 --
57 -- Post Failure:
58 -- An error is raised if the value does not exist.
59 --
60 -- Access Status:
61 -- Internal Development Use Only.
62 --
63 -- {End Of Comments}
64 -- ---------------------------------------------------------------------------
65 FUNCTION return_legislation_code
66 (p_absence_case_id in number
67 ) RETURN varchar2;
68 --
69 --
70 -- ----------------------------------------------------------------------------
71 -- |---------------------------< insert_validate >----------------------------|
72 -- ----------------------------------------------------------------------------
73 -- {Start of comments}
74 --
75 -- Description:
76 -- This procedure controls the execution of all insert business rules
77 -- validation.
78 --
79 -- Prerequisites:
80 -- This private procedure is called from ins procedure.
81 --
82 -- In Parameters:
83 -- A Pl/Sql record structure.
84 --
85 -- Post Success:
86 -- Processing continues.
87 --
88 -- Post Failure:
89 -- If a business rules fails the error will not be handled by this procedure
90 -- unless explicity coded.
91 --
92 -- Developer Implementation Notes:
93 -- For insert, your business rules should be executed from this procedure
94 -- and should ideally (unless really necessary) just be straight procedure
95 -- or function calls. Try and avoid using conditional branching logic.
96 --
97 -- Access Status:
98 -- Internal Row Handler Use Only.
99 --
100 -- {End of comments}
101 -- ----------------------------------------------------------------------------
102 Procedure insert_validate
103 (p_rec in per_abc_shd.g_rec_type
104 );
105 --
106 -- ----------------------------------------------------------------------------
107 -- |---------------------------< update_validate >----------------------------|
108 -- ----------------------------------------------------------------------------
109 -- {Start Of Comments}
110 --
111 -- Description:
112 -- This procedure controls the execution of all update business rules
113 -- validation.
114 --
115 -- Prerequisites:
116 -- This private procedure is called from upd procedure.
117 --
118 -- In Parameters:
119 -- A Pl/Sql record structure.
120 --
121 -- Post Success:
122 -- Processing continues.
123 --
124 -- Post Failure:
125 -- If a business rules fails the error will not be handled by this procedure
126 -- unless explicity coded.
127 --
128 -- Access Status:
129 -- Internal Row Handler Use Only.
130 --
131 -- {End Of Comments}
132 -- ----------------------------------------------------------------------------
133 Procedure update_validate
134 (p_rec in per_abc_shd.g_rec_type
135 );
136 --
137 -- ----------------------------------------------------------------------------
138 -- |---------------------------< delete_validate >----------------------------|
139 -- ----------------------------------------------------------------------------
140 -- {Start Of Comments}
141 --
142 -- Description:
143 -- This procedure controls the execution of all delete business rules
144 -- validation.
145 --
146 -- Prerequisites:
147 -- This private procedure is called from del procedure.
148 --
149 -- In Parameters:
150 -- A Pl/Sql record structure.
151 --
152 -- Post Success:
153 -- Processing continues.
154 --
155 -- Post Failure:
156 -- If a business rules fails the error will not be handled by this procedure
157 -- unless explicity coded.
158 --
159 -- Developer Implementation Notes:
160 -- For delete, your business rules should be executed from this procedure
161 -- and should ideally (unless really necessary) just be straight procedure
162 -- or function calls. Try and avoid using conditional branching logic.
163 --
164 -- Access Status:
165 -- Internal Row Handler Use Only.
166 --
167 -- {End Of Comments}
168 -- ----------------------------------------------------------------------------
169 Procedure delete_validate
170 (p_rec in per_abc_shd.g_rec_type
171 );
172 --
173 --
174 -- ----------------------------------------------------------------------------
175 -- |-----------------------< get_min_abs_start_date >--------------------------|
176 -- ----------------------------------------------------------------------------
177 -- {Start Of Comments}
178 --
179 -- Description:
180 -- This function calculates and returns the minimum of the start dates of
181 -- the absences attached to the given absence case.
182 --
183 -- Prerequisites:
184 -- This public procedure can be called from outside.
185 --
186 -- In Parameters:
187 -- absence_case_id as input parameter.
188 --
189 -- Post Success:
190 -- Processing continues.
191 --
192 -- Post Failure:
193 -- If a business rules fails the error will not be handled by this procedure
194 -- unless explicity coded.
195 --
196 -- Developer Implementation Notes:
197 -- Currently this function is being called from the PER_ABSENCE_CASES VO.
198 --
199 -- Access Status:
200 -- Internal Row Handler Use Only.
201 --
202 -- {End Of Comments}
203 -- ----------------------------------------------------------------------------
204 function get_min_abs_start_date
205 (p_absence_case_id in number )
206 return date;
207 --
208 --
209 -- ----------------------------------------------------------------------------
210 -- |-------------------------< get_max_abs_end_date >--------------------------|
211 -- ----------------------------------------------------------------------------
212 -- {Start Of Comments}
213 --
214 -- Description:
215 -- This function calculates and returns the maximum of the end dates of
216 -- the absences attached to the given absence case.
217 --
218 -- Prerequisites:
219 -- This public procedure can be called from outside.
220 --
221 -- In Parameters:
222 -- absence_case_id as input parameter.
223 --
224 -- Post Success:
225 -- Processing continues.
226 --
227 -- Post Failure:
228 -- If a business rules fails the error will not be handled by this procedure
229 -- unless explicity coded.
230 --
231 -- Developer Implementation Notes:
232 -- Currently this function is being called from the PER_ABSENCE_CASES VO.
233 --
234 -- Access Status:
235 -- Internal Row Handler Use Only.
236 --
237 -- {End Of Comments}
238 -- ----------------------------------------------------------------------------
239 function get_max_abs_end_date
240 (p_absence_case_id in number )
241 return date;
242 --
243 end per_abc_bus;