DBA Data[Home] [Help]

PACKAGE: APPS.PER_PRV_BUS

Source


1 Package per_prv_bus as
2 /* $Header: peprvrhi.pkh 120.0 2005/05/31 15:13:38 appldev noship $ */
3 --
4 --
5 -- The following two global variables are only to be
6 -- used by the return_legislation_code function.
7 --
8 -- g_legislation_code       varchar2(150) default null;
9 -- g_performance_review_id  number        default null;
10 --
11 -- ----------------------------------------------------------------------------
12 -- |---------------------------< chk_person_id_date >-------------------------|
13 -- ----------------------------------------------------------------------------
14 --
15 -- Description
16 --   This procedure checks that the person is an employee on the given date
17 --   and that the date is not a duplicate
18 --
19 -- Pre-Conditions
20 --   None.
21 --
22 -- In Parameters
23 --   p_performance_review_id
24 --     the performance review primary key
25 --   p_person_id
26 --     the person's id
27 --   p_review_date
28 --     the date of the performance review
29 --   p_object_version_number
30 --     the object version number
31 --
32 -- Post Success
33 --   Processing continues
34 --
35 -- Post Failure
36 --   Error raised.
37 --
38 -- Access Status
39 --   Internal table handler use only.
40 --
41 Procedure chk_person_id_date(p_performance_review_id in number
42                             ,p_object_version_number in number
43                             ,p_person_id             in number
44                             ,p_review_date           in date);
45 --
46 -- ----------------------------------------------------------------------------
47 -- |-----------------------< chk_next_perf_review_date >----------------------|
48 -- ----------------------------------------------------------------------------
49 --
50 -- Description
51 --   This procedure checks that the next performance review date is after the
52 --   current performance review date, and that the person exists as an
53 --   employee on that date
54 --
55 -- Pre-Conditions
56 --   review_date and person_id should have been validated
57 --
58 -- In Parameters
59 --   p_performance_review_id
60 --     the performance review primary key
61 --   p_next_perf_review_date
62 --     the date of the next performance review
63 --   p_person_id
64 --     the person's id
65 --   p_review_date
66 --     the date of the performance review
67 --   p_object_version_number
68 --     the object version number
69 
70 --
71 -- Post Success
72 --   Processing continues
73 --
74 -- Post Failure
75 --   if the next date is before or on the current date, the
76 --   p_next_review_date_warning flag is set to true
77 --   if the person doesn't exist on the next date, an error is raised.
78 
79 -- Access Status
80 --   Internal table handler use only.
81 --
82 Procedure chk_next_perf_review_date(p_performance_review_id in     number
83                                    ,p_object_version_number in     number
84                                    ,p_review_date           in     date
85                                    ,p_next_perf_review_date in     date
86                                    ,p_person_id             in     number
87                                    ,p_next_review_date_warning out nocopy boolean);
88 
89 --
90 -- ----------------------------------------------------------------------------
91 -- |---------------------< chk_get_next_perf_review_date >--------------------|
92 -- ----------------------------------------------------------------------------
93 --
94 -- Description
95 --   This procedure gets the next performance review date if the assignment_id
96 --   is not null, and the review date has changed.
97 --
98 -- Pre-Conditions
99 --   review_date should have been validated
100 --
101 -- In Parameters
102 --   p_performance_review_id
103 --     the performance review primary key
104 --   p_next_perf_review_date
105 --     the date of the next performance review
106 --   p_assignment_id
107 --     the assignment id
108 --   p_review_date
109 --     the date of the performance review
110 --   p_object_version_number
111 --     the object version number
112 --
113 -- Post Success
114 --   Processing continues
115 --
116 -- Post Failure
117 ---
118 -- Access Status
119 --   Internal table handler use only.
120 --
121 Procedure chk_get_next_perf_review_date(p_performance_review_id in     number
122                                        ,p_object_version_number in     number
123                                        ,p_review_date           in     date
124                                        ,p_next_perf_review_date in out nocopy date
125                                        ,p_assignment_id         in     number);
126 --
127 --
128 -- ----------------------------------------------------------------------------
129 -- |-----------------------< chk_delete_performance_review>-------------------|
130 -- ----------------------------------------------------------------------------
131 --
132 -- Description
133 --   This procedure is used to check that the performance review can be
134 --   deleted, i.e. that it is not associated with a salary proposal
135 --
136 -- Pre Conditions
137 --   None.
138 --
139 -- In Parameters
140 --   performance_review_id PK of record being inserted or updated.
141 --
142 -- Post Success
143 --   Processing continues
144 --
145 -- Post Failure
146 --   Error raised
147 --
148 -- Access Status
149 --   Internal table handler use only.
150 --
151 Procedure chk_delete_performance_review(p_performance_review_id in number);
152 --
153 -- ----------------------------------------------------------------------------
154 -- |---------------------------< insert_validate >----------------------------|
155 -- ----------------------------------------------------------------------------
156 -- {Start Of Comments}
157 --
158 -- Description:
159 --   This procedure controls the execution of all insert business rules
160 --   validation.
161 --
162 -- Prerequisites:
163 --   This private procedure is called from ins procedure.
164 --
165 -- In Parameters:
166 --   A Pl/Sql record structre.
167 --
168 -- Post Success:
169 --   Processing continues.
170 --
171 -- Post Failure:
172 --   If a business rules fails the error will not be handled by this procedure
173 --   unless explicity coded.
174 --
175 -- Developer Implementation Notes:
176 --   For insert, your business rules should be executed from this procedure and
177 --   should ideally (unless really necessary) just be straight procedure or
178 --   function calls. Try and avoid using conditional branching logic.
179 --
180 -- Access Status:
181 --   Internal Row Handler Use Only.
182 --
183 -- {End Of Comments}
184 -- ----------------------------------------------------------------------------
185 Procedure insert_validate(p_rec in per_prv_shd.g_rec_type
186                          ,p_next_review_date_warning out nocopy boolean);
187 --
188 -- ----------------------------------------------------------------------------
189 -- |---------------------------< update_validate >----------------------------|
190 -- ----------------------------------------------------------------------------
191 -- {Start Of Comments}
192 --
193 -- Description:
194 --   This procedure controls the execution of all update business rules
195 --   validation.
196 --
197 -- Prerequisites:
198 --   This private procedure is called from upd procedure.
199 --
200 -- In Parameters:
201 --   A Pl/Sql record structre.
202 --
203 -- Post Success:
204 --   Processing continues.
205 --
206 -- Post Failure:
207 --   If a business rules fails the error will not be handled by this procedure
208 --   unless explicity coded.
209 --
210 -- Developer Implementation Notes:
211 --   For update, your business rules should be executed from this procedure and
212 --   should ideally (unless really necessary) just be straight procedure or
213 --   function calls. Try and avoid using conditional branching logic.
214 --
215 -- Access Status:
216 --   Internal Row Handler Use Only.
217 --
218 -- {End Of Comments}
219 -- ----------------------------------------------------------------------------
220 Procedure update_validate(p_rec in per_prv_shd.g_rec_type
221                          ,p_next_review_date_warning out nocopy boolean);
222 --
223 -- ----------------------------------------------------------------------------
224 -- |---------------------------< delete_validate >----------------------------|
225 -- ----------------------------------------------------------------------------
226 -- {Start Of Comments}
227 --
228 -- Description:
229 --   This procedure controls the execution of all delete business rules
230 --   validation.
231 --
232 -- Prerequisites:
233 --   This private procedure is called from del procedure.
234 --
235 -- In Parameters:
236 --   A Pl/Sql record structre.
237 --
238 -- Post Success:
239 --   Processing continues.
240 --
241 -- Post Failure:
242 --   If a business rules fails the error will not be handled by this procedure
243 --   unless explicity coded.
244 --
245 -- Developer Implementation Notes:
246 --   For delete, your business rules should be executed from this procedure and
247 --   should ideally (unless really necessary) just be straight procedure or
248 --   function calls. Try and avoid using conditional branching logic.
249 --
250 -- Access Status:
251 --   Internal Row Handler Use Only.
252 --
253 -- {End Of Comments}
254 -- ----------------------------------------------------------------------------
255 Procedure delete_validate(p_rec in per_prv_shd.g_rec_type);
256 --
257 --
258 -- ---------------------------------------------------------------------------
259 -- |---------------------< return_legislation_code >-------------------------|
260 -- ---------------------------------------------------------------------------
261 -- {Start Of Comments}
262 --
263 -- Description:
264 --   This procedure returns the business group id of the parent row.
265 --
266 -- Pre Conditions:
267 --   That the performance review row has been created.
268 --
269 -- In Parameters:
270 --   Primary key for the per_performance_reviews table.
271 --
272 -- Post Success:
273 --   Processing continues.
274 --
275 -- Post Failure:
276 --   An error is raised.
277 --
278 -- Developer Implementation Notes:
279 --   This return_legislation_code function is slightly different from others in
280 --   that the cursor does a join on the parent table (in this case the parent
281 --   table is always PER_ALL_PEOPLE_F and retrieves the business_group_id from
282 --   there.
283 --
284 -- Access Status:
285 --   Public
286 --
287 -- {End Of Comments}
288 -- ----------------------------------------------------------------------------
289 --
290 function return_legislation_code
291   (p_performance_review_id          in number
292    ) return varchar2;
293 --
294 end per_prv_bus;